Topic
  • 6 replies
  • Latest Post - ‏2013-12-16T22:28:48Z by 9FFQ_Ronald_Davis
bhijeet
bhijeet
10 Posts

Pinned topic LJO Error with WPF 7 Cannot instantiate Class Name

‏2011-05-25T05:56:33Z |
Hi member,

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
Updated on 2011-05-25T16:03:07Z at 2011-05-25T16:03:07Z by mburati
  • SystemAdmin
    SystemAdmin
    9029 Posts

    Re: LJO Error with WPF 7 Cannot instantiate Class Name

    ‏2011-05-25T15:54:14Z  
    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.
    http://dev.eclipse.org/mhonarc/lists/dsdp-ercp-dev/msg00220.html
  • kevintap
    kevintap
    748 Posts

    Re: LJO Error with WPF 7 Cannot instantiate Class Name

    ‏2011-05-25T15:58:12Z  
    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.
    http://dev.eclipse.org/mhonarc/lists/dsdp-ercp-dev/msg00220.html
    Yes, Sam is correct. This error indicates a that the class was compiled with a newer Java compiler than the runtime. Since WPF 7.0 is based on Java 1.5, you will need to compile your class with Java 1.5 or earlier.
  • mburati
    mburati
    2568 Posts

    Re: LJO Error with WPF 7 Cannot instantiate Class Name

    ‏2011-05-25T16:03:07Z  
    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.
    ..mb1
  • 9FFQ_Ronald_Davis
    9FFQ_Ronald_Davis
    8 Posts

    Re: LJO Error with WPF 7 Cannot instantiate Class Name

    ‏2013-12-12T16:48:57Z  
    • kevintap
    • ‏2011-05-25T15:58:12Z
    Yes, Sam is correct. This error indicates a that the class was compiled with a newer Java compiler than the runtime. Since WPF 7.0 is based on Java 1.5, you will need to compile your class with Java 1.5 or earlier.

    Kevin,

    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?

     

    Thanks,

     

    Ron

  • kevintap
    kevintap
    748 Posts

    Re: LJO Error with WPF 7 Cannot instantiate Class Name

    ‏2013-12-13T18:39:24Z  

    Kevin,

    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?

     

    Thanks,

     

    Ron

    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.

  • 9FFQ_Ronald_Davis
    9FFQ_Ronald_Davis
    8 Posts

    Re: LJO Error with WPF 7 Cannot instantiate Class Name

    ‏2013-12-16T22:28:48Z  
    • kevintap
    • ‏2013-12-13T18:39:24Z

    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.

    This worked!  Thanks Kevin!!