cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: cxf + spring + websphere
Date Mon, 20 Apr 2009 20:43:34 GMT

Hmmm..  interesting.   I don't think I've ever seen anyone try to "endorse" 
all of CXF that way.     I can easily fix that NPE (when it's endorsed, the 
call to this.getClass().getClassLoader() returns null), but I'm pretty sure 
it's probably going to start failing in more places.  

In general, with WebSphere, it's best to put them in the war except for the 
couple that need endorsing.   See: 
http://cwiki.apache.org/CXF20DOC/appserverguide.html#AppServerGuide-Websphere


Dan


On Sat April 18 2009 2:33:49 am raj_r wrote:
> Iam trying to work with cxf and websphere.
> I tried deploying the one of the samples(which came along with the apache
> cxf 2.2) as a war file in websphere 6.2 . Iam able to expose a web service
> (added the wsdl jar in the endorsed folder and applied class loading
> application)
>
> Now that i am using spring with cxf and built a war and tried deploying it
> in websphere.
> I have put all the jars of cxf in endorsed folder of websphere (without
> adding this iam getting an exceptions related to  classNotFound).
>
> Now iam getting the following exception when starting the service:
>
> [4/17/09 19:25:56:450 IST] 00000016 ServiceLogger I
> com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC
> closed incident stream file
> D:\IBM\WebSphere\AppServer5\profiles\AppSrv01\logs\ffdc\server1_109c109c_09
>.04.17_19.25.56_0.txt [4/17/09 19:25:56:543 IST] 00000016 WebApp        E
> javax.servlet.ServletContext
> [4/17/09 19:25:56:637 IST] 00000016 AbstractCXFSe I   Load the bus without
> application context
> [4/17/09 19:25:56:684 IST] 00000016 BusApplicatio I
> org.springframework.context.support.AbstractApplicationContext
> prepareRefresh Refreshing
> org.apache.cxf.bus.spring.BusApplicationContext@f560f56: display name
> [org.apache.cxf.bus.spring.BusApplicationContext@f560f56]; startup date
> [Fri Apr 17 19:25:56 IST 2009]; root of context hierarchy
> [4/17/09 19:25:57:043 IST] 00000016 ServiceLogger I
> com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC opened incident
> stream file
> D:\IBM\WebSphere\AppServer5\profiles\AppSrv01\logs\ffdc\server1_109c109c_09
>.04.17_19.25.57_0.txt [4/17/09 19:25:57:152 IST] 00000016 ServiceLogger I
> com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC
> closed incident stream file
> D:\IBM\WebSphere\AppServer5\profiles\AppSrv01\logs\ffdc\server1_109c109c_09
>.04.17_19.25.57_0.txt [4/17/09 19:25:57:199 IST] 00000016 ServletWrappe E  
> SRVE0100E: Did not realize  init() exception thrown by servlet CXFServlet:
> java.lang.NullPointerException
> 	at
> org.apache.cxf.common.classloader.ClassLoaderUtils.getResource(ClassLoaderU
>tils.java:61) at
> org.apache.cxf.bus.spring.BusApplicationContext.findResource(BusApplication
>Context.java:211) at
> org.apache.cxf.bus.spring.BusApplicationContext.getConfigResources(BusAppli
>cationContext.java:144) at
> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanD
>efinitions(AbstractXmlApplicationContext.java:107) at
> org.apache.cxf.bus.spring.BusApplicationContext.loadBeanDefinitions(BusAppl
>icationContext.java:263) at
> org.springframework.context.support.AbstractRefreshableApplicationContext.r
>efreshBeanFactory(AbstractRefreshableApplicationContext.java:123) at
> org.springframework.context.support.AbstractApplicationContext.obtainFreshB
>eanFactory(AbstractApplicationContext.java:423) at
> org.springframework.context.support.AbstractApplicationContext.refresh(Abst
>ractApplicationContext.java:353) at
> org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContex
>t.java:91) at
> org.apache.cxf.bus.spring.SpringBusFactory.createApplicationContext(SpringB
>usFactory.java:102) at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:
>93) at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:
>86) at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:
>64) at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:
>53) at
> org.apache.cxf.transport.servlet.CXFServlet.updateContext(CXFServlet.java:1
>17) at
> org.apache.cxf.transport.servlet.CXFServlet.loadSpringBus(CXFServlet.java:1
>01) at
> org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java:70) at
> org.apache.cxf.transport.servlet.AbstractCXFServlet.init(AbstractCXFServlet
>.java:79) at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:185
>) at
> com.ibm.ws.wswebcontainer.servlet.ServletWrapper.init(ServletWrapper.java:3
>16) at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.initialize(ServletWrapper.ja
>va:1119) at
> com.ibm.ws.wswebcontainer.servlet.ServletWrapper.initialize(ServletWrapper.
>java:149) at
> com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor.createServletWra
>pper(WebExtensionProcessor.java:99) at
> com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.java:741) at
> com.ibm.ws.webcontainer.webapp.WebApp.initializeTargetMappings(WebApp.java:
>421) at
> com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.jav
>a:274) at
> com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:271) at
> com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:8
>8) at
> com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:15
>7) at
> com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:653) at
> com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:
>606) at
> com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl
>.java:333) at
> com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.j
>ava:549) at
> com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.ja
>va:1295) at
> com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStar
>t(DeployedApplicationImpl.java:1129) at
> com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.ja
>va:567) at
> com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicat
>ionImpl.java:814) at
> com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(Applicatio
>nMgrImpl.java:948) at
> com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(Applicat
>ionMgrImpl.java:2114) at
> com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsCo
>mponentImpl.java:340) at
> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1498)
>
> [4/17/09 19:25:57:215 IST] 00000016 ServletWrappe E   Deregister the mbean
> because of uncaught init() exception thrown by servlet CXFServlet:
> javax.servlet.ServletException: SRVE0207E: Uncaught initialization
> exception thrown by servlet
> 	at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:237
>) at
> com.ibm.ws.wswebcontainer.servlet.ServletWrapper.init(ServletWrapper.java:3
>16) at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.initialize(ServletWrapper.ja
>va:1119) at
> com.ibm.ws.wswebcontainer.servlet.ServletWrapper.initialize(ServletWrapper.
>java:149) at
> com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor.createServletWra
>pper(WebExtensionProcessor.java:99) at
> com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.java:741) at
> com.ibm.ws.webcontainer.webapp.WebApp.initializeTargetMappings(WebApp.java:
>421) at
> com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.jav
>a:274) at
> com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:271) at
> com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:8
>8) at
> com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:15
>7) at
> com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:653) at
> com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:
>606) at
> com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl
>.java:333) at
> com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.j
>ava:549) at
> com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.ja
>va:1295) at
> com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStar
>t(DeployedApplicationImpl.java:1129) at
> com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.ja
>va:567) at
> com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicat
>ionImpl.java:814) at
> com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(Applicatio
>nMgrImpl.java:948) at
> com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(Applicat
>ionMgrImpl.java:2114) at
> com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsCo
>mponentImpl.java:340) at
> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1498)
> ---- Begin backtrace for Nested Throwables
> java.lang.NullPointerException
> 	at
> org.apache.cxf.common.classloader.ClassLoaderUtils.getResource(ClassLoaderU
>tils.java:61) at
> org.apache.cxf.bus.spring.BusApplicationContext.findResource(BusApplication
>Context.java:211) at
> org.apache.cxf.bus.spring.BusApplicationContext.getConfigResources(BusAppli
>cationContext.java:144) at
> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanD
>efinitions(AbstractXmlApplicationContext.java:107) at
> org.apache.cxf.bus.spring.BusApplicationContext.loadBeanDefinitions(BusAppl
>icationContext.java:263) at
> org.springframework.context.support.AbstractRefreshableApplicationContext.r
>efreshBeanFactory(AbstractRefreshableApplicationContext.java:123) at
> org.springframework.context.support.AbstractApplicationContext.obtainFreshB
>eanFactory(AbstractApplicationContext.java:423) at
> org.springframework.context.support.AbstractApplicationContext.refresh(Abst
>ractApplicationContext.java:353) at
> org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContex
>t.java:91) at
> org.apache.cxf.bus.spring.SpringBusFactory.createApplicationContext(SpringB
>usFactory.java:102) at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:
>93) at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:
>86) at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:
>64) at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:
>53) at
> org.apache.cxf.transport.servlet.CXFServlet.updateContext(CXFServlet.java:1
>17) at
> org.apache.cxf.transport.servlet.CXFServlet.loadSpringBus(CXFServlet.java:1
>01) at
> org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java:70) at
> org.apache.cxf.transport.servlet.AbstractCXFServlet.init(AbstractCXFServlet
>.java:79) at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:185
>) at
> com.ibm.ws.wswebcontainer.servlet.ServletWrapper.init(ServletWrapper.java:3
>16) at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.initialize(ServletWrapper.ja
>va:1119) at
> com.ibm.ws.wswebcontainer.servlet.ServletWrapper.initialize(ServletWrapper.
>java:149) at
> com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor.createServletWra
>pper(WebExtensionProcessor.java:99) at
> com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.java:741) at
> com.ibm.ws.webcontainer.webapp.WebApp.initializeTargetMappings(WebApp.java:
>421) at
> com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.jav
>a:274) at
> com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:271) at
> com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:8
>8) at
> com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:15
>7) at
> com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:653) at
> com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:
>606) at
> com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl
>.java:333) at
> com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.j
>ava:549) at
> com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.ja
>va:1295) at
> com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStar
>t(DeployedApplicationImpl.java:1129) at
> com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.ja
>va:567) at
> com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicat
>ionImpl.java:814) at
> com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(Applicatio
>nMgrImpl.java:948) at
> com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(Applicat
>ionMgrImpl.java:2114) at
> com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsCo
>mponentImpl.java:340) at
> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1498)
> ,
> [4/17/09 19:25:57:262 IST] 00000016 WebExtensionP E   Error occured while
> preparing the servlet for initialization.
> javax.servlet.ServletException: SRVE0207E: Uncaught initialization
> exception thrown by servlet
> 	at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:237
>) at
> com.ibm.ws.wswebcontainer.servlet.ServletWrapper.init(ServletWrapper.java:3
>16) at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.initialize(ServletWrapper.ja
>va:1119) at
> com.ibm.ws.wswebcontainer.servlet.ServletWrapper.initialize(ServletWrapper.
>java:149) at
> com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor.createServletWra
>pper(WebExtensionProcessor.java:99) at
> com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.java:741) at
> com.ibm.ws.webcontainer.webapp.WebApp.initializeTargetMappings(WebApp.java:
>421) at
> com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.jav
>a:274) at
> com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:271) at
> com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:8
>8) at
> com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:15
>7) at
> com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:653) at
> com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:
>606) at
> com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl
>.java:333) at
> com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.j
>ava:549) at
> com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.ja
>va:1295) at
> com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStar
>t(DeployedApplicationImpl.java:1129) at
> com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.ja
>va:567) at
> com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicat
>ionImpl.java:814) at
> com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(Applicatio
>nMgrImpl.java:948) at
> com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(Applicat
>ionMgrImpl.java:2114) at
> com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsCo
>mponentImpl.java:340) at
> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1498)
> ---- Begin backtrace for Nested Throwables
> java.lang.NullPointerException
> 	at
> org.apache.cxf.common.classloader.ClassLoaderUtils.getResource(ClassLoaderU
>tils.java:61) at
> org.apache.cxf.bus.spring.BusApplicationContext.findResource(BusApplication
>Context.java:211) at
> org.apache.cxf.bus.spring.BusApplicationContext.getConfigResources(BusAppli
>cationContext.java:144) at
> org.springframework.context.support.AbstractXmlApplicationContext.loadBeanD
>efinitions(AbstractXmlApplicationContext.java:107) at
> org.apache.cxf.bus.spring.BusApplicationContext.loadBeanDefinitions(BusAppl
>icationContext.java:263) at
> org.springframework.context.support.AbstractRefreshableApplicationContext.r
>efreshBeanFactory(AbstractRefreshableApplicationContext.java:123) at
> org.springframework.context.support.AbstractApplicationContext.obtainFreshB
>eanFactory(AbstractApplicationContext.java:423) at
> org.springframework.context.support.AbstractApplicationContext.refresh(Abst
>ractApplicationContext.java:353) at
> org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContex
>t.java:91) at
> org.apache.cxf.bus.spring.SpringBusFactory.createApplicationContext(SpringB
>usFactory.java:102) at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:
>93) at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:
>86) at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:
>64) at
> org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:
>53) at
> org.apache.cxf.transport.servlet.CXFServlet.updateContext(CXFServlet.java:1
>17) at
> org.apache.cxf.transport.servlet.CXFServlet.loadSpringBus(CXFServlet.java:1
>01) at
> org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java:70) at
> org.apache.cxf.transport.servlet.AbstractCXFServlet.init(AbstractCXFServlet
>.java:79) at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:185
>) at
> com.ibm.ws.wswebcontainer.servlet.ServletWrapper.init(ServletWrapper.java:3
>16) at
> com.ibm.ws.webcontainer.servlet.ServletWrapper.initialize(ServletWrapper.ja
>va:1119) at
> com.ibm.ws.wswebcontainer.servlet.ServletWrapper.initialize(ServletWrapper.
>java:149) at
> com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor.createServletWra
>pper(WebExtensionProcessor.java:99) at
> com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.java:741) at
> com.ibm.ws.webcontainer.webapp.WebApp.initializeTargetMappings(WebApp.java:
>421) at
> com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.jav
>a:274) at
> com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:271) at
> com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:8
>8) at
> com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:15
>7) at
> com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:653) at
> com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:
>606) at
> com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl
>.java:333) at
> com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.j
>ava:549) at
> com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.ja
>va:1295) at
> com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStar
>t(DeployedApplicationImpl.java:1129) at
> com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.ja
>va:567) at
> com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicat
>ionImpl.java:814) at
> com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(Applicatio
>nMgrImpl.java:948) at
> com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(Applicat
>ionMgrImpl.java:2114) at
> com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsCo
>mponentImpl.java:340) at
> com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1498)
>
>
> Please suggest what can be done.
>
> Thanks & Regards
> raj

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Mime
View raw message