Summary: | ant-tasks-1.6.5-r2 make a java.lang.UnsupportedClassVersionError: antlr/Tool | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Nicolas Lalevee <hibou> |
Component: | New packages | Assignee: | Java team <java> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | daemon, wiselynx.naima |
Priority: | High | ||
Version: | 2006.0 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Nicolas Lalevee
2006-07-02 02:46:56 UTC
I have also tried to go directly to the working directory : /var/tmp/portage/ant-tasks-1.6.5-r2/work/apache-ant-1.6.5 Then I tried to just do a "ant", and it just build fine. I have also tried to do the generated command line, and I get a different error : i6000 apache-ant-1.6.5 # CLASSPATH=/opt/blackdown-jdk-1.4.2.03/lib/tools.jar:.:/usr/share/ant-core/lib/ant-launcher.jar:/usr/share/ant-core/lib/ant.jar:/usr/share/ant-core/lib/ant-launcher.jar:/usr/share/ant-core/lib/ant.jar:/usr/share/junit/lib/junit.jar:/usr/share/antlr/lib/antlr.jar:/usr/share/bcel/lib/bcel.jar:/usr/share/commons-beanutils-1.6/lib/commons-beanutils.jar:/usr/share/bsh/lib/bsh.jar:/usr/share/bsf-2.3/lib/bsf.jar:/usr/share/commons-logging/lib/commons-logging.jar:/usr/share/commons-logging/lib/commons-logging-api.jar:/usr/share/commons-net/lib/commons-net.jar:/usr/share/jdepend/lib/jdepend.jar:/usr/share/jsch/lib/jsch.jar:/usr/share/jython/lib/jython.jar:/usr/share/log4j/lib/log4j.jar:/usr/share/jakarta-oro-2.0/lib/jakarta-oro.jar:/usr/share/jakarta-regexp-1.3/lib/jakarta-regexp.jar:/usr/share/rhino-1.5/lib/js.jar:/usr/share/xalan/lib/xalan.jar:/usr/share/xalan/lib/serializer.jar:/usr/share/xerces-2/lib/xercesSamples.jar:/usr/share/xerces-2/lib/xercesImpl.jar:/usr/share/xerces-2/lib/xml-apis.jar java org.apache.tools.ant.launch.Launcher -Dant.install=/usr/share/ant-core Buildfile: build.xml prepare: check_for_optional_packages: build: [mkdir] Created dir: /var/tmp/portage/ant-tasks-1.6.5-r2/work/apache-ant-1.6.5/build [mkdir] Created dir: /var/tmp/portage/ant-tasks-1.6.5-r2/work/apache-ant-1.6.5/build/classes [mkdir] Created dir: /var/tmp/portage/ant-tasks-1.6.5-r2/work/apache-ant-1.6.5/build/lib [javac] Compiling 638 source files to /var/tmp/portage/ant-tasks-1.6.5-r2/work/apache-ant-1.6.5/build/classes [javac] /var/tmp/portage/ant-tasks-1.6.5-r2/work/apache-ant-1.6.5/src/main/org/apache/tools/ant/AntClassLoader.java:19: cannot access java.io.ByteArrayOutputStream [javac] bad class file: /opt/sun-jdk-1.5.0.07/jre/lib/rt.jar(java/io/ByteArrayOutputStream.class) [javac] class file has wrong version 49.0, should be 48.0 [javac] Please remove or make sure it appears in the correct subdirectory of the classpath. [javac] import java.io.ByteArrayOutputStream; [javac] ^ [javac] 1 error BUILD FAILED /var/tmp/portage/ant-tasks-1.6.5-r2/work/apache-ant-1.6.5/build.xml:606: Compile failed; see the compiler error output for details. Total time: 4 seconds Then I try to change the jdk to the sun-1.5 one, and it build fine too : i6000 apache-ant-1.6.5 # CLASSPATH=/opt/sun-jdk-1.5.0.07/lib/tools.jar:.:/usr/share/ant-core/lib/ant-launcher.jar:/usr/share/ant-core/lib/ant.jar:/usr/share/ant-core/lib/ant-launcher.jar:/usr/share/ant-core/lib/ant.jar:/usr/share/junit/lib/junit.jar:/usr/share/antlr/lib/antlr.jar:/usr/share/bcel/lib/bcel.jar:/usr/share/commons-beanutils-1.6/lib/commons-beanutils.jar:/usr/share/bsh/lib/bsh.jar:/usr/share/bsf-2.3/lib/bsf.jar:/usr/share/commons-logging/lib/commons-logging.jar:/usr/share/commons-logging/lib/commons-logging-api.jar:/usr/share/commons-net/lib/commons-net.jar:/usr/share/jdepend/lib/jdepend.jar:/usr/share/jsch/lib/jsch.jar:/usr/share/jython/lib/jython.jar:/usr/share/log4j/lib/log4j.jar:/usr/share/jakarta-oro-2.0/lib/jakarta-oro.jar:/usr/share/jakarta-regexp-1.3/lib/jakarta-regexp.jar:/usr/share/rhino-1.5/lib/js.jar:/usr/share/xalan/lib/xalan.jar:/usr/share/xalan/lib/serializer.jar:/usr/share/xerces-2/lib/xercesSamples.jar:/usr/share/xerces-2/lib/xercesImpl.jar:/usr/share/xerces-2/lib/xml-apis.jar java org.apache.tools.ant.launch.Launcher -Dant.install=/usr/share/ant-core Buildfile: build.xml [....] main: BUILD SUCCESSFUL Total time: 15 seconds /me getting confused about the different errors... At some point, you must have been using 1.5 as your system VM while it was package.mask. As you are seeing now, it causes some problems, and hence was masked :) But now, the new system should handle it a lot better. However, you need to repair the damage it did in the past. Generally, this means making sure to follow the upgrade guide: http://www.gentoo.org/proj/en/java/java-upgrade.xml Specifically, this means using the java-1.5-fixer script described in said guide to make sure everything that was compiled with 1.5 gets compiled with 1.4. *** Bug 141189 has been marked as a duplicate of this bug. *** *** Bug 141265 has been marked as a duplicate of this bug. *** |