Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 143193 - commons-digester-1.7-r1 fails with new Java system
Summary: commons-digester-1.7-r1 fails with new Java system
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-08 03:57 UTC by Jan Schnackenberg
Modified: 2006-09-06 04:03 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Schnackenberg 2006-08-08 03:57:56 UTC
emerge -avuDN world just (repeatedly) died at commons-digester-1.7-r1 with this message:
-----------------------snipp----------------------------
test.digester:
     [echo] Running basic Digester tests ...
     [java] Exception in thread "main" java.lang.NoClassDefFoundError: junit/textui/TestRunner

BUILD FAILED
/var/tmp/portage/commons-digester-1.7-r1/work/commons-digester-1.7-src/build.xml:314: Java returned: 1

Total time: 1 minute 0 seconds

!!! ERROR: dev-java/commons-digester-1.7-r1 failed.
Call stack:
  ebuild.sh, line 1539:   Called dyn_compile
  ebuild.sh, line 939:   Called src_compile
  commons-digester-1.7-r1.ebuild, line 45:   Called eant 'jar' 'javadoc' 'test' '-Djunit.jar=:/usr/share/junit/lib/junit.jar' '-Dcommons-beanutils.jar=/usr/share/commons-beanutils-1.6/lib/commons-beanutils.jar' '-Dcommons-collections.jar=:/usr/share/commons-collections/lib/commons-collections.jar' '-Dcommons-logging.jar=/usr/share/commons-logging/lib/commons-logging.jar'
  java-utils-2.eclass, line 1267:   Called die

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

!!! When you file a bug report, please include the following information:
GENTOO_VM=sun-jdk-1.5  CLASSPATH="" JAVA_HOME="/opt/sun-jdk-1.5.0.07"
JAVACFLAGS="-source 1.4 -target 1.4" COMPILER="javac"
and of course, the output of emerge --info
-----------------------snipp----------------------------

java-config outputs:
# java-config-1 -L
[sun-jdk-1.4.2.12] "Sun JDK 1.4.2.12" (/etc/env.d/java/20sun-jdk-1.4.2.12) *
# java-config-2 -L
*) Sun JDK 1.4.2.12 [sun-jdk-1.4] (/usr/share/java-config-2/vm/sun-jdk-1.4)
2) Sun JDK 1.5.0.07 [sun-jdk-1.5] (/usr/share/java-config-2/vm/sun-jdk-1.5)

-----------------------snipp----------------------------

java-check-environment doesn't find anything wrong. I did an 'env-update && source /etc/profile', but it didn't help anything.

To me it looks as though the ebuild tries to mix java 1.4 and 1.5.

-----------------------snipp----------------------------

emerge --info:
Portage 2.1-r1 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.3.6-r4, 2.6.16-gentoo-r13 i686)
=================================================================
System uname: 2.6.16-gentoo-r13 i686 Pentium III (Coppermine)
Gentoo Base System version 1.6.15
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
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-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -O3 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-march=pentium3 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache confcache distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="de_DE.UTF-8"
LC_ALL="de_DE.UTF-8"
LINGUAS="de"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 X aac aalib acl acpi alsa apache2 apm arts artswrappersuid asf avi berkdb bitmap-fonts browserplugin bzip2 cairo cdda cddb cdparanoia cdr cjk cli cpudetection crypt css cups curl daap dba dbus devfs26 dga dlloader doc dpms dri dv dvd dvdr dvdread emboss encode esd exif expat fam ffmpeg firefox flac font-server foomaticdb fortran ftp gd gdbm gif gimp gimpprint gkrellm glut gmail gmp gnokii gphoto2 gpm gstreamer gtk gtk2 gtkhtml hal hbci i8x0 icq idn imagemagick imap imlib imlib2 innodb ipv6 irda isdnlog jabber java javascript jce jpeg jpeg2k junit kde kdepim kdexdeltas latex lcms libg++ libwww live lm_sensors logitech-mouse lua lzo m17n-lib mad mhash mikmod mjpeg mmx mng motif mozcalendar mozdevelop mozilla mozsvg mozxmlterm mp3 mpeg mpeg4 mplayer msdav musicbrainz mysql ncurses nls no-old-linux nptl nptlonly nsplugin odbc ogg opengl oracle oss pam pascal pcre pda pdf pear perl php png povray ppds pppd print python qt qt3 qt4 quicktime rar rdesktop readline real reflection ruby samba scanner sdl session shout skins slang sndfile speedo speex spell spl sqlite sse ssl stream subtitles svg svga svgz tcltk tcpd tetex theora tidy tiff transcode truetype truetype-fonts type1-fonts udev uml unicode usb userlocales vcd vidix visualization vorbis win32codecs wmf xface xine xml xml2 xmms xorg xosd xpm xrandr xscreensaver xv xvid zeroconf zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux linguas_de userland_GNU video_cards_r128 video_cards_vesa video_cards_fbdev"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-08-08 04:10:41 UTC
(In reply to comment #0)
> To me it looks as though the ebuild tries to mix java 1.4 and 1.5.

I don't think so. But you could run java-1.5-fixer to be sure none of the deps were built with 1.4.
Otherwise, I can't reproduce it, but as a workaround you could build it without "junit" useflag. What's your installed junit, ant-core and ant-tasks versions?
Comment 2 Jan Schnackenberg 2006-08-08 04:54:26 UTC
# java-1.5-fixer
 * Generating a list of jars which ant uses ...                                                                                        [ ok ]
 * Checking for > 1.4 bytecode in ant jars ...                                                                                         [ ok ]
 * Generating a list of jars in the system ...                                                                                         [ ok ]
 * Checking for > 1.4 bytecode in system jars ...                                                                                      [ ok ]
 * Congratulations! All system jars are right as rain.

Seems to be ok...

*  dev-java/junit
      Latest version available: 3.8.1-r1
      Latest version installed: 3.8.1-r1
*  dev-java/ant-core
      Latest version available: 1.6.5-r13
      Latest version installed: 1.6.5-r13
*  dev-java/ant-tasks
      Latest version available: 1.6.5-r2
      Latest version installed: 1.6.5-r2
Comment 3 Petteri Räty (RETIRED) gentoo-dev 2006-08-08 12:34:50 UTC
(In reply to comment #0)
> emerge -avuDN world just (repeatedly) died at commons-digester-1.7-r1 with this
> message:
> -----------------------snipp----------------------------
> test.digester:
>      [echo] Running basic Digester tests ...
>      [java] Exception in thread "main" java.lang.NoClassDefFoundError:
> junit/textui/TestRunner
> 
> BUILD FAILED

This means that junit.textui.TestRunner java class is not in the Classpath so that is would be available for tests. I can't reproduce this but I will keep trying.

Comment 4 Jan Schnackenberg 2006-08-09 01:27:25 UTC
> This means that junit.textui.TestRunner java class is not in the Classpath

Hm... I only find these files containing "TestRunner" (in whichever case) on my disk:
/usr/lib/ruby/1.8/runit/cui/testrunner.rb
/usr/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb
/usr/lib/ruby/1.8/test/unit/ui/testrunnerutilities.rb
/usr/lib/ruby/1.8/test/unit/ui/console/testrunner.rb
/usr/lib/ruby/1.8/test/unit/ui/fox/testrunner.rb
/usr/lib/ruby/1.8/test/unit/ui/gtk/testrunner.rb
/usr/lib/ruby/1.8/test/unit/ui/gtk2/testrunner.rb
/usr/lib/ruby/1.8/test/unit/ui/tk/testrunner.rb
/usr/share/doc/python-docs-2.4.3/html/lib/doctest-DocTestRunner.html
/usr/share/doc/ant-core-1.6.5-r13/html/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.html

I guess those are not the needed ones? Where should that class be located?
Comment 5 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-08-09 02:35:17 UTC
(In reply to comment #4)
> I guess those are not the needed ones? Where should that class be located?

you should have this file (and "java-config -p junit" should return exactly this):
/usr/share/junit/lib/junit.jar

you can open it in mc like any zipfile and verify there's junit/textui/TestRunner.class inside it

Are you using any java-related overlays? Especially the old migration-overlay and/or gcj-overlay? If yes, it could be the cause too.
Comment 6 Jan Schnackenberg 2006-08-09 03:09:26 UTC
# java-config -p junit
:/usr/share/junit/lib/junit.jar

# less /usr/share/junit/lib/junit.jar
...
        0  09-14-04 00:14   junit/textui/
     4495  09-14-04 00:14   junit/textui/ResultPrinter.class
     4809  09-14-04 00:14   junit/textui/TestRunner.class
...

Ok... I do have this class here. 

> Are you using any java-related overlays? Especially the old
> migration-overlay and/or gcj-overlay?

I only use /usr/local/portage as an overlay for some programs, that aren't in portage. The only thing java-related in there is dev-java/jdbc3-oracle-10.1.0.4.
Comment 7 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-09-05 15:48:46 UTC
(In reply to comment #6)
> # java-config -p junit
> :/usr/share/junit/lib/junit.jar

The ':' in the beginning looks weird. I can imagine it's causing this problem. But I have no idea how it got there. Was the eclass broken at some point? What happens if you remerge junit?
Comment 8 Jan Schnackenberg 2006-09-06 03:16:59 UTC
Hm... That changed something. And the ebuild for junit-3.8.1-r1 must have changed too, because upon unmerging it I got these messages:
QA Notice: ECLASS 'java-pkg' inherited illegally in dev-java/junit-3.8.1-r1
QA Notice: ECLASS 'multilib' inherited illegally in dev-java/junit-3.8.1-r1

And now "java-config -p junit" doesn't have that ":" in it's output anymore.

commons-digester still won't install, but with another error (12 "NoClassDefFoundError" errors after the "test.digester"-line.
Comment 9 Jan Schnackenberg 2006-09-06 03:34:06 UTC
sorry for spamming this bug...

I just saw in the commandlines from emerge that the location of "commons-collections" also had this ":" at the beginning. And the NoClassDefFound errors all pointed to "org/apache/commons/collections/<something>". 

After remerging commons-collections commons-digester now compiles and installs errorfree.

I'm closing this as "fixed" (or would "invalid" be more correct?)
Comment 10 Vlastimil Babka (Caster) (RETIRED) gentoo-dev 2006-09-06 04:03:59 UTC
Leave it as FIXED, as I've commited a change to java-config-2 trunk that should prevent such problems in future.