Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 122328

Summary: emerge of dev-java/batik-1.6 fails with "java.lang.UnsupportedClassVersionError"
Product: Gentoo Linux Reporter: matthew.cline
Component: Current packagesAssignee: Java team <java>
Status: RESOLVED INVALID    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: patch that changes RDEPEND from rhino-1.5 to rhino-1.6

Description matthew.cline 2006-02-09 17:55:33 UTC
emerge of dev-java/batik-1.6 fails with the following error:

>>> emerge (1 of 1) dev-java/batik-1.6 to /
>>> checksums files   ;-) batik-1.5.1-r4.ebuild
>>> checksums files   ;-) batik-1.5.ebuild
>>> checksums files   ;-) batik-1.6.ebuild
>>> checksums files   ;-) files/batik-1.6-jikes.patch
>>> checksums files   ;-) files/digest-batik-1.5
>>> checksums files   ;-) files/digest-batik-1.5.1-r4
>>> checksums files   ;-) files/digest-batik-1.6
>>> checksums src_uri ;-) batik-src-1.6.zip
>>> Unpacking source...
>>> Unpacking batik-src-1.6.zip to /var/tmp/portage/batik-1.6/work
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/batik-1.6/work/xml-batik ...
Buildfile: build.xml

init-args:

init:

BUILD FAILED
java.lang.UnsupportedClassVersionError: org/mozilla/javascript/Context (Unsupported major.minor version 49.0)

Total time: 2 seconds

!!! ERROR: dev-java/batik-1.6 failed.
Call stack:
  ebuild.sh, line 1894:   Called dyn_compile
  ebuild.sh, line 941:   Called src_compile

!!! compile problem
!!! If you need support, post the topmost build error, and the call stack if relevant.



Here is my emerge info:

Portage 2.1_pre4-r1 (default-linux/x86/2005.0, gcc-3.4.5, glibc-2.3.6-r2, 2.6.15-gentoo-r1 i686)
=================================================================
System uname: 2.6.15-gentoo-r1 i686 AMD Athlon(tm) XP
Gentoo Base System version 1.12.0_pre15
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5-r2, 2.4.2-r1
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=athlon-xp -mtune=athlon-xp -pipe -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/splash /etc/terminfo /etc/texmf/web2c /etc/env.d"
CXXFLAGS="-O2 -march=athlon-xp -mtune=athlon-xp -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks prelink sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.mirrors.pair.com/ http://gentoo.cites.uiuc.edu/pub/gentoo/ http://gentoo.mirrored.ca/"
MAKEOPTS="-j2"
PKGDIR="/usr/local/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X aac acpi alsa apache2 apm arts avi bash-completion bitmap-fonts bzip2 bzlib ccache cddb cdr crypt cups dbus doc eds emboss encode examples firefox flac foomaticdb fortran gif gnome gpm gstreamer gtk gtk2 hal hbci imlib innodb ithreads java jpeg jpeg2k kde kqemu libg++ libwww mad mikmod mmx mmxext motif mp3 mpeg ncurses nls nptl nvidia offensive ofx ogg oggvorbis opengl oss pam pdflib perl pic png pthreads python qt quicktime quotes readline real ruby sdl snmp source spell sse ssl svg tcltk tcpd theora truetype truetype-fonts type1-fonts vcd vim-with-x vorbis win32codecs x86 xine xml2 xmms xprint xv zlib elibc_glibc kernel_linux userland_GNU"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 1 matthew.cline 2006-02-09 18:22:38 UTC
I think this has something to do with rhino. If I change the DEPEND in the ebuild from rhino-1.5 to rhino-1.6, then the package builds just fine.
Comment 2 matthew.cline 2006-02-09 18:24:57 UTC
Created attachment 79400 [details, diff]
patch that changes RDEPEND from rhino-1.5 to rhino-1.6

patch that changes RDEPEND from rhino-1.5 to rhino-1.6
Comment 3 matthew.cline 2006-02-09 18:41:56 UTC
OK, the package builds fine with the patch, but I get this error when I try to run the SVG browser:


java.io.IOException: SAX2 driver class org.apache.xerces.parsers.SAXParser not found
	at org.apache.batik.dom.util.SAXDocumentFactory.createDocument(Unknown Source)
	at org.apache.batik.dom.util.SAXDocumentFactory.createDocument(Unknown Source)
	at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(Unknown Source)
	at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createSVGDocument(Unknown Source)
	at org.apache.batik.bridge.DocumentLoader.loadDocument(Unknown Source)
	at org.apache.batik.swing.svg.SVGDocumentLoader.run(Unknown Source)


I believe that this is the same error as reported in bug #116976

I am sure that I have the necessary class in my $CLASSPATH:

$ java-config -p | tr ':' '\n' | grep xerces
/usr/share/xerces-2/lib/xml-apis.jar
/usr/share/xerces-2/lib/xercesImpl.jar
/usr/share/xerces-2/lib/xercesSamples.jar
/usr/share/xerces-2/lib/xmlParserAPIs.jar

$ java -verbose org.apache.xerces.parsers.SAXParser | grep SAXParser
[Loaded org.apache.xerces.parsers.AbstractSAXParser]
[Loaded org.apache.xerces.parsers.SAXParser]
[Loaded org.apache.xerces.parsers.AbstractSAXParser$2]
[Loaded org.apache.xerces.parsers.AbstractSAXParser$1]
Exception in thread "main" java.lang.NoSuchMethodError: main
Comment 4 Josh Nichols (RETIRED) gentoo-dev 2006-02-09 23:44:46 UTC
This error occurs when you have compiled some packages with Java 1.5 (which is package.mask'd), and then you try to emerge packages which depend on the first package with Java 1.5.

Please see http://www.gentoo.org/proj/en/java/tiger-faq.xml.