Known bug between JAXB and Camel

https://issues.apache.org/jira/browse/CAMEL-4955:

https://java.net/jira/browse/JAXB-860;

basically, if using Jaxb-api; jaxb-impl version 2.2.x, and camel version before 2.10 (not yet released), it might on-off/intermittent throwing NPE exception, while parsing camel-context xml.

The NPE is about com/sun/xml/bind/v2/runtime/ClassBeanInfoImpl.checkOverrideProperties()

I have encountered above exception, on off when deploying a web application, onto Jboss 7.1.1. Because default jaxb module in jboss 7, is
C:\jboss-as-7.1.1.Final\modules\javax\xml\bind\api\main\jboss-jaxb-api_2.2_spec-1.0.3.Final

put the old versioned jaxb library into application library folder, seems solved the problem for now. I might need to exclude the jboss jaxb module in jboss-deployment-structure.xml if needed later.

some references

https://community.jboss.org/message/739232


Interesting.
It works now, I've just rolled back JAXB Version inside JBOSS.
 
If anyone has the same problem, the solution for JBOSS 7.1.1 FInal is:
 
Go into $JBOSS_HOME/modules/com/sun/xml/bind/main
delete all files (jaxb-impl-2.2.4.jar, jaxb-xjc-2.2.4.jar etc, 5 files)
 
The simplest way is to take the same module, version 2.2, from JBOSS 7.0.1, it has jaxb 2.2, just copy all 5 files from
jboss_7.0.1/modules/com/sun/xml/bind/main/*
to
jboss_7.1.1.Final/modules/com/sun/xml/bind/main/
 
I am using camel 2.9.2 again, no snapshot version (or 2.10) necessary.
 
I've started and stopped it again at least 10 times, it's working. Now I understand, why I did not get such a trouble with jboss 7.0.1.
 
it could be also helpful:
http://java.net/jira/browse/JAXB-860

Pasted from <https://community.jboss.org/message/739232> 


===============================================================

Reading between the lines I think you have encountered an incompatibility between Apache Camel and JAXB 2.2 (which is part of the standard JEE6 spec and also incorporated into Java 7).
 
It looks like the Camel folks are actively working on a fix for their 2.10.0 release.

Pasted from <https://community.jboss.org/message/739232> 

================================================================

https://issues.apache.org/jira/browse/CAMEL-4955
Due to a bug of JAXB RI included in JDK 7, (see http://java.net/jira/browse/JAXB-860)
NPE raised while creating CamelContext in camel-spring. I't a show-stopper for everyone using camel-spring with JDK 7.
related mailing list thread: http://mail-archives.apache.org/mod_mbox/camel-users/201108.mbox/%3CCAJ_S2Sn+Y692R48yrYBZoB66Pz1YPC6H-i=ZozBFPa=G54D78w@mail.gmail.com%3E


Pasted from <https://issues.apache.org/jira/browse/CAMEL-4955> 
Advertisements

Author: lwpro2

Java J2EE professional

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s