On Monday, June 18, 2012 11:38:54 AM Tharindu Mathew wrote:
> Hi Ted,
> 
> Thanks for the help. Any usual suspects?
> 
> I compared the dependency tree, and it does not seem to clash.
> 
> After searching around, it looks like maybe Neethi or wsdl4j can be the
> usual suspects. I don't have Neethi as a dependency. I do have wsdl4j in
> the same path, but they are the same version.
> 
> Probably, CXF tries to bind to some "bad" version of some dependency I
> have. I will get the source for 2.5.2 and debug a bit, as this does not
> seem like a common problem.

At this location, not a common problem, no.   Not sure where to look.   It's 
possible the thread contextClassLoader is bogus.   That might have an 
effect.  Not really sure.

It's also something that may behave completely differently with CXF 2.6.1.   
Any chance you could try that?   Quite a bit of the extension loading 
changed between 2.5.x and 2.6.x and thus the error message and classloading 
and such may result in different behavior.

Dan

 
> On Mon, Jun 18, 2012 at 7:47 AM, Ted <[email protected]> wrote:
> > double check your libraries for duplicate frameworks. I think I had this
> > error briefly when I accidentally got 2 different version of either
> > spring or some dependent library in my class path.
> > 
> > 
> > On Mon, Jun 18, 2012 at 4:50 AM, Tharindu Mathew <[email protected]
> > 
> > >wrote:
> > > Hi,
> > > 
> > > I'm using Apache CXF 2.5.2 and ran across this ssue.
> > > 
> > > I'm trying to run a junit test for a jax rs service and I come across
> > 
> > this
> > 
> > > error[1]. I'm using JAXRSServerFactoryBean to initialize my server.
> > > This
> > > comes when I put this code in a main method and run it as well, so
> > > it's
> > 
> > not
> > 
> > > specific to junit.
> > > 
> > > I can run the jax rs samples fine, so I believe has to be some issue
> > > in
> > 
> > my
> > 
> > > class path. Is this correct?
> > > 
> > > Since there is no details given as to what class is producing this
> > 
> > error, I
> > 
> > > thought someone on the list can shed some light.
> > > 
> > > Thanks in advance.
> > > 
> > > 
> > > [1] -
> > > 
> > > Exception in thread "main" java.lang.IncompatibleClassChangeError:
> > > Implementing class
> > > at java.lang.ClassLoader.defineClass1(Native Method)
> > > at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
> > > at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
> > > at
> > 
> > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
> > 
> > > at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
> > > at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
> > > at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
> > > at java.security.AccessController.doPrivileged(Native Method)
> > > at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> > > at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> > > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> > > at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> > > at java.lang.ClassLoader.defineClass1(Native Method)
> > > at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
> > > at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
> > > at
> > 
> > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
> > 
> > > at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
> > > at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
> > > at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
> > > at java.security.AccessController.doPrivileged(Native Method)
> > > at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> > > at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> > > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> > > at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> > > at
> > > org.apache.cxf.bus.extension.Extension.getClassObject(Extension.java:1
> > > 49)
> > > at
> > 
> > org.apache.cxf.bus.extension.ExtensionManagerImpl.activateAllByType(Exte
> > nsionManagerImpl.java:137)> 
> > > at
> > 
> > org.apache.cxf.bus.extension.ExtensionManagerBus.<init>(ExtensionManager
> > Bus.java:131)> 
> > > at
> > 
> > org.apache.cxf.bus.extension.ExtensionManagerBus.<init>(ExtensionManager
> > Bus.java:139)> 
> > > at org.apache.cxf.bus.CXFBusFactory.createBus(CXFBusFactory.java:40)
> > > at org.apache.cxf.bus.CXFBusFactory.createBus(CXFBusFactory.java:36)
> > > at org.apache.cxf.bus.CXFBusFactory.createBus(CXFBusFactory.java:32)
> > > at
> > 
> > org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.ja
> > va:115)> 
> > > at
> > 
> > org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.ja
> > va:91)> 
> > > at
> > 
> > org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.ja
> > va:69)> 
> > > at
> > 
> > org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.ja
> > va:58)> 
> > > at org.apache.cxf.BusFactory.getDefaultBus(BusFactory.java:99)
> > > at org.apache.cxf.BusFactory.createThreadBus(BusFactory.java:165)
> > > at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:155)
> > > at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:140)
> > > at
> > 
> > org.apache.cxf.endpoint.AbstractEndpointFactory.getBus(AbstractEndpointF
> > actory.java:83)> 
> > > at
> > 
> > org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.getBus(AbstractJAXRSFactor
> > yBean.java:89)> 
> > > at
> > 
> > org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBea
> > n.java:138)> 
> > > at
> > 
> > org.wso2.carbon.eventbridge.restapi.utils.RESTUtils.main(RESTUtils.java:
> > 40)> 
> > > --
> > > Regards,
> > > 
> > > Tharindu
> > > 
> > > blog: http://mackiemathew.com/
> > 
> > --
> > Ted.
-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to