geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Westhveg <westhstud...@gmail.com>
Subject Re: Problem when deploy CXF WebService (Service resource injection failed)
Date Tue, 30 Jun 2009 20:55:34 GMT

Jarek,

Now the exception is:

Distribution of module failed.  See log for details.
  AbstractWebModuleBuilder: Could not load listener class:
org.springframework.web.context.ContextLoaderListener
  org.apache.geronimo.common.DeploymentException: AbstractWebModuleBuilder:
Could not load listener class:
org.springframework.web.context.ContextLoaderListener
  	at
org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.createWebAppClassFinder(AbstractWebModuleBuilder.java:791)
  	at
org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.createWebAppClassFinder(AbstractWebModuleBuilder.java:759)
  	at
org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.configureBasicWebModuleAttributes(AbstractWebModuleBuilder.java:836)
  	at
org.apache.geronimo.jetty6.deployment.JettyModuleBuilder.addGBeans(JettyModuleBuilder.java:365)
  	at
org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.addGBeans(SwitchingModuleBuilder.java:165)
  	at
org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:647)
  	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:255)
  	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:134)
  	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  	at java.lang.reflect.Method.invoke(Unknown Source)
  	at
org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
  	at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
  	at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
  	at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
  	at org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:342)
  	at sun.reflect.GeneratedMethodAccessor100.invoke(Unknown Source)
  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  	at java.lang.reflect.Method.invoke(Unknown Source)
  	at
org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
  	at
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
  	at
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
  	at
org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
  	at
org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172)
  	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown
Source)
  	at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
  	at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown
Source)
  	at javax.management.remote.rmi.RMIConnectionImpl.access$200(Unknown
Source)
  	at
javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown
Source)
  	at java.security.AccessController.doPrivileged(Native Method)
  	at
javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown
Source)
  	at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown Source)
  	at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source)
  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  	at java.lang.reflect.Method.invoke(Unknown Source)
  	at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
  	at sun.rmi.transport.Transport$1.run(Unknown Source)
  	at java.security.AccessController.doPrivileged(Native Method)
  	at sun.rmi.transport.Transport.serviceCall(Unknown Source)
  	at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
  	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown
Source)
  	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown
Source)
  	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
  	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  	at java.lang.Thread.run(Unknown Source)
  Caused by: java.lang.ClassNotFoundException:
org.springframework.web.context.ContextLoaderListener in classloader
default/TestCXF/1.0/car
  	at
org.apache.geronimo.kernel.config.MultiParentClassLoader.loadOptimizedClass(MultiParentClassLoader.java:438)
  	at
org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:280)
  	at java.lang.ClassLoader.loadClass(Unknown Source)
  	at
org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.createWebAppClassFinder(AbstractWebModuleBuilder.java:789)
  	... 45 more


But if I add spring.jar, then the WAR is published without errors, the CXF
webservice is also published and WSDL file is generated correctly. Now my
question is, why I can't use cxf servlet? Is this a best practice? In other
words... if I want to publish a web service in my production environmnet..
do you recommend me this way?


Thanks a lot Jarek :)


Westhveg


P.D: Remember that for this test I don't neither set the system property
GERONIMO_OPTS="-Dorg.apache.geronimo.jaxws.builder.useSimpleFinder=true" nor
add hidden-classes/filters to geronimo-web.xml file.



Jarek Gawor-2 wrote:
> 
> Ok, making progress on this front... Remove the CXFServlet from
> web.xml file and add a servlet (and servlet-mapping) for the class
> that is your web service implementation.
> 
> Jarek
> 
> On Tue, Jun 30, 2009 at 2:18 PM, Westhveg<westhstudios@gmail.com> wrote:
>>
>> Hi Jarek,
>>
>> Removing both jars, the exception is:
>>
>> Distribution of module failed.  See log for details.
>>  Failed to load servlet class org.apache.cxf.transport.servlet.CXFServlet
>>  org.apache.geronimo.common.DeploymentException: Failed to load servlet
>> class org.apache.cxf.transport.servlet.CXFServlet
>>        at
>> org.apache.geronimo.jaxws.builder.AdvancedWARWebServiceFinder.getPortInfo(AdvancedWARWebServiceFinder.java:148)
>>        at
>> org.apache.geronimo.jaxws.builder.AdvancedWARWebServiceFinder.discoverPOJOWebServices(AdvancedWARWebServiceFinder.java:125)
>>        at
>> org.apache.geronimo.jaxws.builder.AdvancedWARWebServiceFinder.discoverWebServices(AdvancedWARWebServiceFinder.java:45)
>>        at
>> org.apache.geronimo.jaxws.builder.WARWebServiceFinder.discoverWebServices(WARWebServiceFinder.java:70)
>>        at
>> org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.discoverWebServices(JAXWSServiceBuilder.java:97)
>>        at
>> org.apache.geronimo.jaxws.builder.JAXWSServiceBuilder.findWebServices(JAXWSServiceBuilder.java:80)
>>        at
>> org.apache.geronimo.web25.deployment.AbstractWebModuleBuilder.basicInitContext(AbstractWebModuleBuilder.java:364)
>>        at
>> org.apache.geronimo.jetty6.deployment.JettyModuleBuilder.initContext(JettyModuleBuilder.java:350)
>>        at
>> org.apache.geronimo.j2ee.deployment.SwitchingModuleBuilder.initContext(SwitchingModuleBuilder.java:159)
>>        at
>> org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:595)
>>        at
>> org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:255)
>>        at
>> org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:134)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>        at java.lang.reflect.Method.invoke(Unknown Source)
>>        at
>> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
>>        at
>> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
>>        at
>> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
>>        at
>> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
>>        at
>> org.apache.geronimo.kernel.KernelGBean.invoke(KernelGBean.java:342)
>>        at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
>>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>        at java.lang.reflect.Method.invoke(Unknown Source)
>>        at
>> org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
>>        at
>> org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:124)
>>        at
>> org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:867)
>>        at
>> org.apache.geronimo.kernel.basic.BasicKernel.invoke(BasicKernel.java:239)
>>        at
>> org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(MBeanGBeanBridge.java:172)
>>        at
>> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown
>> Source)
>>        at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
>>        at
>> javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown
>> Source)
>>        at
>> javax.management.remote.rmi.RMIConnectionImpl.access$200(Unknown
>> Source)
>>        at
>> javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown
>> Source)
>>        at java.security.AccessController.doPrivileged(Native Method)
>>        at
>> javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(Unknown
>> Source)
>>        at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown
>> Source)
>>        at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
>>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>        at java.lang.reflect.Method.invoke(Unknown Source)
>>        at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
>>        at sun.rmi.transport.Transport$1.run(Unknown Source)
>>        at java.security.AccessController.doPrivileged(Native Method)
>>        at sun.rmi.transport.Transport.serviceCall(Unknown Source)
>>        at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown
>> Source)
>>        at
>> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown
>> Source)
>>        at
>> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown
>> Source)
>>        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
>> Source)
>>        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
>> Source)
>>        at java.lang.Thread.run(Unknown Source)
>>  Caused by: java.lang.ClassNotFoundException:
>> org.apache.cxf.transport.servlet.CXFServlet in classloader
>> default/ViewControllerWS/1.0/car
>>        at
>> org.apache.geronimo.kernel.config.MultiParentClassLoader.loadOptimizedClass(MultiParentClassLoader.java:438)
>>        at
>> org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:280)
>>        at java.lang.ClassLoader.loadClass(Unknown Source)
>>        at
>> org.apache.geronimo.jaxws.builder.AdvancedWARWebServiceFinder.getPortInfo(AdvancedWARWebServiceFinder.java:142)
>>        ... 49 more
>>
>>
>> Thanks,
>>
>> Westhveg
>>
>>
>>
>> Jarek Gawor-2 wrote:
>>>
>>> You have to remove both, CXF and Spring. And please include a full
>>> stack trace to see what's loading that
>>> org.springframework.context.ApplicationListener class.
>>>
>>> Jarek
>>>
>>> On Mon, Jun 29, 2009 at 3:56 PM, Westhveg<westhstudios@gmail.com> wrote:
>>>>
>>>> And if I remove the spring or cfx jar files from WAR, I get a
>>>> ClassNotFoundException. For example, if I remove spring jar file:
>>>>
>>>> Caused by: java.lang.ClassNotFoundException:
>>>> org.springframework.context.ApplicationListener in classloader
>>>> default/ViewControllerWS/1.0/car
>>>>        at
>>>> org.apache.geronimo.kernel.config.MultiParentClassLoader.loadOptimizedClass(MultiParentClassLoader.java:438)
>>>>        at
>>>> org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:280)
>>>>        at java.lang.ClassLoader.loadClass(Unknown Source)
>>>>        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>>>>        ... 60 more
>>>>
>>>>
>>>>
>>>> Could you help me, please?
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Westhveg
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Problem-when-deploy-CXF-WebService-%28Service-resource-injection-failed%29-tp24245804s134p24276970.html
>> Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-when-deploy-CXF-WebService-%28Service-resource-injection-failed%29-tp24245804s134p24279452.html
Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.


Mime
View raw message