Upgrade Java 6 to Java 8

Viewed 3055

As per the project requirement, i need to upgrade my JDK1.6.0_45 to JDK1.8.

I am using JBOSS 4.2.3.GA, once i am pointing to JDK1.8 bin and trying to compile the project it is throwing the below error: ERROR [org.jboss.deployment.MainDeployer] Could not start deployment: file:/C:/jboss-4.2.3.GA/jboss-4.2.3.GA/server/default/deploy/web.ear/facade.jar java.lang.IllegalStateException: Cannot build JAXB context

How can i fix this issue ?

Or any idea to migrate from JDK1.6 to JDK1.8 ,what action i need to take ?

2 Answers

For starters you're going to also need to upgrade to a newer JBoss. Everything up to JBoss AS 7 does not run on Java 8, so you'll need at least Wildfly 8.

Similarly, if you want Java 9 you'll need Wildfly 11.

There will many other problems when you are migrating from 1.6 to 1.8, but this looks like You're using JAXB incompatible classes.

Please use the following maven dependency or switch to jaxb version 2.3.0

<!-- https://mvnrepository.com/artifact/com.sun.xml.bind/jaxb-impl -->
<dependency>
    <groupId>com.sun.xml.bind</groupId>
    <artifactId>jaxb-impl</artifactId>
    <version>2.3.0</version>
</dependency>
Related