There are some steps that need to be done when running in Websphere to have
its own JAX-WS stack disabled (Axis2) and make sure the classloader policy
is set to PARENT_LAST.  See:
http://cxf.apache.org/docs/application-server-specific-configuration-guide.html
You must make sure that configuration is set such that "Classes loaded with
local class loader first (parent last)" to get around the complexities
inherent in Websphere's classloading, especially when carrying JARs
relating to JAX-WS since Axis2 is built into the stack for WAS 7 and higher
(for WAS 6, it required a "Feature Pack" installation to get JAX-WS
support).  I assume you must be using WAS 7 or higher.

Also see:
http://www.jroller.com/gmazza/entry/deploying_webservices_on_websphere(Glen
Mazza has a number of very useful blogs CXF and Web Services in
general)

Hope this helps...

On Thu, May 24, 2012 at 12:21 PM, Mandal, Debdayal <
[email protected]> wrote:

> We are trying to upgrade CXF version to the latest, which is CXF 2.6.0. In
> Development we tested it in Tomcat and there was no issue, but when we are
> trying to deploy the service in Solaris WebSphere environment we are
> receiving the following error while starting the service. Any idea how to
> fix this?
>
>
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'cxf' 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.bus.spring.SpringBus]: Constructor threw
> exception; nested exception is
> org.apache.cxf.bus.extension.ExtensionException
>       at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:997)
>       at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:943)
>       at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
>       at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
>       at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
>       at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
>       at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
>       at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
>       at
> org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1093)
>       at
> org.apache.cxf.bus.spring.Jsr250BeanPostProcessor.getResourceManager(Jsr250BeanPostProcessor.java:91)
>       at
> org.apache.cxf.bus.spring.Jsr250BeanPostProcessor.postProcessBeforeInitialization(Jsr250BeanPostProcessor.java:136)
>       at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:394)
>       at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1448)
>       at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
>       ... 33 more
> Caused by: org.springframework.beans.BeanInstantiationException: Could not
> instantiate bean class [org.apache.cxf.bus.spring.SpringBus]: Constructor
> threw exception; nested exception is
> org.apache.cxf.bus.extension.ExtensionException
>       at
> org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:162)
>       at
> org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:76)
>       at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:990)
>       ... 46 more
> Caused by: org.apache.cxf.bus.extension.ExtensionException
>       at
> org.apache.cxf.bus.extension.Extension.tryClass(Extension.java:167)
>       at
> org.apache.cxf.bus.extension.Extension.getClassObject(Extension.java:179)
>       at
> org.apache.cxf.bus.extension.ExtensionManagerImpl.activateAllByType(ExtensionManagerImpl.java:138)
>       at
> org.apache.cxf.bus.extension.ExtensionManagerBus.<init>(ExtensionManagerBus.java:131)
>       at
> org.apache.cxf.bus.extension.ExtensionManagerBus.<init>(ExtensionManagerBus.java:143)
>       at org.apache.cxf.bus.spring.SpringBus.<init>(SpringBus.java:52)
>       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>       at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>       at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>       at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>       at
> org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
>       ... 48 more
> Caused by: java.lang.IncompatibleClassChangeError: Implementing class
>       at java.lang.ClassLoader.defineClass1(Native Method)
>       at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
>       at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
>       at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
>       at
> com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:773)
>       at
> com.ibm.ws.classloader.CompoundClassLoader.localFindClass(CompoundClassLoader.java:688)
>       at
> com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:511)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>       at java.lang.ClassLoader.defineClass1(Native Method)
>       at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
>       at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
>       at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
>       at
> com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:773)
>       at
> com.ibm.ws.classloader.CompoundClassLoader.localFindClass(CompoundClassLoader.java:688)
>       at
> com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:511)
>       at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>       at
> org.apache.cxf.bus.extension.Extension.tryClass(Extension.java:163)
>       ... 58 more
>
>
> Thanks,
> Deb
>
> The information contained in this e-mail and in any attachments is
> intended only for the person or entity to which it is addressed and may
> contain confidential and/or privileged material. Any review,
> retransmission, dissemination or other use of, or taking of any action in
> reliance upon, this information by persons or entities other than the
> intended recipient is prohibited. This message has been scanned for known
> computer viruses.
>



* Mark
*

Reply via email to