开发者

How to resolve Java LinkageError Exception?

开发者 https://www.devze.com 2023-03-26 06:12 出处:网络
I am developing an application for WebSphere 6.0 which uses a Java servlet.After deploying and running my application, I am receiving a LinkageError of the following type (from the server log):

I am developing an application for WebSphere 6.0 which uses a Java servlet.After deploying and running my application, I am receiving a LinkageError of the following type (from the server log):

E开发者_运维问答rror 500: java.lang.LinkageError: LinkageError while defining class: student.operation.Action Could not be defined due to: student/operation/Action (Unsupported major.minor version 50.0) 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. Dumping the current context classloader hierarchy: ==> indicates defining classloader ==>[0] com.ibm.ws.classloader.CompoundClassLoader@666bc7e8 Local ClassPath: E:\Program Files\IBM\SDP\runtimes\base_v6\profiles\WTE_APPSRV61\installedApps\gh-vdikcisv206Node1Cell\DefaultEAR.ear\Student.war\WEB-INF\classes;E:\Program Files\IBM\SDP\runtimes\base_v6\profiles\WTE_APPSRV61\installedApps\gh-vdikcisv206Node1Cell\DefaultEAR.ear\Student.war\WEB-INF\lib\asm.jar;E:\Program Files\IBM\SDP\runtimes\base_v6\profiles\WTE_APPSRV61\installedApps\gh-vdikcisv206Node1Cell\DefaultEAR.ear\Student.war\WEB-INF\lib\c3p0-0.9.0.4.jar;


LinkageError while defining class: student.operation.Action Could not be defined due to: student/operation/Action (Unsupported major.minor version 50.0)

Class student.operation.Action has been compiled under Java 6 (50.0 corresponds to JDK 1.6 compiled class version), but you are using a lower version of JVM/JRE at runtime.

Make sure your runtime environment is also JDK 1.6


Adding to Nivas answer, Please check whether you are also including the same student.operation.action in any other jars during deployment.

If you are want to run a JDK6 compiled class in JDK5 pass -source option during compilation.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号