Running JBoss-4.2.3.GA on jdk 1.7 or higher

If you’ve got problems running JBoss-4.2.3 on JDK 1.7 version or higher, beacause of

java.lang.IllegalStateException: Cannot build JAXB context ... java.lang.StackTraceElement does not have a no-arg default constructor

Than this is for you!

You get in troubles running JBoss-4.2.3 on a JDK 1.7 or higher mainly because of the JaxWS API : starting from Java 1.7, the Throwable interface gets added a new method getSuppressed() and the JBoss 4.2.3 implementation (jbossws) is based on the Java 1.6 (or 1.5). The patch (that you can download here) allows to filter out that method from the ones that jbossws considers for JaxWS Exception mappings.

Patching it is very eay and strainght forward (thanks Lukasz) and concerns the single AbstractWrapperGenerator class of the jbossws-core.jar library.

You can download from the (github) repository the Java 1.6 compiled version (.class) or you can choose to recompile it by your own (the jbossws source code can be downloaded here). I strongly suggest to replace, from that source code, only the class of interest, namely the AbstractWrapperGenerator as explained in the readme file of the git repository. The recompilation requires you adding many (really many) jars to the project classpath. You can find here an exhaustive listing of the required jars (Many stand on the different JBoss 4.2.3 server folders and some can be found on Maven central repo).

References & links

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s