Apache Geronimo > Discussion Forums  User List | Dev List | Wiki | Issue Tracker  

 « Return to Thread: Problem when deploy CXF WebService (Service resource injection failed)

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

by Westhveg :: Rate this Message:

Reply to Author | View in Thread

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<westhstudios@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.
>
>

 « Return to Thread: Problem when deploy CXF WebService (Service resource injection failed)