Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » java.lang.UnsupportedClassVersionError: junit/textui/TestRunner (Unsupported major.minor version 49.
java.lang.UnsupportedClassVersionError: junit/textui/TestRunner (Unsupported major.minor version 49. [message #227757] Thu, 13 April 2006 13:27 Go to next message
Eclipse UserFriend
Originally posted by: codeslave.ca.ibm.com

Since moving up to the latest Eclipse I driver
( http://download.eclipse.org/eclipse/downloads/drops/I2006041 2-2041/eclipse-SDK-I20060412-2041-linux-gtk.tar.gz),
our EMF Standalone JUnit tests are now failing to run. The Eclipse N
driver from two days before, N20060410-0010, did not have this problem.

http://emf.torolab.ibm.com/tools/emf/jdk14tests/2.2.0/N20060 4130040/200604130053/testlog.txt

If I'm not mistaken
( http://www.artima.com/forums/flat.jsp?forum=1&thread=108 274,
http://forum.java.sun.com/thread.jspa?threadID=667600&me ssageID=3932387
- see 2nd reply), this means that the latest version of TestRunner is
built with JDK1.5, and output as JDK1.5 target, too
( http://java.sun.com/j2se/1.5.0/docs/tooldocs/solaris/javac.h tml - see
Cross-Compilation Options), instead of 1.4 as it was a few days ago.

I've been able to reproduce this problem outside out build environment
(on my home machine) using this script:

http://dev.eclipse.org/viewcvs/indextools.cgi/emf-home/emf-b uild/scripts/runJDK14Tests.sh

And yet, curiously, when I run these tests inside Eclipse using the UI
(Run As > JUnit Test), everything works fine (268 of 268 tests pass). Of
course within Eclipse the JUnits are running as
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner, not
junit.textui.TestRunner.

Steps to reproduce:

0. In a clean Eclipse (SDK) + EMF (SDK) install,
1. Check out all plugins under /cvsroot/tools/org.eclipse.emf/tests/,
2. Browse to org.eclipse.emf.test.build/ src/
org.eclipse.emf.test.build/ StandAloneSuites.java,
3. Right-click, "Run As > JUnit Test" using IBM JDK 1.4sr4-1 (20060209)

What can be done about this problem?

Thanks,

Nick Boldt
Re: java.lang.UnsupportedClassVersionError: junit/textui/TestRunner [Addendum] [message #227768 is a reply to message #227757] Thu, 13 April 2006 13:40 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: codeslave.ca.ibm.com

> http://emf.torolab.ibm.com/tools/emf/jdk14tests/2.2.0/N20060 4130040/200604130053/testlog.txt

For those that can't hit that server, the pertinent part of the log
(though not that educational) is:

init:

runJUnitTests:
[echo] Using StandAloneTestsDir = org.eclipse.emf.test.build
[echo] Using java = /opt/ibm-java2-1.4/bin/java
[mkdir] Created dir:
/home/www-data/jdk14tests/2.2.0/N200604130040/200604130053/j vmTest/junit
[echo] Running test org.eclipse.emf.test.build.StandAloneSuites
[mkdir] Created dir:
/home/www-data/jdk14tests/2.2.0/N200604130040/200604130053/j vmTest/junit/org.eclipse.emf.test.build.StandAloneSuites
[java] java version "1.4.2"
[java] Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2)
[java] Classic VM (build 1.4.2, J2RE 1.4.2 IBM build
cxia32142ifx-20060209 (SR4-1) (JIT enabled: jitc))

[java] The java class could not be loaded.
java.lang.UnsupportedClassVersionError: junit/textui/TestRunner
(Unsupported major.minor version 49.0)


[java] Java Result: 1

init:

runStandAloneJUnitTests:
[echo] Using StandAloneJarsDir =
/home/www-data/jdk14tests/2.2.0/N200604130040/200604130053/s tandaloneJars
[echo] Using java = /opt/ibm-java2-1.4/bin/java
[delete] Deleting directory
/home/www-data/jdk14tests/2.2.0/N200604130040/200604130053/j vmTest/junit
[mkdir] Created dir:
/home/www-data/jdk14tests/2.2.0/N200604130040/200604130053/j vmTest/junit
[echo] Running test org.eclipse.emf.test.core.AllSuites
[mkdir] Created dir:
/home/www-data/jdk14tests/2.2.0/N200604130040/200604130053/j vmTest/junit/org.eclipse.emf.test.core.AllSuites
[java] java version "1.4.2"
[java] Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2)
[java] Classic VM (build 1.4.2, J2RE 1.4.2 IBM build
cxia32142ifx-20060209 (SR4-1) (JIT enabled: jitc))

[java] The java class could not be loaded.
java.lang.UnsupportedClassVersionError: junit/textui/TestRunner
(Unsupported major.minor version 49.0)


BUILD FAILED
/home/www-data/emf-build/scripts/runJDK14Tests.xml:37: Following error
occured while executing this line
/home/www-data/emf-build/scripts/runJDK14Tests.xml:261: Following error
occured while executing this line
/home/www-data/emf-build/scripts/runJDK14Tests.xml:240: Java returned: 1
Re: java.lang.UnsupportedClassVersionError: junit/textui/TestRunner [Addendum] [message #227778 is a reply to message #227768] Thu, 13 April 2006 14:12 Go to previous messageGo to next message
Eclipse UserFriend
You are attempting to run 1.5 class files on 1.4.2 (your TestRunner must
have been compiled on 1.5)

HTH
Darins

"Nick Boldt" <codeslave@ca.ibm.com> wrote in message
news:e1m2e6$kuh$1@utils.eclipse.org...
> >
http://emf.torolab.ibm.com/tools/emf/jdk14tests/2.2.0/N20060 4130040/200604130053/testlog.txt
>
> For those that can't hit that server, the pertinent part of the log
> (though not that educational) is:
>
> init:
>
> runJUnitTests:
> [echo] Using StandAloneTestsDir = org.eclipse.emf.test.build
> [echo] Using java = /opt/ibm-java2-1.4/bin/java
> [mkdir] Created dir:
> /home/www-data/jdk14tests/2.2.0/N200604130040/200604130053/j vmTest/junit
> [echo] Running test org.eclipse.emf.test.build.StandAloneSuites
> [mkdir] Created dir:
>
/home/www-data/jdk14tests/2.2.0/N200604130040/200604130053/j vmTest/junit/org
..eclipse.emf.test.build.StandAloneSuites
> [java] java version "1.4.2"
> [java] Java(TM) 2 Runtime Environment, Standard Edition (build
1.4.2)
> [java] Classic VM (build 1.4.2, J2RE 1.4.2 IBM build
> cxia32142ifx-20060209 (SR4-1) (JIT enabled: jitc))
>
> [java] The java class could not be loaded.
> java.lang.UnsupportedClassVersionError: junit/textui/TestRunner
> (Unsupported major.minor version 49.0)
>
>
> [java] Java Result: 1
>
> init:
>
> runStandAloneJUnitTests:
> [echo] Using StandAloneJarsDir =
> /home/www-data/jdk14tests/2.2.0/N200604130040/200604130053/s tandaloneJars
> [echo] Using java = /opt/ibm-java2-1.4/bin/java
> [delete] Deleting directory
> /home/www-data/jdk14tests/2.2.0/N200604130040/200604130053/j vmTest/junit
> [mkdir] Created dir:
> /home/www-data/jdk14tests/2.2.0/N200604130040/200604130053/j vmTest/junit
> [echo] Running test org.eclipse.emf.test.core.AllSuites
> [mkdir] Created dir:
>
/home/www-data/jdk14tests/2.2.0/N200604130040/200604130053/j vmTest/junit/org
..eclipse.emf.test.core.AllSuites
> [java] java version "1.4.2"
> [java] Java(TM) 2 Runtime Environment, Standard Edition (build
1.4.2)
> [java] Classic VM (build 1.4.2, J2RE 1.4.2 IBM build
> cxia32142ifx-20060209 (SR4-1) (JIT enabled: jitc))
>
> [java] The java class could not be loaded.
> java.lang.UnsupportedClassVersionError: junit/textui/TestRunner
> (Unsupported major.minor version 49.0)
>
>
> BUILD FAILED
> /home/www-data/emf-build/scripts/runJDK14Tests.xml:37: Following error
> occured while executing this line
> /home/www-data/emf-build/scripts/runJDK14Tests.xml:261: Following error
> occured while executing this line
> /home/www-data/emf-build/scripts/runJDK14Tests.xml:240: Java returned: 1
Re: java.lang.UnsupportedClassVersionError: junit/textui/TestRunner [Addendum] [message #227796 is a reply to message #227778] Thu, 13 April 2006 15:33 Go to previous message
Eclipse UserFriend
Originally posted by: codeslave.ca.ibm.com

Thanks, Darin. I've opened bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=136734 regarding this
problem, since we need a 1.4 level TestRunner to run our 1.4 level tests
on our 1.4 level class files.

Cheers,

Nick

Darin Swanson wrote:
> You are attempting to run 1.5 class files on 1.4.2 (your TestRunner must
> have been compiled on 1.5)
Previous Topic:Searching for implementers of Abstract methods
Next Topic:Editor save as... question
Goto Forum:
  


Current Time: Sun Nov 09 14:07:42 EST 2025

Powered by FUDForum. Page generated in 0.04219 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top