You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Cristiano Ghersi <cr...@abodata.com> on 2010/08/26 11:40:01 UTC

LinkageError starting server with CXF

Hello,

 

I'm facing up with a strange issue.

I'm using CXF under OSGI (Equinox), using the single bundle lib
(cxf-dosgi-ri-singlebundle-distribution-1.2).

I imported it into Eclipse Galileo RCP (under Windows Vista), and now it is
a plug-in project exactly as my other bundles.

 

When I start my osgi from Eclipse, all the bundles using CXF results in the
following error:

Exception in thread "CXFServerThread" java.lang.LinkageError: loader
constraint violation in interface itable initialization: when resolving
method
"org.springframework.beans.factory.support.AbstractBeanFactory.getParentBean
Factory()Lorg/springframework/beans/factory/BeanFactory;" the class loader
(instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of
the current class,
org/springframework/beans/factory/support/AbstractBeanFactory, and the class
loader (instance of
org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) for interface
org/springframework/beans/factory/HierarchicalBeanFactory have different
Class objects for the type org/springframework/beans/factory/BeanFactory
used in the signature

      at
org.springframework.context.support.AbstractRefreshableApplicationContext.cr
eateBeanFactory(AbstractRefreshableApplicationContext.java:176)

      at
org.springframework.context.support.AbstractRefreshableApplicationContext.re
freshBeanFactory(AbstractRefreshableApplicationContext.java:121)

      at
org.springframework.context.support.AbstractApplicationContext.obtainFreshBe
anFactory(AbstractApplicationContext.java:422)

      at
org.springframework.context.support.AbstractApplicationContext.refresh(Abstr
actApplicationContext.java:352)

      at
org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext
.java:91)

      at
org.apache.cxf.bus.spring.SpringBusFactory.createApplicationContext(SpringBu
sFactory.java:102)

      at
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:9
3)

      at
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:8
6)

      at
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:6
4)

      at
org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:5
3)

      at org.apache.cxf.BusFactory.getDefaultBus(BusFactory.java:69)

      at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:106)

      at org.apache.cxf.BusFactory.getThreadDefaultBus(BusFactory.java:97)

      at
org.apache.cxf.jaxws.spi.ProviderImpl.createEndpoint(ProviderImpl.java:86)

      at
org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.
java:109)

      at javax.xml.ws.Endpoint.publish(Endpoint.java:47)

      at bundlecxfserver.CXFServerThread.run(CXFServerThread.java:119)

      at java.lang.Thread.run(Unknown Source)

 

Obviously this error precludes the correct behavior of my application,
although all the bundles seems running (state ACTIVE).

 

The unbelievable thing is that if I open the MANIFEST.MF file of the
cxf-dosgi-ri-singlebundle-distribution-1.2 bundle and "touch" it (e.g.
adding a space at the end of a line in the middle of the file), at the next
start of my app, all runs perfectly.

If I restart my app, the previous error occurs.

So I need to touch the MANIFEST.MF file every time I restart my app in order
to make it run.

 

Any hint about this behavior?

 

Thank you very much!

Best regards


Cristiano Ghersi