Pinned topic LJO Error with WPF 7 Cannot instantiate Class Name
I recently installed WPF 7 and portal 7.0 on local machine and Trying to export project from WPF 6.1.5. This is working fine.
But I am getting complied error on LJO Builder as follow
Cannot instantiate Class Name: com.XYZ.test - java.lang.UnsupportedClassVersionError: (com/XYZ/test) bad major version at offset=6 MYTestConsumer.model /MYTest/WebContent/WEB-INF/models/MYTest Linked Java Object:testLJO WebSphere Portlet Factory Builder Error
Initially my compiler was 1.4, So I changed it to 1.6 also changed JRE to 1.6 on local machine.
But still I am getting same error.
I am sure many of us using WPF 7 are they getting same error ?
Even when I created new java class and new LJO Builder But no luck
Please give me any solution for the same
SystemAdmin 110000D4XK9029 Posts
Re: LJO Error with WPF 7 Cannot instantiate Class Name2011-05-25T15:54:14ZThis is the accepted answer. This is the accepted answer.I've never seen this error, but a quick Google search for
"java.lang.UnsupportedClassVersionError bad major version at offset 6"
brings back this page, which mentions modifying the compliance level.
kevintap 100000QN03749 Posts
Re: LJO Error with WPF 7 Cannot instantiate Class Name2011-05-25T15:58:12ZThis is the accepted answer. This is the accepted answer.
- SystemAdmin 110000D4XK
mburati 060000VQ202575 Posts
Re: LJO Error with WPF 7 Cannot instantiate Class Name2011-05-25T16:03:07ZThis is the accepted answer. This is the accepted answer.WPF 7.x is built with and ships with Java 1.5, since it supports versions of WebSphere AppServer and Portal Server that run on Java 1.5 and later (cannot be built with Java 1.6 or it wouldn't run on those older versions of WAS/WP). You typically get an UnsupportedClassVersionError when trying to use a Java class that was compiled with a version of Java newer than the version of Java trying to load that class (eg, built with 1.6, but trying to load it in a 1.5 JRE).
I hope that helps.
9FFQ_Ronald_Davis 2700049FFQ8 Posts
Re: LJO Error with WPF 7 Cannot instantiate Class Name2013-12-12T16:48:57ZThis is the accepted answer. This is the accepted answer.
- kevintap 100000QN03
I am having the same problem. I am using WPF8 and the JRE on my desktop if Version 7 update 45. Earlier I exported this project into my workspace and I am experiencing errors in some of the models for the project. My question. Can I find the JRE version of the Project that I exported?
kevintap 100000QN03749 Posts
Re: LJO Error with WPF 7 Cannot instantiate Class Name2013-12-13T18:39:24ZThis is the accepted answer. This is the accepted answer.
- 9FFQ_Ronald_Davis 2700049FFQ
To see what version of Java your WAR file was compiled for, you can right click your project in the Designer and select Properties. On the properties panel, click the Java Compiler tab. The settings on this tab should indicate the compatibility level that files in your project are compiled for.
The postings on this site are my own and do not necessarily represent the positions, strategies, or opinions of IBM.