| Author |
Message |
|
|
Post subject: JDO enhancer and Java 1.6: Bad version number in .class file
Posted: Jun 03, 2009 - 07:52 PM
|
|
Joined: Jun 03, 2009
Posts: 2
|
|
I tried to upgrade a Java web application from jdk 1.5 to jdk 1.6 and I got the following error when running the Oracle Kodo JDO enhancer on the classes generated by MyEclipse:
BUILD FAILED
C:\Documents and Settings\rsantos\My Documents\sandbox_svn\de_production\applicationserver\build.xml:79:
java.lang.IllegalArgumentException: java.lang.UnsupportedClassVersionError: Bad version number in .class file
Total time: 3 seconds
I tried on MyEclipse 5.1 and 7.1 with the same results. I use ant to run the Kodo jdo enhancer after the classes are compiled by MyEclipse.
If I configure MyEclipse to have compiler compliance level 6.0, I get the error above; if I use compiler compliance level 5.0, it works fine. Also, if I compile the same classes outside MyEclipse using the Java compiler that comes with the JDK 1.6, I don't have problems.
I opened a ticket with the Oracle Kodo support and they recommended I contacted the MyEclipse support to know if there were any issues with JDK 6. Can anyone help?
Thanks!
Rute
*** Date:
Wednesday, June 3, 2009 2:39:25 PM EDT
** System properties:
OS=WindowsXP
OS version=5.1.0
Java version=1.5.0_11
*** MyEclipse details:
MyEclipse Enterprise Workbench
Version: 7.1.1
Build id: 7.1.1-20090310
*** Eclipse details:
MyEclipse Enterprise Workbench
Version: 7.1.1
Build id: 7.1.1-20090310
Eclipse Platform
Version: 3.4.1.r341_v20080731-9I96EiDElYevwz-p1bP5z-NlAaP7vtX6Utotqsu
Build id: M20080911-1700
Eclipse Java Development Tools
Version: 3.4.1.r341_v20080709-0800-7o7tEAfEF_U5qyUgrb2HAp539P97
Build id: M20080709-0800
Eclipse Graphical Editing Framework GEF
Version: 3.4.1.v20080806-67718083A56B4H2A3213573
Build id: 200809101400
Eclipse RCP
Version: 3.4.100.r341_v20080814-989JESIEdAciFYfkZZsBfSwQ2341
Build id: M20080703-0800
Eclipse Plug-in Development Environment
Version: 3.4.1.r341_v20080731-7T7U0E9mlRIuGUYviF_VP
Build id: M20080703-0800
Eclipse startup command=-os
win32
-ws
win32
-arch
x86
-showsplash
-launcher
C:\Program Files\Genuitec\MyEclipse 7.1\myeclipse.exe
-name
Myeclipse
--launcher.library
C:\Program Files\Genuitec\MyEclipse 7.1\../Common\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.101.R34x_v20080731\eclipse_1115.dll
-startup
C:\Program Files\Genuitec\MyEclipse 7.1\../Common\plugins\org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar
-clean
-configuration
configuration
-vm
C:\Program Files\Genuitec\Common\binary\com.sun.java.jre.win32.x86_1.5.0.011\bin\client\jvm.dll |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: JDO enhancer and Java 1.6: Bad version number in .class
Posted: Jun 03, 2009 - 09:34 PM
|
|
Registered Member


Joined: Sep 17, 2004
Posts: 217
|
|
It might be helpful to know what's on line 79 of the build.xml. |
_________________ Ray
Just another MyEclipse user
|
| |
|
|
|
 |
|
|
Post subject: RE: JDO enhancer and Java 1.6: Bad version number in .class
Posted: Jun 04, 2009 - 09:15 AM
|
|
Registered Member

Joined: May 18, 2009
Posts: 1532
|
|
|
_________________ Shalini
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject: RE: JDO enhancer and Java 1.6: Bad version number in .class
Posted: Jun 04, 2009 - 08:27 PM
|
|
Joined: Jun 03, 2009
Posts: 2
|
|
Thanks so much!
What happened was that I had added the JDK 1.6 to MyEclipse "Installed JREs" but the ant build wasn't using it.
The ant build launch configuration JRE was set to 'run in the same JRE as the workspace', which I assumed was 1.6 but it was 1.5! I changed it to 'separate JRE' and entered the JDK 1.6 and it is now working fine.
Rute |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Dec 01, 2011 - 08:20 AM
|
|
Veteran Member


Joined: Oct 27, 2005
Posts: 118
|
|
Thanks, I had the same issue :) |
|
|
| |
|
|
|
 |
|
|
| |