3

After installing a WAR file on a Worklight Server, I try to go to the console and have the following message :

Exception thrown by application class 'com.worklight.core.auth.impl.AuthenticationFilter.verifyServletInitialized:300' javax.servlet.ServletException: Worklight Console initialization failed.Logged Exception: java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=com/ibm/cics/MyCustomLoginModule, offset=6 at com.worklight.core.auth.impl.AuthenticationFilter.verifyServletInitialized(AuthenticationFilter.java:300) at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:111) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:194) at [internal classes]

The Worklight Studio version is uptodate : 6.1.0.01-20140427-1450 The Java SDK on Eclipse is 1.6, the WebSphere Liberty server 8.5.5.2 is running the same. The Workligth Server is 6.1.0.01

In my Worklight Application I have server-side Java code in the Worklight project

I try to delete/add the Library WebSphere Application Server V8.5 but I do not have the "Server Runtime" choice in the "Add Library..." only : - EAR Libraries - JRE System Library - JUnit - Plug-in Dependencies - User Library

Here is the error message on the Liberty server : [5/22/14 15:08:23:895 CEST] 00000021 com.ibm.ws.webcontainer.webapp E SRVE0315E: An execption occurred: com.ibm.ws.webcontainer.webapp.WebAppErrorReport: javax.servlet.ServletException: Worklight Console initialization failed.Logged Exception: java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=com/ibm/cics/MyCustomLoginModule, offset=6

Aymeric
  • 95
  • 1
  • 4
  • try running `javap -verbose MyCustomLoginModule` from the directory where it is located – guido May 22 '14 at 13:34
  • MyCustomLoginModule is inside the WAR file : GENAPPMobile.war. So it's not possible for me to run it directly on the server. – Aymeric May 22 '14 at 14:50
  • just unzip the war somewhere else; the error you get points to java version, runnung javap will get you more details – guido May 22 '14 at 15:56

1 Answers1

1

An UnsupportedClassVersionError means that the JDK version with which the class was compiled is newer than the JRE version that you use at runtime. If you compiled the class with JDK 7, without a -target option, it is normal that it doesn't run with JDK 6.

slowhand
  • 778
  • 3
  • 5
  • Very good point @slowhand ! In my Eclipse project properties I set the Compiler compliance level to 1.6 in Java Compiler -> my runtime JRE is 1.6. And now works well, I have my console ! Thanks for your help, it spent 1 day on this. – Aymeric May 23 '14 at 08:38