You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Charles Moulliard <cm...@gmail.com> on 2010/01/08 12:15:10 UTC
ClassLoader issue with camel-web WAR file deployed on SMX4
When I deploy camel-web WAR in SMX4, the following error is generated :
12:11:49,265 | WARN | l Console Thread | jetty |
service.jetty.internal.JCLLogger 115 | Nested in
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected
exception parsing XML document from ServletContext resource
[/WEB-INF/applicationContext.xml]; nested exception is
java.lang.LinkageError: loader constraint violation: when resolving field
"DATETIME" the class loader (instance of
org/apache/felix/framework/ModuleImpl$ModuleClassLoader) 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:
java.lang.LinkageError: loader constraint violation: when resolving field
"DATETIME" the class loader (instance of
org/apache/felix/framework/ModuleImpl$ModuleClassLoader) 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:224)
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:1136)
at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:154)
at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:121)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory
Is it related to JAXB ?
Regards,
Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer
*****************************
blog : http://cmoulliard.blogspot.com
twitter : http://twitter.com/cmoulliard
Linkedlin : http://www.linkedin.com/in/charlesmoulliard
Apache Camel Group :
http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
Re: ClassLoader issue with camel-web WAR file deployed on SMX4
Posted by Charles Moulliard <cm...@gmail.com>.
SMX4 config.properties file defines the package which are exported by the
Java Runtime
For JRE 6, the following packages were not exported :
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, \
I have removed the comment in front of each line and remove from the WAR
files, the JAXB jars to avoid conflict.
Now , I'm confronted top another Jersey error that I will investigate :
12:39:16,875 | INFO | FelixStartLevel | WebApplicationImpl |
l.application.WebApplicationImpl 432 | Initiating Jersey application,
version 'Jersey: 1.1.1-ea 07/14/2009 07:16 PM'
12:39:17,781 | INFO | FelixStartLevel | WadlGeneratorLoader |
.wadl.config.WadlGeneratorLoader 128 | Loading wadlGenerator
com.sun.jersey.server.wadl.generators.WadlGeneratorApplicationDoc
12:39:17,796 | WARN | FelixStartLevel | WadlGeneratorLoader |
.wadl.config.WadlGeneratorLoader 173 | Configuring the
WadlGeneratorApplicationDoc with the file based property applicationDocsFile
is deprecated and will be removed in future versions of jersey! You should
use the InputStream based property instead.
12:39:17,796 | ERROR | FelixStartLevel | SpringServlet |
.container.servlet.SpringServlet 99 | Exception occurred when intialization
java.lang.RuntimeException: Could not load WadlGeneratorConfiguration, check
the configuration of com.sun.jersey.config.property.WadlGeneratorConfig
at
com.sun.jersey.api.wadl.config.WadlGeneratorConfigLoader.loadWadlGeneratorsFromConfig(WadlGeneratorConfigLoader.java:109)
at com.sun.jersey.server.impl.wadl.WadlFactory.<init>(WadlFactory.java:73)
Regards,
Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer
*****************************
blog : http://cmoulliard.blogspot.com
twitter : http://twitter.com/cmoulliard
Linkedlin : http://www.linkedin.com/in/charlesmoulliard
Apache Camel Group :
http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
On Fri, Jan 8, 2010 at 12:27 PM, Charles Moulliard <cm...@gmail.com>wrote:
> Hi Willem,
>
> I use JDK 6.0
>
> You are right --> lib folder contains JAXB jars. I will remove them and see
> if the error is still there.
>
> REMARK : I think that we should generate a WAR file for OSGI platform
> without including those jar files
>
>
> Regards,
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *****************************
> blog : http://cmoulliard.blogspot.com
> twitter : http://twitter.com/cmoulliard
> Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>
> Apache Camel Group :
> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
>
>
> On Fri, Jan 8, 2010 at 12:23 PM, Willem Jiang <wi...@gmail.com>wrote:
>
>> Hi Charles,
>>
>> It looks a JAXB issue.
>> So which version of JDK are you using?
>> BTW, camel-web shipped the JAXB 2.1.12 in its war/lib.
>>
>> Willem
>>
>>
>> Charles Moulliard wrote:
>>
>>> When I deploy camel-web WAR in SMX4, the following error is generated :
>>>
>>> 12:11:49,265 | WARN | l Console Thread | jetty
>>> |
>>> service.jetty.internal.JCLLogger 115 | Nested in
>>> org.springframework.beans.factory.BeanDefinitionStoreException:
>>> Unexpected
>>> exception parsing XML document from ServletContext resource
>>> [/WEB-INF/applicationContext.xml]; nested exception is
>>> java.lang.LinkageError: loader constraint violation: when resolving field
>>> "DATETIME" the class loader (instance of
>>> org/apache/felix/framework/ModuleImpl$ModuleClassLoader) 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:
>>> java.lang.LinkageError: loader constraint violation: when resolving field
>>> "DATETIME" the class loader (instance of
>>> org/apache/felix/framework/ModuleImpl$ModuleClassLoader) 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:224)
>>> 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:1136)
>>> at
>>> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:154)
>>> at
>>> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:121)
>>> at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory
>>>
>>> Is it related to JAXB ?
>>>
>>> Regards,
>>>
>>> Charles Moulliard
>>> Senior Enterprise Architect
>>> Apache Camel Committer
>>>
>>> *****************************
>>> blog : http://cmoulliard.blogspot.com
>>> twitter : http://twitter.com/cmoulliard
>>> Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>>>
>>> Apache Camel Group :
>>> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
>>>
>>>
>>
>
Re: ClassLoader issue with camel-web WAR file deployed on SMX4
Posted by Charles Moulliard <cm...@gmail.com>.
Hi Willem,
I use JDK 6.0
You are right --> lib folder contains JAXB jars. I will remove them and see
if the error is still there.
REMARK : I think that we should generate a WAR file for OSGI platform
without including those jar files
Regards,
Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer
*****************************
blog : http://cmoulliard.blogspot.com
twitter : http://twitter.com/cmoulliard
Linkedlin : http://www.linkedin.com/in/charlesmoulliard
Apache Camel Group :
http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
On Fri, Jan 8, 2010 at 12:23 PM, Willem Jiang <wi...@gmail.com>wrote:
> Hi Charles,
>
> It looks a JAXB issue.
> So which version of JDK are you using?
> BTW, camel-web shipped the JAXB 2.1.12 in its war/lib.
>
> Willem
>
>
> Charles Moulliard wrote:
>
>> When I deploy camel-web WAR in SMX4, the following error is generated :
>>
>> 12:11:49,265 | WARN | l Console Thread | jetty
>> |
>> service.jetty.internal.JCLLogger 115 | Nested in
>> org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected
>> exception parsing XML document from ServletContext resource
>> [/WEB-INF/applicationContext.xml]; nested exception is
>> java.lang.LinkageError: loader constraint violation: when resolving field
>> "DATETIME" the class loader (instance of
>> org/apache/felix/framework/ModuleImpl$ModuleClassLoader) 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:
>> java.lang.LinkageError: loader constraint violation: when resolving field
>> "DATETIME" the class loader (instance of
>> org/apache/felix/framework/ModuleImpl$ModuleClassLoader) 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:224)
>> 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:1136)
>> at
>> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:154)
>> at
>> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:121)
>> at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory
>>
>> Is it related to JAXB ?
>>
>> Regards,
>>
>> Charles Moulliard
>> Senior Enterprise Architect
>> Apache Camel Committer
>>
>> *****************************
>> blog : http://cmoulliard.blogspot.com
>> twitter : http://twitter.com/cmoulliard
>> Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>>
>> Apache Camel Group :
>> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
>>
>>
>
Re: ClassLoader issue with camel-web WAR file deployed on SMX4
Posted by Willem Jiang <wi...@gmail.com>.
Hi Charles,
It looks a JAXB issue.
So which version of JDK are you using?
BTW, camel-web shipped the JAXB 2.1.12 in its war/lib.
Willem
Charles Moulliard wrote:
> When I deploy camel-web WAR in SMX4, the following error is generated :
>
> 12:11:49,265 | WARN | l Console Thread | jetty |
> service.jetty.internal.JCLLogger 115 | Nested in
> org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected
> exception parsing XML document from ServletContext resource
> [/WEB-INF/applicationContext.xml]; nested exception is
> java.lang.LinkageError: loader constraint violation: when resolving field
> "DATETIME" the class loader (instance of
> org/apache/felix/framework/ModuleImpl$ModuleClassLoader) 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:
> java.lang.LinkageError: loader constraint violation: when resolving field
> "DATETIME" the class loader (instance of
> org/apache/felix/framework/ModuleImpl$ModuleClassLoader) 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:224)
> 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:1136)
> at
> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:154)
> at
> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:121)
> at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory
>
> Is it related to JAXB ?
>
> Regards,
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *****************************
> blog : http://cmoulliard.blogspot.com
> twitter : http://twitter.com/cmoulliard
> Linkedlin : http://www.linkedin.com/in/charlesmoulliard
>
> Apache Camel Group :
> http://www.linkedin.com/groups?home=&gid=2447439&trk=anet_ug_hm
>