We are setting up DXA1.5(Example Site) by using the below software on Presentation Server

IBM Web sphere application server java version jdk 1.7 Apache maven 3.3.9

We are able to build the ear successfully using maven 3.3.9 and jdk 1.7, but when we are deploying in web sphere application server(jdk 1.7 is also used), get the below error. Also we have checked the below unsupported class where lambda expression is being used.

06:49:10.405 [server.startup : 1] ERROR o.s.web.context.ContextLoader - Context initialization failed org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL [wsjar:file:/webAS/installedApps/com.td.wae.tdca.ear/lib/dxa-common-api-1.5.0.jar!/com/sdl/webapp/common/api/contextengine/ContextClaims.class]; nested exception is java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=org/jetbrains/annotations/Nullable, offset=6

With reference to the below link, we have found that we should use jdk 1.7 or later for both compiling and deploying. So we have used jdk 1.7 and websphere which is compatible with jdk 1.7. But during the deployment the class ContextClaims shows bad major version error.

Could you please suggest if we need to use jdk 1.8 for compiling and executing the application or some other feasible solutions.




2 Answers 2


On the IBM Developer forum I found this answer to a similar error suggesting that your server may not be configured to run the application with java version 7.

"It doesn't matter against which JDK you are compiling, what matters is runtime. Your runtime is probably using JDK 1.6 or 1.7 and that's why you have error while trying to run classes compiled with 1.8."

The forum thread for reference: https://developer.ibm.com/answers/questions/187803/javalangunsupportedclassversionerror-jvmcfre003-ba/#


DXA uses SDL Web 8 CIL and that requires use of Java 8 (1.8 if you wish).

Next to that, there is a Known issue in DXA code that the used version of Jetbrains Annotations requires Java 8. This will be fixed in the upcoming DXA 1.6.

See https://github.com/sdl/dxa-web-application-java/issues/58


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.