This thread has been locked & this forum has been archived.
Please post new topics to Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Author Message
rusantos



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
 
 View user's profile Send private message  
Reply with quote Back to top
rmcvay
Registered Member
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
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
support-shalini
Registered Member
Registered Member


Joined: May 18, 2009
Posts: 1532

Rute,
Quote:

java.lang.IllegalArgumentException: java.lang.UnsupportedClassVersionError: Bad version number in .class file

UnsupportedClassVersionError occurs when there is a conflict in the versions of JDK.
What is the JDK version you are using in your ant script to run Oracle Kodo JDO enhancer?
To configure MyEclipse default JDK, refer to the following post
https://www.myeclipseide.com/index.php?name=PNphpBB2&file=viewtopic&t=22432&start=0&postdays=0&postorder=asc&highlight=

_________________
Shalini
MyEclipse Support
 
 View user's profile Send private message  
Reply with quote Back to top
rusantos



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
 
 View user's profile Send private message  
Reply with quote Back to top
cusdx
Veteran Member
Veteran Member


Joined: Oct 27, 2005
Posts: 118

Thanks, I had the same issue :)
 
 View user's profile Send private message  
Reply with quote Back to top
All times are GMT - 6 Hours
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
® 2014 - Genuitec, LLC.