Hi Charles,
As you already installed jaxb-api and jaxb-impl bundles, you need do
both
remove javax.xml.bind* package from jre-1.6 property and
remove com.sun.xml.internal.bind package from
org.osgi.framework.bootdelegation
so your org.osgi.framework.bootdelegation should be
org.osgi.framework.bootdelegation=org.apache.karaf.jaas.boot,!
com
.sun
.xml
.internal.bind.*,sun.*,com.sun.*,javax.transaction,javax.transaction.*
So that both jaxb-api and jaxb-impl could be loaded from your bundle
but not from system bundle 0.
Freeman
On 2011-7-2, at 上午1:59, Charles Moulliard wrote:
yes
javax.xml, \
#javax.xml.bind, \
#javax.xml.bind.annotation, \
#javax.xml.bind.annotation.adapters, \
#javax.xml.bind.attachment, \
#javax.xml.bind.helpers, \
#javax.xml.bind.util, \
javax.xml.crypto, \
javax.xml.crypto.dom, \
javax.xml.crypto.dsig, \
javax.xml.crypto.dsig.dom, \
javax.xml.crypto.dsig.keyinfo, \
javax.xml.crypto.dsig.spec, \
javax.xml.datatype, \
# javax.xml.namespace, \
On Fri, Jul 1, 2011 at 7:26 PM, Jean-Baptiste Onofré
<[email protected]> wrote:
So I guess you tuned your jre.properties to "exclude" the
javax.bind package
?
On 07/01/2011 07:20 PM, Charles Moulliard wrote:
[ 63] [Active ] [ ] [ ] [ 60] Apache
ServiceMix :: Specs :: JAXB API 2.2 (1.7.0)
[ 65] [Active ] [ ] [ ] [ 60] Apache
ServiceMix :: Bundles :: jaxb-impl (2.2.1.1_1)
On Fri, Jul 1, 2011 at 7:15 PM, Jean-Baptiste
Onofré<[email protected]>
wrote:
Do you use JAXB bundle or the one from the JDK ?
Regards
JB
On 07/01/2011 07:13 PM, Charles Moulliard wrote:
That does not work what you suggest.
On Fri, Jul 1, 2011 at 7:05 PM, Charles Moulliard<[email protected]
>
wrote:
cm.sun is added so I will try to remove xml.bind
org
.osgi
.framework
.bootdelegation
=
org
.apache
.karaf
.jaas.boot,sun.*,com.sun.*,javax.transaction,javax.transaction.*
On Fri, Jul 1, 2011 at 6:30 PM, Andreas
Pieber<[email protected]>
wrote:
One of two options:
1) Either you need to remove the xml.bind from your
jre.properties
or
2) You have to add com.sun... to your bootdelegation
Kind regards,
Andreas
On Fri, Jul 1, 2011 at 6:09 PM, Charles
Moulliard<[email protected]>
wrote:
Hi
Does anybody knows how to avoid this error :
Caused by: java.lang.LinkageError: loader constraint
violation: when
resolving field "DATETIME" the class loader (instance of
org/apache/felix/framework/ModuleImpl$ModuleClassLoaderJava5)
of the
referring class, javax/xml/datatype/DatatypeConstants, and
the class
loader (instance of<bootloader>) for the field's resolved type,
javax/xml/namespace/QName, have different Class objects for
that type
at
com
.sun
.xml
.bind
.v2
.model
.impl
.RuntimeBuiltinLeafInfoImpl
.<clinit>(RuntimeBuiltinLeafInfoImpl.java:259)
at
com
.sun
.xml
.bind
.v2
.model
.impl
.RuntimeTypeInfoSetImpl.<init>(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.<init>(ModelBuilder.java:
152)
at
com
.sun
.xml
.bind
.v2
.model
.impl.RuntimeModelBuilder.<init>(RuntimeModelBuilder.java:89)
at
com
.sun
.xml
.bind
.v2
.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:
456)
at
com
.sun
.xml
.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:
302)
at
com.sun.xml.bind.v2.runtime.JAXBContextImpl
$JAXBContextBuilder.build(JAXBContextImpl.java:1140)
at
com
.sun
.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
154)
at
com
.sun
.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:
121)
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
javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:
213)
at
javax.xml.bind.ContextFinder.find(ContextFinder.java:387)
at
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:618)
at
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:565)
at
org
.apache
.openejb
.jee.JAXBContextFactory.newInstance(JAXBContextFactory.java:68)
on karaf 2.2.1
Regards,
Charles Moulliard
Apache Committer
Blog : http://cmoulliard.blogspot.com
Twitter : http://twitter.com/cmoulliard
Linkedin : http://www.linkedin.com/in/charlesmoulliard
Skype: cmoulliard
---------------------------------------------
Freeman Fang
FuseSource
Email:[email protected]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com