Sunday, February 14, 2016

Resolving BCEL Issue on JiBX 1.2.5 with JDK 1.8 on Apache Maven [Error loading class java.lang.CharSequence]

So, I spent some time on resolving this issue with a combination of the following:

1. JiBX 1.2.5 / JiBX 1.2.6
2. JDK 1.8


During the jibx-maven-plugin:bind phase of the Maven Build, you may get an error when you upgrade from JDK 1.x to JDK 1.8;The issue will manifest in the following most common form/error:
Failed to execute goal org.jibx:jibx-maven-plugin:1.2.5:bind (bind-compile) on project common: Error loading class java.lang.CharSequence: Error reading path java/lang/CharSequence.class for class java.lang.CharSequence


You can modify your pom.xml, to make these changes to fix this error.

1. Include the Repository for BCEL 6.0



2. Check the version of JiBX [Choose any of 1.2.5 or 1.2.6]


3. Exclude default 'BCEL' from the Build


4. See the modifications for the plugin 'jibx-maven-plugin'




5. Voila!

No comments: