camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bijoy <bijoy.chaudh...@gmail.com>
Subject Re: Issues with cxfrs using json
Date Fri, 28 Mar 2014 10:49:36 GMT
Hi

I'm using cxf 2.7.7.

I have removed cxf-bundle-jaxrs from dependency and added
cxf-rt-rs-extension-providers. I have cxf.xml in classpath.
<import resource="classpath:META-INF/cxf/cxf.xml" />   

But getting following exception...

2014-03-28 15:50:26.195:WARN:oejw.WebAppContext:Scanner-0: Failed startup of
context
o.e.j.w.WebAppContext@2b30630e{/edm,file:/tmp/jetty-0.0.0.0-8080-edm.war-_edm-any-8012008925635602988.dir/webapp/,STARTING}{/edm.war}
org.apache.camel.RuntimeCamelException:
org.apache.cxf.service.factory.ServiceConstructionException
	at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1352)
	at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:120)
	at
org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:301)
	at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96)
	at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
	at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:948)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
	at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)
	at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
	at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
	at
org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:799)
	at
org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:446)
	at
org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:791)
	at
org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:296)
	at
org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1347)
	at
org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:743)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492)
	at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
	at
org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:117)
	at
org.eclipse.jetty.util.component.ContainerLifeCycle.addBean(ContainerLifeCycle.java:281)
	at
org.eclipse.jetty.util.component.ContainerLifeCycle.addBean(ContainerLifeCycle.java:213)
	at
org.eclipse.jetty.util.component.ContainerLifeCycle.updateBeans(ContainerLifeCycle.java:763)
	at
org.eclipse.jetty.server.handler.HandlerCollection.setHandlers(HandlerCollection.java:89)
	at
org.eclipse.jetty.server.handler.ContextHandlerCollection.setHandlers(ContextHandlerCollection.java:144)
	at
org.eclipse.jetty.server.handler.HandlerCollection.addHandler(HandlerCollection.java:155)
	at
org.eclipse.jetty.deploy.bindings.StandardDeployer.processBinding(StandardDeployer.java:41)
	at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)
	at
org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:498)
	at
org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:146)
	at
org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileChanged(ScanningAppProvider.java:198)
	at
org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileChanged(ScanningAppProvider.java:70)
	at org.eclipse.jetty.util.Scanner.reportChange(Scanner.java:659)
	at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:531)
	at org.eclipse.jetty.util.Scanner.scan(Scanner.java:391)
	at org.eclipse.jetty.util.Scanner$1.run(Scanner.java:329)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
Caused by: 
org.apache.cxf.service.factory.ServiceConstructionException
	at
org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:209)
	at
org.apache.camel.component.cxf.jaxrs.CxfRsConsumer.<init>(CxfRsConsumer.java:38)
	at
org.apache.camel.component.cxf.jaxrs.CxfRsEndpoint.createConsumer(CxfRsEndpoint.java:140)
	at
org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:65)
	at
org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:80)
	at org.apache.camel.impl.RouteService.warmUp(RouteService.java:134)
	at
org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:2109)
	at
org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:2039)
	at
org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1827)
	at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1699)
	at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1544)
	at
org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:179)
	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
	at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1512)
	at
org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:228)
	at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:118)
	at
org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:301)
	at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96)
	at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
	at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:948)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
	at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)
	at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
	at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
	at
org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:799)
	at
org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:446)
	at
org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:791)
	at
org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:296)
	at
org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1347)
	at
org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:743)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492)
	at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
	at
org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:117)
	at
org.eclipse.jetty.util.component.ContainerLifeCycle.addBean(ContainerLifeCycle.java:281)
	at
org.eclipse.jetty.util.component.ContainerLifeCycle.addBean(ContainerLifeCycle.java:213)
	at
org.eclipse.jetty.util.component.ContainerLifeCycle.updateBeans(ContainerLifeCycle.java:763)
	at
org.eclipse.jetty.server.handler.HandlerCollection.setHandlers(HandlerCollection.java:89)
	at
org.eclipse.jetty.server.handler.ContextHandlerCollection.setHandlers(ContextHandlerCollection.java:144)
	at
org.eclipse.jetty.server.handler.HandlerCollection.addHandler(HandlerCollection.java:155)
	at
org.eclipse.jetty.deploy.bindings.StandardDeployer.processBinding(StandardDeployer.java:41)
	at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)
	at
org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:498)
	at
org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:146)
	at
org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileChanged(ScanningAppProvider.java:198)
	at
org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileChanged(ScanningAppProvider.java:70)
	at org.eclipse.jetty.util.Scanner.reportChange(Scanner.java:659)
	at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:531)
	at org.eclipse.jetty.util.Scanner.scan(Scanner.java:391)
	at org.eclipse.jetty.util.Scanner$1.run(Scanner.java:329)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
Caused by: 
java.lang.NullPointerException
	at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:333)
	at
java.util.concurrent.ConcurrentHashMap.remove(ConcurrentHashMap.java:1175)
	at
org.apache.cxf.transport.http.DestinationRegistryImpl.removeDestination(DestinationRegistryImpl.java:62)
	at
org.apache.cxf.transport.http.AbstractHTTPDestination.shutdown(AbstractHTTPDestination.java:886)
	at org.apache.cxf.endpoint.ServerImpl.destroy(ServerImpl.java:183)
	at
org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:198)
	at
org.apache.camel.component.cxf.jaxrs.CxfRsConsumer.<init>(CxfRsConsumer.java:38)
	at
org.apache.camel.component.cxf.jaxrs.CxfRsEndpoint.createConsumer(CxfRsEndpoint.java:140)
	at
org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:65)
	at
org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:80)
	at org.apache.camel.impl.RouteService.warmUp(RouteService.java:134)
	at
org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:2109)
	at
org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:2039)
	at
org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:1827)
	at
org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1699)
	at
org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1544)
	at
org.apache.camel.spring.SpringCamelContext.doStart(SpringCamelContext.java:179)
	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
	at
org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1512)
	at
org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:228)
	at
org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:118)
	at
org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:301)
	at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96)
	at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
	at
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:948)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
	at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389)
	at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
	at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
	at
org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:799)
	at
org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:446)
	at
org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:791)
	at
org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:296)
	at
org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1347)
	at
org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:743)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492)
	at
org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
	at
org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:117)
	at
org.eclipse.jetty.util.component.ContainerLifeCycle.addBean(ContainerLifeCycle.java:281)
	at
org.eclipse.jetty.util.component.ContainerLifeCycle.addBean(ContainerLifeCycle.java:213)
	at
org.eclipse.jetty.util.component.ContainerLifeCycle.updateBeans(ContainerLifeCycle.java:763)
	at
org.eclipse.jetty.server.handler.HandlerCollection.setHandlers(HandlerCollection.java:89)
	at
org.eclipse.jetty.server.handler.ContextHandlerCollection.setHandlers(ContextHandlerCollection.java:144)
	at
org.eclipse.jetty.server.handler.HandlerCollection.addHandler(HandlerCollection.java:155)
	at
org.eclipse.jetty.deploy.bindings.StandardDeployer.processBinding(StandardDeployer.java:41)
	at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)
	at
org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:498)
	at
org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:146)
	at
org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileChanged(ScanningAppProvider.java:198)
	at
org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileChanged(ScanningAppProvider.java:70)
	at org.eclipse.jetty.util.Scanner.reportChange(Scanner.java:659)
	at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:531)
	at org.eclipse.jetty.util.Scanner.scan(Scanner.java:391)
	at org.eclipse.jetty.util.Scanner$1.run(Scanner.java:329)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)
2014-03-28 15:55:02.967:INFO:oejwc.WebSocketClient:Scanner-0: Stopped
org.eclipse.jetty.websocket.client.WebSocketClient@1384634e
2014-03-28 15:55:02.979:INFO:edm:Scanner-0: Closing Spring root
WebApplicationContext
278372 [Scanner-0] INFO 
org.springframework.web.context.support.XmlWebApplicationContext  - Closing
Root WebApplicationContext: startup date [Fri Mar 28 15:50:24 IST 2014];
root of context hierarchy
278373 [Scanner-0] WARN 
org.springframework.web.context.support.XmlWebApplicationContext  -
Exception thrown from ApplicationListener handling ContextClosedEvent
java.lang.NullPointerException
	at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:333)
	at
java.util.concurrent.ConcurrentHashMap.remove(ConcurrentHashMap.java:1175)
	at
org.apache.cxf.transport.http.DestinationRegistryImpl.removeDestination(DestinationRegistryImpl.java:62)
	at
org.apache.cxf.transport.http.AbstractHTTPDestination.deactivate(AbstractHTTPDestination.java:877)
	at
org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:58)
	at org.apache.cxf.endpoint.ServerImpl.stop(ServerImpl.java:176)
	at org.apache.cxf.endpoint.ServerImpl.destroy(ServerImpl.java:181)
	at
org.apache.cxf.bus.managers.ServerRegistryImpl.preShutdown(ServerRegistryImpl.java:90)
	at
org.apache.cxf.bus.managers.CXFBusLifeCycleManager.preShutdown(CXFBusLifeCycleManager.java:95)
	at
org.apache.cxf.bus.managers.CXFBusLifeCycleManager.postShutdown(CXFBusLifeCycleManager.java:102)
	at
org.apache.cxf.bus.spring.SpringBus.onApplicationEvent(SpringBus.java:113)
	at
org.apache.cxf.bus.spring.SpringBus$1.onApplicationEvent(SpringBus.java:64)
	at
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96)
	at
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
	at
org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1049)
	at
org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1010)
	at
org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:559)
	at
org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:143)
	at
org.eclipse.jetty.server.handler.ContextHandler.callContextDestroyed(ContextHandler.java:806)
	at
org.eclipse.jetty.servlet.ServletContextHandler.callContextDestroyed(ServletContextHandler.java:459)
	at
org.eclipse.jetty.server.handler.ContextHandler.doStop(ContextHandler.java:840)
	at
org.eclipse.jetty.servlet.ServletContextHandler.doStop(ServletContextHandler.java:217)
	at org.eclipse.jetty.webapp.WebAppContext.doStop(WebAppContext.java:516)
	at
org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:90)
	at
org.eclipse.jetty.deploy.bindings.StandardStopper.processBinding(StandardStopper.java:44)
	at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)
	at
org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:498)
	at
org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:458)
	at
org.eclipse.jetty.deploy.DeploymentManager.removeApp(DeploymentManager.java:409)
	at
org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileRemoved(ScanningAppProvider.java:209)
	at
org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileRemoved(ScanningAppProvider.java:76)
	at org.eclipse.jetty.util.Scanner.reportRemoval(Scanner.java:632)
	at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:534)
	at org.eclipse.jetty.util.Scanner.scan(Scanner.java:391)
	at org.eclipse.jetty.util.Scanner$1.run(Scanner.java:329)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)


Any idea?



--
View this message in context: http://camel.465427.n5.nabble.com/Issues-with-cxfrs-using-json-tp5749474p5749495.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message