Click here to Skip to main content
15,888,242 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to deploy an OSGi bundle using Apache Karaf 2.3.1. I am using the following command for installing:

install webbundle:mvn:groupId/artifactId/version/war?Bundle-Activator=Activator&Import-Package=org.osgi.framework&Export-Package=com.ServiceInterface&Webapp-Context=webContext

This works ok, but when I try to start the bundle (>start id) I get this error: Caused by: java.lang.LinkageError: loader constraint violation: when resolving field "DATETIME" the class loader (instance of org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader) of the referring class, javax/xml/datatype/DatatypeConstants, and the class loader (instance of ) for the field's resolved type, faultClassLoader, have different Class objects for that type at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.(RuntimeBuiltinLeafInfoImpl.java:226) at com.sun.xml.bind.v2.model.impl.RuntimeTypeInfoSetImpl.(RuntimeTypeInfoSetImpl.java:61) at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createTypeInfoSet(RuntimeModelBuilder.java:129) at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createTypeInfoSet(RuntimeModelBuilder.java:81) at com.sun.xml.bind.v2.model.impl.ModelBuilder.(ModelBuilder.java:152) at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.(RuntimeModelBuilder.java:89) ....

I've already removed javax.xml.bind package from the jre.properties and I removed the com.sun.xml.internal.bind package from org.osgi.framework.bootdelegation in the config.properties.

Is there anything else I can do to avoid this error? Thank you!
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900