You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Westhveg <we...@gmail.com> on 2009/06/28 23:41:33 UTC

Problem when deploy CXF WebService (Service resource injection failed)

Hi,

I'm not able to deploy CXF WebService in Apache Geronimo. This is my
environment:

Java 1.6
Apache Geronimo (Jetty) 2.1.4
Apache CXF 2.0.8
Spring 2.5.6

When I deploy the application I get the following exception:

Redeploy of module failed.  See log for details.
  start of default/ViewControllerWS/1.0/car failed
  org.apache.geronimo.kernel.config.LifecycleException: start of
default/ViewControllerWS/1.0/car failed
  	at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:580)
  	at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:544)
  	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.GeneratedMethodAccessor92.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: org.apache.geronimo.kernel.config.InvalidConfigException:
Unknown start exception
  	at
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:522)
  	at
org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:188)
  	at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:563)
  	... 39 more
  Caused by: org.apache.geronimo.gbean.InvalidConfigurationException:
Configuration default/ViewControllerWS/1.0/car failed to start due to the
following reasons:
    The service
J2EEApplication=null,WebModule=default/ViewControllerWS/1.0/car,j2eeType=Servlet,name=org.apache.cxf.js.rhino.DOMMessageProvider
did not start because Service resource injection failed
    The service
J2EEApplication=null,WebModule=default/ViewControllerWS/1.0/car,j2eeType=Servlet,name=org.apache.cxf.js.rhino.DOMPayloadProvider
did not start because
default/ViewControllerWS/1.0/car?J2EEApplication=null,WebModule=default/ViewControllerWS/1.0/car,j2eeType=Servlet,name=org.apache.cxf.js.rhino.DOMMessageProvider
did not start.
  
  	at
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:485)
  	... 41 more


This is my spring file:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:jaxws="http://cxf.apache.org/jaxws"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                          
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
                           http://cxf.apache.org/jaxws
                           http://cxf.apache.org/schemas/jaxws.xsd">


    <import resource="classpath:META-INF/cxf/cxf.xml" />
    <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
    <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />


    <bean id="testServiceTarget"
		  class="com.test.TestServiceImpl" />

	<jaxws:server id="testService"
				  serviceBean="testServiceTarget"
	 			  address="http://localhost:8080/TestService" />

</beans>


Thanks in advance,

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


Re: Problem when deploy CXF WebService (Service resource injection failed)

Posted by Jarek Gawor <jg...@gmail.com>.
Are you sure you're running with
-Dorg.apache.geronimo.jaxws.builder.useSimpleFinder=true? Because
Geronimo should not be finding and deploying
org.apache.cxf.js.rhino.DOMMessageProvider with that option. Or maybe
that's from previous deployments?

Jarek

On Tue, Jun 30, 2009 at 2:26 PM, Westhveg<we...@gmail.com> wrote:
>
> Jarek,
>
> Adding this filter:
>
> <dep:filter>META-INF/cxf</dep:filter>
>
> I get the same exception, but if I add a filter for package:
>
> <dep:filter>org.xmlsoap.schemas.wsdl.http</dep:filter>
>
> Then I get the following exception:
>
> Redeploy of module failed.  See log for details.
>  start of default/ViewControllerWS/1.0/car failed
>  org.apache.geronimo.kernel.config.LifecycleException: start of
> default/ViewControllerWS/1.0/car failed
>        at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:580)
>        at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:544)
>        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: org.apache.geronimo.kernel.config.InvalidConfigException:
> Unknown start exception
>        at
> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:522)
>        at
> org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:188)
>        at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:563)
>        ... 39 more
>  Caused by: org.apache.geronimo.gbean.InvalidConfigurationException:
> Configuration default/ViewControllerWS/1.0/car failed to start due to the
> following reasons:
>    The service
> J2EEApplication=null,Servlet=com.test.service.impl.ServiceImpl,WebModule=default/ViewControllerWS/1.0/car,j2eeType=GBean,name=org.apache.geronimo.cxf.pojo.POJOWebServiceContainerFactoryGBean
> did not start for an unknown reason
>    The service
> J2EEApplication=null,WebModule=default/ViewControllerWS/1.0/car,j2eeType=Servlet,name=com.test.service.impl.ServiceImpl
> did not start because
> default/ViewControllerWS/1.0/car?J2EEApplication=null,Servlet=com.test.service.impl.ServiceImpl,WebModule=default/ViewControllerWS/1.0/car,j2eeType=GBean,name=org.apache.geronimo.cxf.pojo.POJOWebServiceContainerFactoryGBean
> did not start.
>    The service
> J2EEApplication=null,Servlet=org.apache.cxf.js.rhino.DOMMessageProvider,WebModule=default/ViewControllerWS/1.0/car,j2eeType=GBean,name=org.apache.geronimo.cxf.pojo.POJOWebServiceContainerFactoryGBean
> did not start for an unknown reason
>    The service
> J2EEApplication=null,WebModule=default/ViewControllerWS/1.0/car,j2eeType=Servlet,name=org.apache.cxf.js.rhino.DOMMessageProvider
> did not start because the following dependent services did not start:
> [default/ViewControllerWS/1.0/car?J2EEApplication=null,Servlet=org.apache.cxf.js.rhino.DOMMessageProvider,WebModule=default/ViewControllerWS/1.0/car,j2eeType=GBean,name=org.apache.geronimo.cxf.pojo.POJOWebServiceContainerFactoryGBean,
> default/ViewControllerWS/1.0/car?J2EEApplication=null,WebModule=default/ViewControllerWS/1.0/car,j2eeType=Servlet,name=com.test.service.impl.ServiceImpl]
>    The service
> J2EEApplication=null,Servlet=org.apache.cxf.js.rhino.DOMPayloadProvider,WebModule=default/ViewControllerWS/1.0/car,j2eeType=GBean,name=org.apache.geronimo.cxf.pojo.POJOWebServiceContainerFactoryGBean
> did not start for an unknown reason
>    The service
> J2EEApplication=null,WebModule=default/ViewControllerWS/1.0/car,j2eeType=Servlet,name=org.apache.cxf.js.rhino.DOMPayloadProvider
> did not start because the following dependent services did not start:
> [default/ViewControllerWS/1.0/car?J2EEApplication=null,WebModule=default/ViewControllerWS/1.0/car,j2eeType=Servlet,name=org.apache.cxf.js.rhino.DOMMessageProvider,
> default/ViewControllerWS/1.0/car?J2EEApplication=null,Servlet=org.apache.cxf.js.rhino.DOMPayloadProvider,WebModule=default/ViewControllerWS/1.0/car,j2eeType=GBean,name=org.apache.geronimo.cxf.pojo.POJOWebServiceContainerFactoryGBean]
>
>        at
> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:485)
>        ... 41 more
>
>
> Thanks,
>
> Westhveg
>
>
> Jarek Gawor-2 wrote:
>>
>> You might also want to add:
>>
>> <dep:filter>META-INF/cxf</dep:filter>
>>
>> I don't know where org.xmlsoap.schemas.wsdl.http.AddressType comes
>> from but you could try adding a filter for its package as well.
>>
>> Jarek
>>
>> On Mon, Jun 29, 2009 at 3:08 PM, Westhveg<we...@gmail.com> wrote:
>>>
>>> Jarek,
>>>
>>> Thanks for your reply. Setting the system property and adding
>>> hidden-classes
>>> in geronimo-web.xml file I get the following exception:
>>>
>>>
>>> Install New Applications
>>>  start of default/ViewControllerWS/1.0/car failed
>>> org.apache.geronimo.kernel.config.LifecycleException: start of
>>> default/ViewControllerWS/1.0/car failed
>>>        at
>>> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:580)
>>>        at
>>> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:544)
>>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>        at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>        at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>        at java.lang.reflect.Method.invoke(Method.java:597)
>>>        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:832)
>>>        at
>>> org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
>>>        at
>>> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
>>>        at
>>> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
>>>        at
>>> org.apache.geronimo.gbean.GBeanLifecycle$$EnhancerByCGLIB$$4b6d99b8.startConfiguration(<generated>)
>>>        at
>>> org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartCommand.java:67)
>>>        at java.lang.Thread.run(Thread.java:619)
>>> Caused by: org.apache.geronimo.kernel.config.InvalidConfigException:
>>> Unknown
>>> start exception
>>>        at
>>> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:522)
>>>        at
>>> org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:188)
>>>        at
>>> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:563)
>>>        ... 14 more
>>> Caused by: org.apache.geronimo.gbean.InvalidConfigurationException:
>>> Configuration default/ViewControllerWS/1.0/car failed to start due to the
>>> following reasons:
>>>  The service
>>> J2EEApplication=null,WebModule=default/ViewControllerWS/1.0/car,j2eeType=Servlet,name=CXFServlet
>>> did not start because javax.servlet.ServletException:
>>> javax.servlet.ServletException:
>>> org.springframework.beans.factory.BeanCreationException: Error creating
>>> bean
>>> with name 'org.apache.cxf.wsdl.WSDLManager' defined in class path
>>> resource
>>> [META-INF/cxf/cxf.xml]: Instantiation of bean failed; nested exception is
>>> org.springframework.beans.BeanInstantiationException: Could not
>>> instantiate
>>> bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]: Constructor threw
>>> exception; nested exception is java.lang.ClassCastException: class
>>> org.xmlsoap.schemas.wsdl.http.AddressType
>>>
>>>        at
>>> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:485)
>>>        ... 16 more
>>>
>>> Could you help me, please?
>>>
>>>
>>> Thanks,
>>>
>>> Westhveg
>>>
>>>
>>>
>>> Jarek Gawor-2 wrote:
>>>>
>>>> If you are deploying a web application that contains its own CXF and
>>>> Spring jars, try doing the following:
>>>>
>>>> 1) Set the following system property before starting the server:
>>>>
>>>> export
>>>> GERONIMO_OPTS="-Dorg.apache.geronimo.jaxws.builder.useSimpleFinder=true"
>>>>
>>>> 2) Add the following hidden-classes/filters to geronimo-web.xml file:
>>>>
>>>>    <dep:hidden-classes>
>>>>        <dep:filter>org.apache.cxf</dep:filter>
>>>>        <dep:filter>org.springframework</dep:filter>
>>>>        <dep:filter>META-INF/spring</dep:filter>
>>>>   </dep:hidden-classes>
>>>>
>>>> However, if your web service is just a standard JAX-WS web service you
>>>> can let Geronimo to deploy it. Just remove all CXF and Spring jars
>>>> from your application and deploy it and Geronimo should be able to
>>>> find your web service class.
>>>>
>>>> Jarek
>>>>
>>>> On Mon, Jun 29, 2009 at 5:22 AM, Westhveg<we...@gmail.com> wrote:
>>>>>
>>>>> More details about the exception:
>>>>>
>>>>> Caused by: org.apache.xbean.recipe.MissingFactoryMethodException:
>>>>> Constructor has 5 arugments but expected 0 arguments: public
>>>>> org.apache.cxf.js.rhino.DOMMessageProvider(org.mozilla.javascript.Scriptable,org.mozilla.javascript.Scriptable,java.lang.String,boolean,boolean)
>>>>>        at
>>>>> org.apache.xbean.recipe.ReflectionUtil.findConstructor(ReflectionUtil.java:546)
>>>>>        at
>>>>> org.apache.xbean.recipe.ObjectRecipe.findFactory(ObjectRecipe.java:532)
>>>>>        at
>>>>> org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:270)
>>>>>        at
>>>>> org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
>>>>>        at
>>>>> org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
>>>>>        at
>>>>> org.apache.geronimo.j2ee.annotation.Holder.newInstance(Holder.java:173)
>>>>>        at
>>>>> org.apache.geronimo.jaxws.annotations.AnnotationHolder.newInstance(AnnotationHolder.java:39)
>>>>>        at
>>>>> org.apache.geronimo.cxf.pojo.POJOEndpoint.<init>(POJOEndpoint.java:76)
>>>>>        ... 75 more
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/Problem-when-deploy-CXF-WebService-%28Service-resource-injection-failed%29-tp24245804s134p24250919.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-tp24245804s134p24259358.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-tp24245804s134p24277082.html
> Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.
>
>

Re: Problem when deploy CXF WebService (Service resource injection failed)

Posted by Westhveg <we...@gmail.com>.
Jarek,

Adding this filter:

<dep:filter>META-INF/cxf</dep:filter> 

I get the same exception, but if I add a filter for package:

<dep:filter>org.xmlsoap.schemas.wsdl.http</dep:filter> 

Then I get the following exception:

Redeploy of module failed.  See log for details.
  start of default/ViewControllerWS/1.0/car failed
  org.apache.geronimo.kernel.config.LifecycleException: start of
default/ViewControllerWS/1.0/car failed
  	at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:580)
  	at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:544)
  	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: org.apache.geronimo.kernel.config.InvalidConfigException:
Unknown start exception
  	at
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:522)
  	at
org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:188)
  	at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:563)
  	... 39 more
  Caused by: org.apache.geronimo.gbean.InvalidConfigurationException:
Configuration default/ViewControllerWS/1.0/car failed to start due to the
following reasons:
    The service
J2EEApplication=null,Servlet=com.test.service.impl.ServiceImpl,WebModule=default/ViewControllerWS/1.0/car,j2eeType=GBean,name=org.apache.geronimo.cxf.pojo.POJOWebServiceContainerFactoryGBean
did not start for an unknown reason
    The service
J2EEApplication=null,WebModule=default/ViewControllerWS/1.0/car,j2eeType=Servlet,name=com.test.service.impl.ServiceImpl
did not start because
default/ViewControllerWS/1.0/car?J2EEApplication=null,Servlet=com.test.service.impl.ServiceImpl,WebModule=default/ViewControllerWS/1.0/car,j2eeType=GBean,name=org.apache.geronimo.cxf.pojo.POJOWebServiceContainerFactoryGBean
did not start.
    The service
J2EEApplication=null,Servlet=org.apache.cxf.js.rhino.DOMMessageProvider,WebModule=default/ViewControllerWS/1.0/car,j2eeType=GBean,name=org.apache.geronimo.cxf.pojo.POJOWebServiceContainerFactoryGBean
did not start for an unknown reason
    The service
J2EEApplication=null,WebModule=default/ViewControllerWS/1.0/car,j2eeType=Servlet,name=org.apache.cxf.js.rhino.DOMMessageProvider
did not start because the following dependent services did not start:
[default/ViewControllerWS/1.0/car?J2EEApplication=null,Servlet=org.apache.cxf.js.rhino.DOMMessageProvider,WebModule=default/ViewControllerWS/1.0/car,j2eeType=GBean,name=org.apache.geronimo.cxf.pojo.POJOWebServiceContainerFactoryGBean,
default/ViewControllerWS/1.0/car?J2EEApplication=null,WebModule=default/ViewControllerWS/1.0/car,j2eeType=Servlet,name=com.test.service.impl.ServiceImpl]
    The service
J2EEApplication=null,Servlet=org.apache.cxf.js.rhino.DOMPayloadProvider,WebModule=default/ViewControllerWS/1.0/car,j2eeType=GBean,name=org.apache.geronimo.cxf.pojo.POJOWebServiceContainerFactoryGBean
did not start for an unknown reason
    The service
J2EEApplication=null,WebModule=default/ViewControllerWS/1.0/car,j2eeType=Servlet,name=org.apache.cxf.js.rhino.DOMPayloadProvider
did not start because the following dependent services did not start:
[default/ViewControllerWS/1.0/car?J2EEApplication=null,WebModule=default/ViewControllerWS/1.0/car,j2eeType=Servlet,name=org.apache.cxf.js.rhino.DOMMessageProvider,
default/ViewControllerWS/1.0/car?J2EEApplication=null,Servlet=org.apache.cxf.js.rhino.DOMPayloadProvider,WebModule=default/ViewControllerWS/1.0/car,j2eeType=GBean,name=org.apache.geronimo.cxf.pojo.POJOWebServiceContainerFactoryGBean]
  
  	at
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:485)
  	... 41 more


Thanks,

Westhveg


Jarek Gawor-2 wrote:
> 
> You might also want to add:
> 
> <dep:filter>META-INF/cxf</dep:filter>
> 
> I don't know where org.xmlsoap.schemas.wsdl.http.AddressType comes
> from but you could try adding a filter for its package as well.
> 
> Jarek
> 
> On Mon, Jun 29, 2009 at 3:08 PM, Westhveg<we...@gmail.com> wrote:
>>
>> Jarek,
>>
>> Thanks for your reply. Setting the system property and adding
>> hidden-classes
>> in geronimo-web.xml file I get the following exception:
>>
>>
>> Install New Applications
>>  start of default/ViewControllerWS/1.0/car failed
>> org.apache.geronimo.kernel.config.LifecycleException: start of
>> default/ViewControllerWS/1.0/car failed
>>        at
>> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:580)
>>        at
>> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:544)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>        at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>        at java.lang.reflect.Method.invoke(Method.java:597)
>>        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:832)
>>        at
>> org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
>>        at
>> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
>>        at
>> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
>>        at
>> org.apache.geronimo.gbean.GBeanLifecycle$$EnhancerByCGLIB$$4b6d99b8.startConfiguration(<generated>)
>>        at
>> org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartCommand.java:67)
>>        at java.lang.Thread.run(Thread.java:619)
>> Caused by: org.apache.geronimo.kernel.config.InvalidConfigException:
>> Unknown
>> start exception
>>        at
>> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:522)
>>        at
>> org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:188)
>>        at
>> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:563)
>>        ... 14 more
>> Caused by: org.apache.geronimo.gbean.InvalidConfigurationException:
>> Configuration default/ViewControllerWS/1.0/car failed to start due to the
>> following reasons:
>>  The service
>> J2EEApplication=null,WebModule=default/ViewControllerWS/1.0/car,j2eeType=Servlet,name=CXFServlet
>> did not start because javax.servlet.ServletException:
>> javax.servlet.ServletException:
>> org.springframework.beans.factory.BeanCreationException: Error creating
>> bean
>> with name 'org.apache.cxf.wsdl.WSDLManager' defined in class path
>> resource
>> [META-INF/cxf/cxf.xml]: Instantiation of bean failed; nested exception is
>> org.springframework.beans.BeanInstantiationException: Could not
>> instantiate
>> bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]: Constructor threw
>> exception; nested exception is java.lang.ClassCastException: class
>> org.xmlsoap.schemas.wsdl.http.AddressType
>>
>>        at
>> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:485)
>>        ... 16 more
>>
>> Could you help me, please?
>>
>>
>> Thanks,
>>
>> Westhveg
>>
>>
>>
>> Jarek Gawor-2 wrote:
>>>
>>> If you are deploying a web application that contains its own CXF and
>>> Spring jars, try doing the following:
>>>
>>> 1) Set the following system property before starting the server:
>>>
>>> export
>>> GERONIMO_OPTS="-Dorg.apache.geronimo.jaxws.builder.useSimpleFinder=true"
>>>
>>> 2) Add the following hidden-classes/filters to geronimo-web.xml file:
>>>
>>>    <dep:hidden-classes>
>>>        <dep:filter>org.apache.cxf</dep:filter>
>>>        <dep:filter>org.springframework</dep:filter>
>>>        <dep:filter>META-INF/spring</dep:filter>
>>>   </dep:hidden-classes>
>>>
>>> However, if your web service is just a standard JAX-WS web service you
>>> can let Geronimo to deploy it. Just remove all CXF and Spring jars
>>> from your application and deploy it and Geronimo should be able to
>>> find your web service class.
>>>
>>> Jarek
>>>
>>> On Mon, Jun 29, 2009 at 5:22 AM, Westhveg<we...@gmail.com> wrote:
>>>>
>>>> More details about the exception:
>>>>
>>>> Caused by: org.apache.xbean.recipe.MissingFactoryMethodException:
>>>> Constructor has 5 arugments but expected 0 arguments: public
>>>> org.apache.cxf.js.rhino.DOMMessageProvider(org.mozilla.javascript.Scriptable,org.mozilla.javascript.Scriptable,java.lang.String,boolean,boolean)
>>>>        at
>>>> org.apache.xbean.recipe.ReflectionUtil.findConstructor(ReflectionUtil.java:546)
>>>>        at
>>>> org.apache.xbean.recipe.ObjectRecipe.findFactory(ObjectRecipe.java:532)
>>>>        at
>>>> org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:270)
>>>>        at
>>>> org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
>>>>        at
>>>> org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
>>>>        at
>>>> org.apache.geronimo.j2ee.annotation.Holder.newInstance(Holder.java:173)
>>>>        at
>>>> org.apache.geronimo.jaxws.annotations.AnnotationHolder.newInstance(AnnotationHolder.java:39)
>>>>        at
>>>> org.apache.geronimo.cxf.pojo.POJOEndpoint.<init>(POJOEndpoint.java:76)
>>>>        ... 75 more
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/Problem-when-deploy-CXF-WebService-%28Service-resource-injection-failed%29-tp24245804s134p24250919.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-tp24245804s134p24259358.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-tp24245804s134p24277082.html
Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.


Re: Problem when deploy CXF WebService (Service resource injection failed)

Posted by Jarek Gawor <jg...@gmail.com>.
You might also want to add:

<dep:filter>META-INF/cxf</dep:filter>

I don't know where org.xmlsoap.schemas.wsdl.http.AddressType comes
from but you could try adding a filter for its package as well.

Jarek

On Mon, Jun 29, 2009 at 3:08 PM, Westhveg<we...@gmail.com> wrote:
>
> Jarek,
>
> Thanks for your reply. Setting the system property and adding hidden-classes
> in geronimo-web.xml file I get the following exception:
>
>
> Install New Applications
>  start of default/ViewControllerWS/1.0/car failed
> org.apache.geronimo.kernel.config.LifecycleException: start of
> default/ViewControllerWS/1.0/car failed
>        at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:580)
>        at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:544)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>        at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>        at java.lang.reflect.Method.invoke(Method.java:597)
>        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:832)
>        at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
>        at
> org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
>        at
> org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
>        at
> org.apache.geronimo.gbean.GBeanLifecycle$$EnhancerByCGLIB$$4b6d99b8.startConfiguration(<generated>)
>        at
> org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartCommand.java:67)
>        at java.lang.Thread.run(Thread.java:619)
> Caused by: org.apache.geronimo.kernel.config.InvalidConfigException: Unknown
> start exception
>        at
> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:522)
>        at
> org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:188)
>        at
> org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:563)
>        ... 14 more
> Caused by: org.apache.geronimo.gbean.InvalidConfigurationException:
> Configuration default/ViewControllerWS/1.0/car failed to start due to the
> following reasons:
>  The service
> J2EEApplication=null,WebModule=default/ViewControllerWS/1.0/car,j2eeType=Servlet,name=CXFServlet
> did not start because javax.servlet.ServletException:
> javax.servlet.ServletException:
> org.springframework.beans.factory.BeanCreationException: Error creating bean
> with name 'org.apache.cxf.wsdl.WSDLManager' defined in class path resource
> [META-INF/cxf/cxf.xml]: Instantiation of bean failed; nested exception is
> org.springframework.beans.BeanInstantiationException: Could not instantiate
> bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]: Constructor threw
> exception; nested exception is java.lang.ClassCastException: class
> org.xmlsoap.schemas.wsdl.http.AddressType
>
>        at
> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:485)
>        ... 16 more
>
> Could you help me, please?
>
>
> Thanks,
>
> Westhveg
>
>
>
> Jarek Gawor-2 wrote:
>>
>> If you are deploying a web application that contains its own CXF and
>> Spring jars, try doing the following:
>>
>> 1) Set the following system property before starting the server:
>>
>> export
>> GERONIMO_OPTS="-Dorg.apache.geronimo.jaxws.builder.useSimpleFinder=true"
>>
>> 2) Add the following hidden-classes/filters to geronimo-web.xml file:
>>
>>    <dep:hidden-classes>
>>        <dep:filter>org.apache.cxf</dep:filter>
>>        <dep:filter>org.springframework</dep:filter>
>>        <dep:filter>META-INF/spring</dep:filter>
>>   </dep:hidden-classes>
>>
>> However, if your web service is just a standard JAX-WS web service you
>> can let Geronimo to deploy it. Just remove all CXF and Spring jars
>> from your application and deploy it and Geronimo should be able to
>> find your web service class.
>>
>> Jarek
>>
>> On Mon, Jun 29, 2009 at 5:22 AM, Westhveg<we...@gmail.com> wrote:
>>>
>>> More details about the exception:
>>>
>>> Caused by: org.apache.xbean.recipe.MissingFactoryMethodException:
>>> Constructor has 5 arugments but expected 0 arguments: public
>>> org.apache.cxf.js.rhino.DOMMessageProvider(org.mozilla.javascript.Scriptable,org.mozilla.javascript.Scriptable,java.lang.String,boolean,boolean)
>>>        at
>>> org.apache.xbean.recipe.ReflectionUtil.findConstructor(ReflectionUtil.java:546)
>>>        at
>>> org.apache.xbean.recipe.ObjectRecipe.findFactory(ObjectRecipe.java:532)
>>>        at
>>> org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:270)
>>>        at
>>> org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
>>>        at
>>> org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
>>>        at
>>> org.apache.geronimo.j2ee.annotation.Holder.newInstance(Holder.java:173)
>>>        at
>>> org.apache.geronimo.jaxws.annotations.AnnotationHolder.newInstance(AnnotationHolder.java:39)
>>>        at
>>> org.apache.geronimo.cxf.pojo.POJOEndpoint.<init>(POJOEndpoint.java:76)
>>>        ... 75 more
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Problem-when-deploy-CXF-WebService-%28Service-resource-injection-failed%29-tp24245804s134p24250919.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-tp24245804s134p24259358.html
> Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.
>
>

Re: Problem when deploy CXF WebService (Service resource injection failed)

Posted by Westhveg <we...@gmail.com>.
Jarek,

Thanks for your reply. Setting the system property and adding hidden-classes
in geronimo-web.xml file I get the following exception:

	
Install New Applications
 start of default/ViewControllerWS/1.0/car failed
org.apache.geronimo.kernel.config.LifecycleException: start of
default/ViewControllerWS/1.0/car failed
	at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:580)
	at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:544)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	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:832)
	at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
	at
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
	at
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
	at
org.apache.geronimo.gbean.GBeanLifecycle$$EnhancerByCGLIB$$4b6d99b8.startConfiguration(<generated>)
	at
org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartCommand.java:67)
	at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.geronimo.kernel.config.InvalidConfigException: Unknown
start exception
	at
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:522)
	at
org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:188)
	at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:563)
	... 14 more
Caused by: org.apache.geronimo.gbean.InvalidConfigurationException:
Configuration default/ViewControllerWS/1.0/car failed to start due to the
following reasons:
  The service
J2EEApplication=null,WebModule=default/ViewControllerWS/1.0/car,j2eeType=Servlet,name=CXFServlet
did not start because javax.servlet.ServletException:
javax.servlet.ServletException:
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.apache.cxf.wsdl.WSDLManager' defined in class path resource
[META-INF/cxf/cxf.xml]: Instantiation of bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not instantiate
bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]: Constructor threw
exception; nested exception is java.lang.ClassCastException: class
org.xmlsoap.schemas.wsdl.http.AddressType

	at
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:485)
	... 16 more

Could you help me, please?


Thanks,

Westhveg



Jarek Gawor-2 wrote:
> 
> If you are deploying a web application that contains its own CXF and
> Spring jars, try doing the following:
> 
> 1) Set the following system property before starting the server:
> 
> export
> GERONIMO_OPTS="-Dorg.apache.geronimo.jaxws.builder.useSimpleFinder=true"
> 
> 2) Add the following hidden-classes/filters to geronimo-web.xml file:
> 
>    <dep:hidden-classes>
>        <dep:filter>org.apache.cxf</dep:filter>
>        <dep:filter>org.springframework</dep:filter>
>        <dep:filter>META-INF/spring</dep:filter>
>   </dep:hidden-classes>
> 
> However, if your web service is just a standard JAX-WS web service you
> can let Geronimo to deploy it. Just remove all CXF and Spring jars
> from your application and deploy it and Geronimo should be able to
> find your web service class.
> 
> Jarek
> 
> On Mon, Jun 29, 2009 at 5:22 AM, Westhveg<we...@gmail.com> wrote:
>>
>> More details about the exception:
>>
>> Caused by: org.apache.xbean.recipe.MissingFactoryMethodException:
>> Constructor has 5 arugments but expected 0 arguments: public
>> org.apache.cxf.js.rhino.DOMMessageProvider(org.mozilla.javascript.Scriptable,org.mozilla.javascript.Scriptable,java.lang.String,boolean,boolean)
>>        at
>> org.apache.xbean.recipe.ReflectionUtil.findConstructor(ReflectionUtil.java:546)
>>        at
>> org.apache.xbean.recipe.ObjectRecipe.findFactory(ObjectRecipe.java:532)
>>        at
>> org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:270)
>>        at
>> org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
>>        at
>> org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
>>        at
>> org.apache.geronimo.j2ee.annotation.Holder.newInstance(Holder.java:173)
>>        at
>> org.apache.geronimo.jaxws.annotations.AnnotationHolder.newInstance(AnnotationHolder.java:39)
>>        at
>> org.apache.geronimo.cxf.pojo.POJOEndpoint.<init>(POJOEndpoint.java:76)
>>        ... 75 more
>> --
>> View this message in context:
>> http://www.nabble.com/Problem-when-deploy-CXF-WebService-%28Service-resource-injection-failed%29-tp24245804s134p24250919.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-tp24245804s134p24259358.html
Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.


Re: Problem when deploy CXF WebService (Service resource injection failed)

Posted by Westhveg <we...@gmail.com>.
In order to give us more information, I'm following this tutorial:

http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html

But I don't use the same version for all libraries (I use the highest I
found):

commons-logging-1.1.jar
 · geronimo-activation_1.1_spec-1.0-M1.jar -->
geronimo-activation_1.1_spec-1.0.2.jar
 · geronimo-annotation_1.0_spec-1.1.jar -->
geronimo-annotation_1.0_spec-1.1.1.jar
 · geronimo-javamail_1.4_spec-1.0-M1.jar -->
geronimo-javamail_1.4_spec-1.3.jar
 · geronimo-servlet_2.5_spec-1.1-M1.jar -->
geronimo-servlet_2.5_spec-1.2.jar
 · geronimo-ws-metadata_2.0_spec-1.1.1.jar -->
geronimo-ws-metadata_2.0_spec-1.1.2.jar
jaxb-api-2.0.jar
jaxb-impl-2.0.5.jar
jaxws-api-2.0.jar
 · neethi-2.0.jar --> neethi-2.0.4.jar
saaj-api-1.3.jar
saaj-impl-1.3.jar
stax-api-1.0.1.jar
 · wsdl4j-1.6.1.jar --> wsdl4j-1.6.2.jar
 · wstx-asl-3.2.1.jar --> wstx-asl-3.2.4.jar
 · XmlSchema-1.2.jar --> XmlSchema-1.4.2.jar
xml-resolver-1.2.jar

aopalliance-1.0.jar
spring-core-2.0.8.jar --> spring 2.5.6
spring-beans-2.0.8.jar --> spring 2.5.6
spring-context-2.0.8.jar --> spring 2.5.6
spring-web-2.0.8.jar --> spring 2.5.6

cxf-2.1.jar --> cxf-2.0.8.jar


 - I use cxf-2.0.8.jar because if I use higher (2.2.2), I get a exception (I
think Apache Geronimo 2.1.4 is only configured to run with cxf 2.0.8).

 - Additinally, I inform us that I export ALL of them in the WAR file.

 - I remmember my environtment:

      Windows Vista Home (don't kill me, please :P)
      Java 1.6
      Apache Geronimo (Jetty) 2.1.4
      Apache CXF 2.0.8
      Spring 2.5.6

One thing more: I'm using Geronimo with Jetty because I read that it comes
configured for CXF, while Geronimo with Tomcat comes configured for Axis2.
Is it correct?



Thanks again,

Westhveg

Westhveg wrote:
> 
> Hello RunHua Chi,
> 
> I'm using windows so I edit geronimo.bat (that is executed by eclipse
> plugin) by this way:
> 
> set GERONIMO_OPTS=%GERONIMO_OPTS% %JPDA_OPTS%
> 
> to
> 
> set GERONIMO_OPTS=-Dorg.apache.geronimo.jaxws.builder.useSimpleFinder=true
> 
> 
> Thanks,
> 
> Westhveg
> 
> 
> RunHua Chi wrote:
>> 
>> Collect the usage of org.apache.geronimo.jaxws.builder.useSimpleFinder as
>> followed into (1):
>> 
>> org.apache.geronimo.jaxws.builder.useSimpleFinder
>> Applied commands: TODO
>> Option: true, false
>> Default: not set
>> Description: Use SimpleWARWebServiceFinder to locate WebServiceInfo
>> objects,otherwise use AdvancedWARWebServiceFinder.
>> 
>> (1)
>> http://cwiki.apache.org/confluence/display/GMOxDOC22/Command+Geronimo+Options
>> 
>> Anything incorrect, please let me know.
>> 
>> Jeff C
>> 
>>>
>>> Jarek Gawor-2 wrote:
>>> >
>>> > If you are deploying a web application that contains its own CXF and
>>> > Spring jars, try doing the following:
>>> >
>>> > 1) Set the following system property before starting the server:
>>> >
>>> > export
>>> >
>>> GERONIMO_OPTS="-Dorg.apache.geronimo.jaxws.builder.useSimpleFinder=true"
>>> >
>>> > 2) Add the following hidden-classes/filters to geronimo-web.xml file:
>>> >
>>> >    <dep:hidden-classes>
>>> >        <dep:filter>org.apache.cxf</dep:filter>
>>> >        <dep:filter>org.springframework</dep:filter>
>>> >        <dep:filter>META-INF/spring</dep:filter>
>>> >   </dep:hidden-classes>
>>> >
>>> > However, if your web service is just a standard JAX-WS web service you
>>> > can let Geronimo to deploy it. Just remove all CXF and Spring jars
>>> > from your application and deploy it and Geronimo should be able to
>>> > find your web service class.
>>> >
>>> > Jarek
>>> >
>>> > On Mon, Jun 29, 2009 at 5:22 AM, Westhveg<we...@gmail.com>
>>> wrote:
>>> >>
>>> >> More details about the exception:
>>> >>
>>> >> Caused by: org.apache.xbean.recipe.MissingFactoryMethodException:
>>> >> Constructor has 5 arugments but expected 0 arguments: public
>>> >>
>>> org.apache.cxf.js.rhino.DOMMessageProvider(org.mozilla.javascript.Scriptable,org.mozilla.javascript.Scriptable,java.lang.String,boolean,boolean)
>>> >>        at
>>> >>
>>> org.apache.xbean.recipe.ReflectionUtil.findConstructor(ReflectionUtil.java:546)
>>> >>        at
>>> >>
>>> org.apache.xbean.recipe.ObjectRecipe.findFactory(ObjectRecipe.java:532)
>>> >>        at
>>> >>
>>> org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:270)
>>> >>        at
>>> >> org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
>>> >>        at
>>> >> org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
>>> >>        at
>>> >>
>>> org.apache.geronimo.j2ee.annotation.Holder.newInstance(Holder.java:173)
>>> >>        at
>>> >>
>>> org.apache.geronimo.jaxws.annotations.AnnotationHolder.newInstance(AnnotationHolder.java:39)
>>> >>        at
>>> >>
>>> org.apache.geronimo.cxf.pojo.POJOEndpoint.<init>(POJOEndpoint.java:76)
>>> >>        ... 75 more
>>> >> --
>>> >> View this message in context:
>>> >>
>>> http://www.nabble.com/Problem-when-deploy-CXF-WebService-%28Service-resource-injection-failed%29-tp24245804s134p24250919.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-tp24245804s134p24260402.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-tp24245804s134p24271898.html
Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.


Re: Problem when deploy CXF WebService (Service resource injection failed)

Posted by Westhveg <we...@gmail.com>.
Hello RunHua Chi,

I'm using windows so I edit geronimo.bat (that is executed by eclipse
plugin) by this way:

set GERONIMO_OPTS=%GERONIMO_OPTS% %JPDA_OPTS%

to

set GERONIMO_OPTS=-Dorg.apache.geronimo.jaxws.builder.useSimpleFinder=true


Thanks,

Westhveg


RunHua Chi wrote:
> 
> Collect the usage of org.apache.geronimo.jaxws.builder.useSimpleFinder as
> followed into (1):
> 
> org.apache.geronimo.jaxws.builder.useSimpleFinder
> Applied commands: TODO
> Option: true, false
> Default: not set
> Description: Use SimpleWARWebServiceFinder to locate WebServiceInfo
> objects,otherwise use AdvancedWARWebServiceFinder.
> 
> (1)
> http://cwiki.apache.org/confluence/display/GMOxDOC22/Command+Geronimo+Options
> 
> Anything incorrect, please let me know.
> 
> Jeff C
> 
>>
>> Jarek Gawor-2 wrote:
>> >
>> > If you are deploying a web application that contains its own CXF and
>> > Spring jars, try doing the following:
>> >
>> > 1) Set the following system property before starting the server:
>> >
>> > export
>> >
>> GERONIMO_OPTS="-Dorg.apache.geronimo.jaxws.builder.useSimpleFinder=true"
>> >
>> > 2) Add the following hidden-classes/filters to geronimo-web.xml file:
>> >
>> >    <dep:hidden-classes>
>> >        <dep:filter>org.apache.cxf</dep:filter>
>> >        <dep:filter>org.springframework</dep:filter>
>> >        <dep:filter>META-INF/spring</dep:filter>
>> >   </dep:hidden-classes>
>> >
>> > However, if your web service is just a standard JAX-WS web service you
>> > can let Geronimo to deploy it. Just remove all CXF and Spring jars
>> > from your application and deploy it and Geronimo should be able to
>> > find your web service class.
>> >
>> > Jarek
>> >
>> > On Mon, Jun 29, 2009 at 5:22 AM, Westhveg<we...@gmail.com>
>> wrote:
>> >>
>> >> More details about the exception:
>> >>
>> >> Caused by: org.apache.xbean.recipe.MissingFactoryMethodException:
>> >> Constructor has 5 arugments but expected 0 arguments: public
>> >>
>> org.apache.cxf.js.rhino.DOMMessageProvider(org.mozilla.javascript.Scriptable,org.mozilla.javascript.Scriptable,java.lang.String,boolean,boolean)
>> >>        at
>> >>
>> org.apache.xbean.recipe.ReflectionUtil.findConstructor(ReflectionUtil.java:546)
>> >>        at
>> >>
>> org.apache.xbean.recipe.ObjectRecipe.findFactory(ObjectRecipe.java:532)
>> >>        at
>> >>
>> org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:270)
>> >>        at
>> >> org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
>> >>        at
>> >> org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
>> >>        at
>> >>
>> org.apache.geronimo.j2ee.annotation.Holder.newInstance(Holder.java:173)
>> >>        at
>> >>
>> org.apache.geronimo.jaxws.annotations.AnnotationHolder.newInstance(AnnotationHolder.java:39)
>> >>        at
>> >> org.apache.geronimo.cxf.pojo.POJOEndpoint.<init>(POJOEndpoint.java:76)
>> >>        ... 75 more
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Problem-when-deploy-CXF-WebService-%28Service-resource-injection-failed%29-tp24245804s134p24250919.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-tp24245804s134p24260402.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-tp24245804s134p24268388.html
Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.


Re: Problem when deploy CXF WebService (Service resource injection failed)

Posted by chi runhua <ch...@gmail.com>.
Collect the usage of org.apache.geronimo.jaxws.builder.useSimpleFinder as
followed into (1):

org.apache.geronimo.jaxws.builder.useSimpleFinder
Applied commands: TODO
Option: true, false
Default: not set
Description: Use SimpleWARWebServiceFinder to locate WebServiceInfo
objects,otherwise use AdvancedWARWebServiceFinder.

(1)
http://cwiki.apache.org/confluence/display/GMOxDOC22/Command+Geronimo+Options

Anything incorrect, please let me know.

Jeff C

>
> Jarek Gawor-2 wrote:
> >
> > If you are deploying a web application that contains its own CXF and
> > Spring jars, try doing the following:
> >
> > 1) Set the following system property before starting the server:
> >
> > export
> > GERONIMO_OPTS="-Dorg.apache.geronimo.jaxws.builder.useSimpleFinder=true"
> >
> > 2) Add the following hidden-classes/filters to geronimo-web.xml file:
> >
> >    <dep:hidden-classes>
> >        <dep:filter>org.apache.cxf</dep:filter>
> >        <dep:filter>org.springframework</dep:filter>
> >        <dep:filter>META-INF/spring</dep:filter>
> >   </dep:hidden-classes>
> >
> > However, if your web service is just a standard JAX-WS web service you
> > can let Geronimo to deploy it. Just remove all CXF and Spring jars
> > from your application and deploy it and Geronimo should be able to
> > find your web service class.
> >
> > Jarek
> >
> > On Mon, Jun 29, 2009 at 5:22 AM, Westhveg<we...@gmail.com> wrote:
> >>
> >> More details about the exception:
> >>
> >> Caused by: org.apache.xbean.recipe.MissingFactoryMethodException:
> >> Constructor has 5 arugments but expected 0 arguments: public
> >>
> org.apache.cxf.js.rhino.DOMMessageProvider(org.mozilla.javascript.Scriptable,org.mozilla.javascript.Scriptable,java.lang.String,boolean,boolean)
> >>        at
> >>
> org.apache.xbean.recipe.ReflectionUtil.findConstructor(ReflectionUtil.java:546)
> >>        at
> >> org.apache.xbean.recipe.ObjectRecipe.findFactory(ObjectRecipe.java:532)
> >>        at
> >>
> org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:270)
> >>        at
> >> org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
> >>        at
> >> org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
> >>        at
> >> org.apache.geronimo.j2ee.annotation.Holder.newInstance(Holder.java:173)
> >>        at
> >>
> org.apache.geronimo.jaxws.annotations.AnnotationHolder.newInstance(AnnotationHolder.java:39)
> >>        at
> >> org.apache.geronimo.cxf.pojo.POJOEndpoint.<init>(POJOEndpoint.java:76)
> >>        ... 75 more
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Problem-when-deploy-CXF-WebService-%28Service-resource-injection-failed%29-tp24245804s134p24250919.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-tp24245804s134p24260402.html
> Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.
>
>

Re: Problem when deploy CXF WebService (Service resource injection failed)

Posted by chi runhua <ch...@gmail.com>.
I notified CXF community about doc problem, see if they can find someone to
update the tutorial.

http://www.nabble.com/Problem-in-writing-a-service-with-spring-tutorial-td24387574.html

Jeff C

On Tue, Jul 7, 2009 at 2:50 AM, Westhveg <we...@gmail.com> wrote:

>
> Jarek,
>
> Finally, it works. I've followed the second way.
>
> I have to do this:
>
>  · Remove the spring listener from web.xml
>  · Keep the spring contextConfigLocation in web.xml
>  · Keep CXF Servlet but calling my interface insted of
> 'org.apache.cxf.transport.servlet.CXFServlet'.
>
> Thanks a lot for your patience Jarek. You are my savior!
>
> And about this tutorial:
>
> http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html
>
> Is out of date. It follows the first way and neither speak nothing about
> filters in geronimo-web.xml nor
> '-Dorg.apache.geronimo.jaxws.builder.useSimpleFinder=true' system property.
>
>
> Where can I post my eclipse project with the working example?
>
>
> See u!
>
> Westhveg
>
>
> Jarek Gawor-2 wrote:
> >
> > Westhveg,
> >
> > Let's back up a little. You have two options for deploying your web
> > service:
> >
> > 1) Deploy your web application WITH all cxf and spring jars but you
> > MUST: a) start the server with
> > -Dorg.apache.geronimo.jaxws.builder.useSimpleFinder=true AND b)
> > specify a bunch of filters in geronimo-web.xml.
> >
> > or
> >
> > 2) Deploy your web application WITHOUT any cxf AND spring jars and
> > without CXFServlet in the web.xml. In this case your web application
> > should only contain the web service class and any other jars/classes
> > that the web service needs. The war file should be much smaller. Don't
> > set org.apache.geronimo.jaxws.builder.useSimpleFinder property or any
> > filters in geronimo-web.xml.
> >
> > With option 2) you are relying on the app server to deploy your web
> > service. The app server will use its own web service engine to deploy
> > and manage your web service. That's why you don't need all these
> > spring or cxf jars or the cxf servlet or cxf configuration files. With
> > option 1) you are not relying on the app server to deploy and manage
> > your web service. The web application you are deploying has it own web
> > services engine which will deploy and manage the web service. And to
> > prevent conflicts between the web app web service engine and the app
> > server web service engine you need to set those filters and that
> > property.
> >
> > Jarek
> >
> > On Mon, Jul 6, 2009 at 5:13 AM, Westhveg<we...@gmail.com> wrote:
> >>
> >> Can anyone help me, please?
> >>
> >>
> >> Thanks,
> >>
> >> Westhveg
> >>
> >>
> >> Westhveg wrote:
> >>>
> >>> And if I try to test the webservice developing this spring client:
> >>>
> >>> <?xml version="1.0" encoding="UTF-8"?>
> >>> <beans xmlns="http://www.springframework.org/schema/beans"
> >>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >>>        xmlns:jaxws="http://cxf.apache.org/jaxws"
> >>>        xsi:schemaLocation="http://www.springframework.org/schema/beans
> >>>
> >>> http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
> >>>                            http://cxf.apache.org/jaxws
> >>>                            http://cxf.apache.org/schemas/jaxws.xsd">
> >>>  <!--
> >>> If I uncomment this, I get the same exception. But if I leave it
> >>> commented, I must import FastInfoset.jar library.
> >>>
> >>>     <import resource="classpath:META-INF/cxf/cxf.xml" />
> >>>     <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
> >>>     <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
> >>> -->
> >>>       <jaxws:client id="helloWordClient"
> >>>                     serviceClass="com.test.HelloWorld"
> >>>                     address="http://localhost:8080/helloWorld" />
> >>> </beans>
> >>>
> >>>
> >>>
> >>> 30-jun-2009 23:52:33 org.apache.cxf.bus.spring.BusApplicationContext
> >>> getConfigResources
> >>> INFO: No cxf.xml configuration file detected, relying on defaults.
> >>> 30-jun-2009 23:52:34
> >>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> >>> buildServiceFromClass
> >>> INFO: Creating Service {http://test.com/}HelloWorldService<http://test.com/%7DHelloWorldService>from class
> >>> com.test.HelloWorld
> >>> 30-jun-2009 23:52:34 org.apache.cxf.phase.PhaseInterceptorChain
> >>> doIntercept
> >>> INFO: Interceptor has thrown exception, unwinding now
> >>> org.apache.cxf.interceptor.Fault: Could not send Message.
> >>>       at
> >>>
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
> >>>       at
> >>>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
> >>>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:471)
> >>>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:301)
> >>>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253)
> >>>       at
> >>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> >>>       at
> >>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:121)
> >>>       at $Proxy44.postMessage(Unknown Source)
> >>>       at com.test.TestWsClient.main(TestWsClient.java:15)
> >>> Caused by: java.io.IOException: Not Found
> >>>       at
> >>>
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2064)
> >>>       at
> >>>
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2015)
> >>>       at
> >>>
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1940)
> >>>       at
> >>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
> >>>       at
> >>> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:627)
> >>>       at
> >>>
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> >>>       ... 8 more
> >>> Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Could
> >>> not
> >>> send Message.
> >>>       at
> >>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:141)
> >>>       at $Proxy44.postMessage(Unknown Source)
> >>>       at com.test.TestWsClient.main(TestWsClient.java:15)
> >>> Caused by: java.io.IOException: Not Found
> >>>       at
> >>>
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2064)
> >>>       at
> >>>
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2015)
> >>>       at
> >>>
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1940)
> >>>       at
> >>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
> >>>       at
> >>> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:627)
> >>>       at
> >>>
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> >>>       at
> >>>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
> >>>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:471)
> >>>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:301)
> >>>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253)
> >>>       at
> >>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> >>>       at
> >>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:121)
> >>>       ... 2 more
> >>>
> >>>
> >>>
> >>>
> >>> Westhveg wrote:
> >>>>
> >>>> 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<we...@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<we...@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-tp24245804s134p24352089.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-tp24245804s134p24360881.html
> Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.
>
>

Re: Problem when deploy CXF WebService (Service resource injection failed)

Posted by Westhveg <we...@gmail.com>.
Jarek,

Finally, it works. I've followed the second way.

I have to do this:

 · Remove the spring listener from web.xml
 · Keep the spring contextConfigLocation in web.xml
 · Keep CXF Servlet but calling my interface insted of
'org.apache.cxf.transport.servlet.CXFServlet'.

Thanks a lot for your patience Jarek. You are my savior!

And about this tutorial:

http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html

Is out of date. It follows the first way and neither speak nothing about
filters in geronimo-web.xml nor
'-Dorg.apache.geronimo.jaxws.builder.useSimpleFinder=true' system property.


Where can I post my eclipse project with the working example?


See u!

Westhveg


Jarek Gawor-2 wrote:
> 
> Westhveg,
> 
> Let's back up a little. You have two options for deploying your web
> service:
> 
> 1) Deploy your web application WITH all cxf and spring jars but you
> MUST: a) start the server with
> -Dorg.apache.geronimo.jaxws.builder.useSimpleFinder=true AND b)
> specify a bunch of filters in geronimo-web.xml.
> 
> or
> 
> 2) Deploy your web application WITHOUT any cxf AND spring jars and
> without CXFServlet in the web.xml. In this case your web application
> should only contain the web service class and any other jars/classes
> that the web service needs. The war file should be much smaller. Don't
> set org.apache.geronimo.jaxws.builder.useSimpleFinder property or any
> filters in geronimo-web.xml.
> 
> With option 2) you are relying on the app server to deploy your web
> service. The app server will use its own web service engine to deploy
> and manage your web service. That's why you don't need all these
> spring or cxf jars or the cxf servlet or cxf configuration files. With
> option 1) you are not relying on the app server to deploy and manage
> your web service. The web application you are deploying has it own web
> services engine which will deploy and manage the web service. And to
> prevent conflicts between the web app web service engine and the app
> server web service engine you need to set those filters and that
> property.
> 
> Jarek
> 
> On Mon, Jul 6, 2009 at 5:13 AM, Westhveg<we...@gmail.com> wrote:
>>
>> Can anyone help me, please?
>>
>>
>> Thanks,
>>
>> Westhveg
>>
>>
>> Westhveg wrote:
>>>
>>> And if I try to test the webservice developing this spring client:
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <beans xmlns="http://www.springframework.org/schema/beans"
>>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>        xmlns:jaxws="http://cxf.apache.org/jaxws"
>>>        xsi:schemaLocation="http://www.springframework.org/schema/beans
>>>
>>> http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
>>>                            http://cxf.apache.org/jaxws
>>>                            http://cxf.apache.org/schemas/jaxws.xsd">
>>>  <!--
>>> If I uncomment this, I get the same exception. But if I leave it
>>> commented, I must import FastInfoset.jar library.
>>>
>>>     <import resource="classpath:META-INF/cxf/cxf.xml" />
>>>     <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
>>>     <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
>>> -->
>>>       <jaxws:client id="helloWordClient"
>>>                     serviceClass="com.test.HelloWorld"
>>>                     address="http://localhost:8080/helloWorld" />
>>> </beans>
>>>
>>>
>>>
>>> 30-jun-2009 23:52:33 org.apache.cxf.bus.spring.BusApplicationContext
>>> getConfigResources
>>> INFO: No cxf.xml configuration file detected, relying on defaults.
>>> 30-jun-2009 23:52:34
>>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
>>> buildServiceFromClass
>>> INFO: Creating Service {http://test.com/}HelloWorldService from class
>>> com.test.HelloWorld
>>> 30-jun-2009 23:52:34 org.apache.cxf.phase.PhaseInterceptorChain
>>> doIntercept
>>> INFO: Interceptor has thrown exception, unwinding now
>>> org.apache.cxf.interceptor.Fault: Could not send Message.
>>>       at
>>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
>>>       at
>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
>>>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:471)
>>>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:301)
>>>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253)
>>>       at
>>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>>>       at
>>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:121)
>>>       at $Proxy44.postMessage(Unknown Source)
>>>       at com.test.TestWsClient.main(TestWsClient.java:15)
>>> Caused by: java.io.IOException: Not Found
>>>       at
>>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2064)
>>>       at
>>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2015)
>>>       at
>>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1940)
>>>       at
>>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>>>       at
>>> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:627)
>>>       at
>>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>>>       ... 8 more
>>> Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Could
>>> not
>>> send Message.
>>>       at
>>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:141)
>>>       at $Proxy44.postMessage(Unknown Source)
>>>       at com.test.TestWsClient.main(TestWsClient.java:15)
>>> Caused by: java.io.IOException: Not Found
>>>       at
>>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2064)
>>>       at
>>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2015)
>>>       at
>>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1940)
>>>       at
>>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>>>       at
>>> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:627)
>>>       at
>>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>>>       at
>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
>>>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:471)
>>>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:301)
>>>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253)
>>>       at
>>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>>>       at
>>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:121)
>>>       ... 2 more
>>>
>>>
>>>
>>>
>>> Westhveg wrote:
>>>>
>>>> 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<we...@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<we...@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-tp24245804s134p24352089.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-tp24245804s134p24360881.html
Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.


Re: Problem when deploy CXF WebService (Service resource injection failed)

Posted by Jarek Gawor <jg...@gmail.com>.
Westhveg,

Let's back up a little. You have two options for deploying your web service:

1) Deploy your web application WITH all cxf and spring jars but you
MUST: a) start the server with
-Dorg.apache.geronimo.jaxws.builder.useSimpleFinder=true AND b)
specify a bunch of filters in geronimo-web.xml.

or

2) Deploy your web application WITHOUT any cxf AND spring jars and
without CXFServlet in the web.xml. In this case your web application
should only contain the web service class and any other jars/classes
that the web service needs. The war file should be much smaller. Don't
set org.apache.geronimo.jaxws.builder.useSimpleFinder property or any
filters in geronimo-web.xml.

With option 2) you are relying on the app server to deploy your web
service. The app server will use its own web service engine to deploy
and manage your web service. That's why you don't need all these
spring or cxf jars or the cxf servlet or cxf configuration files. With
option 1) you are not relying on the app server to deploy and manage
your web service. The web application you are deploying has it own web
services engine which will deploy and manage the web service. And to
prevent conflicts between the web app web service engine and the app
server web service engine you need to set those filters and that
property.

Jarek

On Mon, Jul 6, 2009 at 5:13 AM, Westhveg<we...@gmail.com> wrote:
>
> Can anyone help me, please?
>
>
> Thanks,
>
> Westhveg
>
>
> Westhveg wrote:
>>
>> And if I try to test the webservice developing this spring client:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <beans xmlns="http://www.springframework.org/schema/beans"
>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>        xmlns:jaxws="http://cxf.apache.org/jaxws"
>>        xsi:schemaLocation="http://www.springframework.org/schema/beans
>>
>> http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
>>                            http://cxf.apache.org/jaxws
>>                            http://cxf.apache.org/schemas/jaxws.xsd">
>>  <!--
>> If I uncomment this, I get the same exception. But if I leave it
>> commented, I must import FastInfoset.jar library.
>>
>>     <import resource="classpath:META-INF/cxf/cxf.xml" />
>>     <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
>>     <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
>> -->
>>       <jaxws:client id="helloWordClient"
>>                     serviceClass="com.test.HelloWorld"
>>                     address="http://localhost:8080/helloWorld" />
>> </beans>
>>
>>
>>
>> 30-jun-2009 23:52:33 org.apache.cxf.bus.spring.BusApplicationContext
>> getConfigResources
>> INFO: No cxf.xml configuration file detected, relying on defaults.
>> 30-jun-2009 23:52:34
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
>> buildServiceFromClass
>> INFO: Creating Service {http://test.com/}HelloWorldService from class
>> com.test.HelloWorld
>> 30-jun-2009 23:52:34 org.apache.cxf.phase.PhaseInterceptorChain
>> doIntercept
>> INFO: Interceptor has thrown exception, unwinding now
>> org.apache.cxf.interceptor.Fault: Could not send Message.
>>       at
>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
>>       at
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
>>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:471)
>>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:301)
>>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253)
>>       at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>>       at
>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:121)
>>       at $Proxy44.postMessage(Unknown Source)
>>       at com.test.TestWsClient.main(TestWsClient.java:15)
>> Caused by: java.io.IOException: Not Found
>>       at
>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2064)
>>       at
>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2015)
>>       at
>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1940)
>>       at
>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>>       at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:627)
>>       at
>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>>       ... 8 more
>> Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Could not
>> send Message.
>>       at
>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:141)
>>       at $Proxy44.postMessage(Unknown Source)
>>       at com.test.TestWsClient.main(TestWsClient.java:15)
>> Caused by: java.io.IOException: Not Found
>>       at
>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2064)
>>       at
>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2015)
>>       at
>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1940)
>>       at
>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>>       at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:627)
>>       at
>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>>       at
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
>>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:471)
>>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:301)
>>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253)
>>       at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>>       at
>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:121)
>>       ... 2 more
>>
>>
>>
>>
>> Westhveg wrote:
>>>
>>> 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<we...@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<we...@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-tp24245804s134p24352089.html
> Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.
>
>

Re: Problem when deploy CXF WebService (Service resource injection failed)

Posted by Westhveg <we...@gmail.com>.
Can anyone help me, please?


Thanks,

Westhveg


Westhveg wrote:
> 
> And if I try to test the webservice developing this spring client:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <beans xmlns="http://www.springframework.org/schema/beans"
>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>        xmlns:jaxws="http://cxf.apache.org/jaxws"
>        xsi:schemaLocation="http://www.springframework.org/schema/beans
>                           
> http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
>                            http://cxf.apache.org/jaxws
>                            http://cxf.apache.org/schemas/jaxws.xsd">
>  <!--
> If I uncomment this, I get the same exception. But if I leave it
> commented, I must import FastInfoset.jar library.
> 
>     <import resource="classpath:META-INF/cxf/cxf.xml" />
>     <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
>     <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
> -->
> 	<jaxws:client id="helloWordClient"
> 	              serviceClass="com.test.HelloWorld"
> 	              address="http://localhost:8080/helloWorld" />
> </beans>
> 
> 
> 
> 30-jun-2009 23:52:33 org.apache.cxf.bus.spring.BusApplicationContext
> getConfigResources
> INFO: No cxf.xml configuration file detected, relying on defaults.
> 30-jun-2009 23:52:34
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> buildServiceFromClass
> INFO: Creating Service {http://test.com/}HelloWorldService from class
> com.test.HelloWorld
> 30-jun-2009 23:52:34 org.apache.cxf.phase.PhaseInterceptorChain
> doIntercept
> INFO: Interceptor has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Could not send Message.
> 	at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
> 	at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:471)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:301)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253)
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> 	at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:121)
> 	at $Proxy44.postMessage(Unknown Source)
> 	at com.test.TestWsClient.main(TestWsClient.java:15)
> Caused by: java.io.IOException: Not Found
> 	at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2064)
> 	at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2015)
> 	at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1940)
> 	at
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
> 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:627)
> 	at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> 	... 8 more
> Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Could not
> send Message.
> 	at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:141)
> 	at $Proxy44.postMessage(Unknown Source)
> 	at com.test.TestWsClient.main(TestWsClient.java:15)
> Caused by: java.io.IOException: Not Found
> 	at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2064)
> 	at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2015)
> 	at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1940)
> 	at
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
> 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:627)
> 	at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> 	at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:471)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:301)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253)
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> 	at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:121)
> 	... 2 more
> 
> 
> 
> 
> Westhveg wrote:
>> 
>> 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<we...@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<we...@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-tp24245804s134p24352089.html
Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.


Re: Problem when deploy CXF WebService (Service resource injection failed)

Posted by Westhveg <we...@gmail.com>.
And if I try to test the webservice developing this spring client:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:jaxws="http://cxf.apache.org/jaxws"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                          
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
                           http://cxf.apache.org/jaxws
                           http://cxf.apache.org/schemas/jaxws.xsd">
 <!--
    <import resource="classpath:META-INF/cxf/cxf.xml" />
    <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
    <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
-->
	<jaxws:client id="helloWordClient"
	              serviceClass="com.test.HelloWorld"
	              address="http://localhost:8080/helloWorld" />
</beans>



30-jun-2009 23:52:33 org.apache.cxf.bus.spring.BusApplicationContext
getConfigResources
INFO: No cxf.xml configuration file detected, relying on defaults.
30-jun-2009 23:52:34
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromClass
INFO: Creating Service {http://test.com/}HelloWorldService from class
com.test.HelloWorld
30-jun-2009 23:52:34 org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not send Message.
	at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:471)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:301)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:121)
	at $Proxy44.postMessage(Unknown Source)
	at com.test.TestWsClient.main(TestWsClient.java:15)
Caused by: java.io.IOException: Not Found
	at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2064)
	at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2015)
	at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1940)
	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:627)
	at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
	... 8 more
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Could not
send Message.
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:141)
	at $Proxy44.postMessage(Unknown Source)
	at com.test.TestWsClient.main(TestWsClient.java:15)
Caused by: java.io.IOException: Not Found
	at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2064)
	at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2015)
	at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1940)
	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:627)
	at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
	at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:471)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:301)
	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253)
	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:121)
	... 2 more




Westhveg wrote:
> 
> 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<we...@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<we...@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-tp24245804s134p24280524.html
Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.


Re: Problem when deploy CXF WebService (Service resource injection failed)

Posted by Westhveg <we...@gmail.com>.
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<we...@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<we...@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.


Re: Problem when deploy CXF WebService (Service resource injection failed)

Posted by Jarek Gawor <jg...@gmail.com>.
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<we...@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<we...@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.
>
>

Re: Problem when deploy CXF WebService (Service resource injection failed)

Posted by Westhveg <we...@gmail.com>.
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<we...@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.


Re: Problem when deploy CXF WebService (Service resource injection failed)

Posted by Jarek Gawor <jg...@gmail.com>.
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<we...@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
>

Re: Problem when deploy CXF WebService (Service resource injection failed)

Posted by Westhveg <we...@gmail.com>.
Jarek,

Thanks for your reply. Setting the system property and adding hidden-classes
in geronimo-web.xml file I get the following exception:

	
Install New Applications
 start of default/ViewControllerWS/1.0/car failed
org.apache.geronimo.kernel.config.LifecycleException: start of
default/ViewControllerWS/1.0/car failed
	at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:580)
	at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:544)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	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:832)
	at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
	at
org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
	at
org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
	at
org.apache.geronimo.gbean.GBeanLifecycle$$EnhancerByCGLIB$$4b6d99b8.startConfiguration(<generated>)
	at
org.apache.geronimo.deployment.plugin.local.StartCommand.run(StartCommand.java:67)
	at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.geronimo.kernel.config.InvalidConfigException: Unknown
start exception
	at
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:522)
	at
org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:188)
	at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:563)
	... 14 more
Caused by: org.apache.geronimo.gbean.InvalidConfigurationException:
Configuration default/ViewControllerWS/1.0/car failed to start due to the
following reasons:
  The service
J2EEApplication=null,WebModule=default/ViewControllerWS/1.0/car,j2eeType=Servlet,name=CXFServlet
did not start because javax.servlet.ServletException:
javax.servlet.ServletException:
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.apache.cxf.wsdl.WSDLManager' defined in class path resource
[META-INF/cxf/cxf.xml]: Instantiation of bean failed; nested exception is
org.springframework.beans.BeanInstantiationException: Could not instantiate
bean class [org.apache.cxf.wsdl11.WSDLManagerImpl]: Constructor threw
exception; nested exception is java.lang.ClassCastException: class
org.xmlsoap.schemas.wsdl.http.AddressType

	at
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:485)
	... 16 more
	

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


Jarek Gawor-2 wrote:
> 
> If you are deploying a web application that contains its own CXF and
> Spring jars, try doing the following:
> 
> 1) Set the following system property before starting the server:
> 
> export
> GERONIMO_OPTS="-Dorg.apache.geronimo.jaxws.builder.useSimpleFinder=true"
> 
> 2) Add the following hidden-classes/filters to geronimo-web.xml file:
> 
>    <dep:hidden-classes>
>        <dep:filter>org.apache.cxf</dep:filter>
>        <dep:filter>org.springframework</dep:filter>
>        <dep:filter>META-INF/spring</dep:filter>
>   </dep:hidden-classes>
> 
> However, if your web service is just a standard JAX-WS web service you
> can let Geronimo to deploy it. Just remove all CXF and Spring jars
> from your application and deploy it and Geronimo should be able to
> find your web service class.
> 
> Jarek
> 
> On Mon, Jun 29, 2009 at 5:22 AM, Westhveg<we...@gmail.com> wrote:
>>
>> More details about the exception:
>>
>> Caused by: org.apache.xbean.recipe.MissingFactoryMethodException:
>> Constructor has 5 arugments but expected 0 arguments: public
>> org.apache.cxf.js.rhino.DOMMessageProvider(org.mozilla.javascript.Scriptable,org.mozilla.javascript.Scriptable,java.lang.String,boolean,boolean)
>>        at
>> org.apache.xbean.recipe.ReflectionUtil.findConstructor(ReflectionUtil.java:546)
>>        at
>> org.apache.xbean.recipe.ObjectRecipe.findFactory(ObjectRecipe.java:532)
>>        at
>> org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:270)
>>        at
>> org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
>>        at
>> org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
>>        at
>> org.apache.geronimo.j2ee.annotation.Holder.newInstance(Holder.java:173)
>>        at
>> org.apache.geronimo.jaxws.annotations.AnnotationHolder.newInstance(AnnotationHolder.java:39)
>>        at
>> org.apache.geronimo.cxf.pojo.POJOEndpoint.<init>(POJOEndpoint.java:76)
>>        ... 75 more
>> --
>> View this message in context:
>> http://www.nabble.com/Problem-when-deploy-CXF-WebService-%28Service-resource-injection-failed%29-tp24245804s134p24250919.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-tp24245804s134p24260402.html
Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.


Re: Problem when deploy CXF WebService (Service resource injection failed)

Posted by Jarek Gawor <jg...@gmail.com>.
If you are deploying a web application that contains its own CXF and
Spring jars, try doing the following:

1) Set the following system property before starting the server:

export GERONIMO_OPTS="-Dorg.apache.geronimo.jaxws.builder.useSimpleFinder=true"

2) Add the following hidden-classes/filters to geronimo-web.xml file:

   <dep:hidden-classes>
       <dep:filter>org.apache.cxf</dep:filter>
       <dep:filter>org.springframework</dep:filter>
       <dep:filter>META-INF/spring</dep:filter>
  </dep:hidden-classes>

However, if your web service is just a standard JAX-WS web service you
can let Geronimo to deploy it. Just remove all CXF and Spring jars
from your application and deploy it and Geronimo should be able to
find your web service class.

Jarek

On Mon, Jun 29, 2009 at 5:22 AM, Westhveg<we...@gmail.com> wrote:
>
> More details about the exception:
>
> Caused by: org.apache.xbean.recipe.MissingFactoryMethodException:
> Constructor has 5 arugments but expected 0 arguments: public
> org.apache.cxf.js.rhino.DOMMessageProvider(org.mozilla.javascript.Scriptable,org.mozilla.javascript.Scriptable,java.lang.String,boolean,boolean)
>        at
> org.apache.xbean.recipe.ReflectionUtil.findConstructor(ReflectionUtil.java:546)
>        at org.apache.xbean.recipe.ObjectRecipe.findFactory(ObjectRecipe.java:532)
>        at
> org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:270)
>        at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
>        at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
>        at org.apache.geronimo.j2ee.annotation.Holder.newInstance(Holder.java:173)
>        at
> org.apache.geronimo.jaxws.annotations.AnnotationHolder.newInstance(AnnotationHolder.java:39)
>        at org.apache.geronimo.cxf.pojo.POJOEndpoint.<init>(POJOEndpoint.java:76)
>        ... 75 more
> --
> View this message in context: http://www.nabble.com/Problem-when-deploy-CXF-WebService-%28Service-resource-injection-failed%29-tp24245804s134p24250919.html
> Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.
>
>

Re: Problem when deploy CXF WebService (Service resource injection failed)

Posted by Westhveg <we...@gmail.com>.
More details about the exception:

Caused by: org.apache.xbean.recipe.MissingFactoryMethodException:
Constructor has 5 arugments but expected 0 arguments: public
org.apache.cxf.js.rhino.DOMMessageProvider(org.mozilla.javascript.Scriptable,org.mozilla.javascript.Scriptable,java.lang.String,boolean,boolean)
	at
org.apache.xbean.recipe.ReflectionUtil.findConstructor(ReflectionUtil.java:546)
	at org.apache.xbean.recipe.ObjectRecipe.findFactory(ObjectRecipe.java:532)
	at
org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:270)
	at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
	at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
	at org.apache.geronimo.j2ee.annotation.Holder.newInstance(Holder.java:173)
	at
org.apache.geronimo.jaxws.annotations.AnnotationHolder.newInstance(AnnotationHolder.java:39)
	at org.apache.geronimo.cxf.pojo.POJOEndpoint.<init>(POJOEndpoint.java:76)
	... 75 more
-- 
View this message in context: http://www.nabble.com/Problem-when-deploy-CXF-WebService-%28Service-resource-injection-failed%29-tp24245804s134p24250919.html
Sent from the Apache Geronimo - Dev mailing list archive at Nabble.com.