I am using WebSphere Development Studio Client for iSeries version 7 and have the following problem with the set-up for web development.
When trying to access any class from a JSP, I get the error:
"....bad major version at offset=6
This is often caused by having a class defined at multiple
locations within the classloader hierarchy. Other potential causes
include compiling against an older or newer version of the class
that has an incompatible method signature."
Though the error message (as well as reports of similar problems by others) indicate that there's a version mismatch, it looks to me like I don't have a mismatch. The Java Build Path uses the jrel.6.0_02 JRE and the compiler compliance level is 6.0. (Other 6.x JREs have been tried with the same results.)
This error happens no matter how the class is accessed, such as when a class is in an import statement or when the 'action' attribute in the FORM tag points to a servlet.
I'm running on the localhost application server
When these classes (the beans, not the servlets) are accessed in a pure Java application, there is no problem with the class version.
Can you suggest any solutions? Are there are preferences/properties that need to be set? Other jar files to include?
The stack trace is attached, and the classpath file is shown below.
Thanks for any help that you can provide.
The classpath file:
<?xml version="1.0" encoding="UTF-8"?>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry exported="true" kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jnlp-servlet.jar"/>
<classpathentry kind="lib" path="/lib/lib/ext/servlet.jar"/>
<classpathentry kind="lib" path="WebContent/WEB-INF/lib/jt400.jar"/>
<classpathentry kind="lib" path="/lib/lib/ext/junit.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
<classpathentry kind="lib" path="C:/Program Files/IBM/SDP70Shared/plugins/com.ibm.websphere.v6_6.0.100/lib/webcontainer.jar"/>
<classpathentry kind="var" path="J2EE_LIB"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="WebContent/WEB-INF/classes"/>
This topic has been locked.
2 replies Latest Post - 2008-09-04T17:55:39Z by SystemAdmin
Pinned topic Error message "bad major version at offset=6"
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2008-09-04T17:55:39Z at 2008-09-04T17:55:39Z by SystemAdmin
Re: Error message "bad major version at offset=6"2008-09-04T17:55:39Z in response to SystemAdminIf you are compiling your code using Eclipse be sure to change the compliance level in the compiler to a level that is less of equal to the jre level running your code.