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

Bug 363753

Summary: dev-java/javahelp-2.0.05_p63 failed Could not find servlet-api.jar
Product: Gentoo Linux Reporter: Vadim Kuznetsov (RETIRED) <vadimk>
Component: Current packagesAssignee: Java team <java>
Status: RESOLVED OBSOLETE    
Severity: normal CC: mlspamcb
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 356183    

Description Vadim Kuznetsov (RETIRED) gentoo-dev 2011-04-15 19:04:14 UTC
dev-java/javahelp-2.0.05_p63 failed (compile phase):
 *   Could not find servlet-api.jar in servlet-api-2.4

Reproducible: Always

Steps to Reproduce:
1. emerge -vq dev-java/javahelp




GENTOO_VM=sun-jdk-1.6  CLASSPATH="" JAVA_HOME="/opt/sun-jdk-1.6.0.24"
JAVACFLAGS="-source 1.4 -target 1.4" COMPILER=""

# emerge -pqv =dev-java/javahelp-2.0.05_p63
[ebuild  N    ] dev-java/javahelp-2.0.05_p63  USE="-doc -examples -source"

# emerge --info =dev-java/javahelp-2.0.05_p63
Portage 2.1.9.46 (default/linux/amd64/10.0/desktop/kde, gcc-4.5.2, glibc-2.11.3-r0, 2.6.38-gentoo-r1 x86_64)
=================================================================
                        System Settings
=================================================================
System uname: Linux-2.6.38-gentoo-r1-x86_64-Intel-R-_Core-TM-2_Duo_CPU_P8600_@_2.40GHz-with-gentoo-2.0.2
Timestamp of tree: Fri, 15 Apr 2011 13:00:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.4 [disabled]
app-shells/bash:     4.2_p8
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.7.1-r1, 3.1.3-r1
dev-util/ccache:     3.1.4
dev-util/cmake:      2.8.4
sys-apps/baselayout: 2.0.2
sys-apps/openrc:     0.8.1
sys-apps/sandbox:    2.5
sys-devel/autoconf:  2.13, 2.68
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1-r1
sys-devel/binutils:  2.21
sys-devel/gcc:       4.5.2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.4-r1
sys-devel/make:      3.82
sys-kernel/linux-headers: 2.6.38
virtual/os-headers:  0
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -msse4.1 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms sign strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en ru"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/vmware/trunk /usr/local/portage/shibboleth"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="64bit X a52 aac accessibility acl acpi ads alsa amd64 apache2 artworkextra aspell autoipd avahi bash-completion battery bazaar berkdb bluetooth branding bzip2 cairo ccache cdda cdio cdr chroot cisco clamav clamd cleartype cli clisp cmake colordiff consolekit cracklib crypt css cups curl cvs cxx dbm dbus declarative devhelp device-mapper dhclient dhcpcd djvu dri dts dvd dvdr dvi elisp emboss encode exif extensions extras faac faad fam fbcon fbcondecor festival ffmpeg firefox firefox3 flac flash fontconfig foomaticdb fortran fts3 fuse gd gdbm gdu geoip gif gimp git glade glib glitz gnome gnuplot gnutls google gpg gphoto2 gpm graphviz grub gstreamer gtk guile h323 hpcups hunspell icons iconv icu idea iproute2 iptables ipv6 jabber jack java java6 joystick jpeg kde kdrive kerberos laptop lcms ldap libnotify libv4l2 libvirtd lxc lzma lzo mad math matroska mdnsresponder-compat melt mercurial mikmod mmx mng modules mp3 mp4 mpeg mudflap multilib musicbrainz mysql nautilus ncurses networking networkmanager nfs nfsv3 nfsv4 nls nptl nptlonly nsplugin ogg ogm openal opengl openmp pam pam_ssh pango pcap pcre pdf perl phonon pixmaps plotutils png policykit ppds pppd prelude ps pulseaudio python qemu qt3support qt4 quicktime rdesktop readline realtime regex reiser4 reiserfs resolvconf sasl scanner sdl secure-delete semantic-desktop session sha512 sip smp sound soundtouch sourceview sox speech speex spell sql sqlite sqlite3 sse sse2 sse3 sse4 ssh ssl ssse3 startup-notification stream subversion svg sysfs tcpd threads thunderbird tiff tremor truetype udev unicode usb v4l2 vcd vcdx vim-syntax vnc vorbis wav weather weather-metar weather-xoap webcam webdav webdav-neon webkit webm wicd wifi x264 xcb xcomposite xinerama xml xmlrpc xorg xpm xulrunner xv xvid zeroconf zlib zsh-completion" ALSA_CARDS="emu10k1x hda-intel midi" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="nfs plymouth syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev synaptics joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en ru" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="ati radeonhd radeon vnc" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Vadim Kuznetsov (RETIRED) gentoo-dev 2011-04-15 19:11:38 UTC
 * Package:    dev-java/javahelp-2.0.05_p63
 * Repository: gentoo
 * Maintainer: java@gentoo.org
 * USE:        amd64 consolekit elibc_glibc kernel_linux multilib policykit userland_GNU
 * FEATURES:   sandbox
 * Using: sun-jdk-1.6
removed `javax/help/plaf/basic/BasicNativeContentViewerUI.java'
 * ERROR: dev-java/javahelp-2.0.05_p63 failed (compile phase):
 *   Could not find servlet-api.jar in servlet-api-2.4
 * 
 * Call stack:
 *     ebuild.sh, line   56:  Called src_compile
 *   environment, line 4249:  Called _eant 'release'
 *   environment, line  375:  Called java-pkg_getjar '--virtual' 'servlet-api-2.4' 'servlet-api.jar'
 *   environment, line 2974:  Called die
 * The specific snippet of code:
 *       die "Could not find ${target_jar} in ${pkg}";
 * 
 * If you need support, post the output of 'emerge --info =dev-java/javahelp-2.0.05_p63',
 * the complete build log and the output of 'emerge -pqv =dev-java/javahelp-2.0.05_p63'.
!!! When you file a bug report, please include the following information:
GENTOO_VM=sun-jdk-1.6  CLASSPATH="" JAVA_HOME="/opt/sun-jdk-1.6.0.24"
JAVACFLAGS="-source 1.4 -target 1.4" COMPILER=""
and of course, the output of emerge --info
 * The complete build log is located at '/var/tmp/portage/dev-java/javahelp-2.0.05_p63/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-java/javahelp-2.0.05_p63/temp/environment'.
 * S: '/var/tmp/portage/dev-java/javahelp-2.0.05_p63/work/javahelp2-2.0.05_svn63/'
Comment 2 Nico Baggus 2017-12-14 10:09:58 UTC
# emerge javahelp
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) dev-java/javahelp-2.0.05_p63::gentoo
>>> Failed to emerge dev-java/javahelp-2.0.05_p63, Log file:
>>>  '/var/log/portage/dev-java:javahelp-2.0.05_p63:20171214-100716.log'
 * Package:    dev-java/javahelp-2.0.05_p63
 * Repository: gentoo
 * Maintainer: java@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux policykit userland_GNU
 * FEATURES:   preserve-libs sandbox userpriv usersandbox
 * Using: oracle-jdk-bin-1.8
removed 'javax/help/plaf/basic/BasicNativeContentViewerUI.java'
Rewriting attributes
Rewriting ./javahelp_nbproject/build.xml
Rewriting ./JSearchIndexer_nbproject/build.xml
Rewriting ./JSearchClient_nbproject/build.xml
 * ERROR: dev-java/javahelp-2.0.05_p63::gentoo failed (compile phase):
 *   Could not find servlet-api.jar in servlet-api-2.4
 * 
 * Call stack:
 *     ebuild.sh, line  124:  Called src_compile
 *   environment, line 3978:  Called _eant 'release'
 *   environment, line  280:  Called java-pkg_getjar '--virtual' 'servlet-api-2.4' 'servlet-api.jar'
 *   environment, line 2549:  Called die
 * The specific snippet of code:
 *       die "Could not find ${target_jar} in ${pkg}";
 * 
 * If you need support, post the output of `emerge --info '=dev-java/javahelp-2.0.05_p63::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-java/javahelp-2.0.05_p63::gentoo'`.
!!! When you file a bug report, please include the following information:
GENTOO_VM=oracle-jdk-bin-1.8  CLASSPATH="" JAVA_HOME="/opt/oracle-jdk-bin-1.8.0.152"
JAVACFLAGS="-source 1.4 -target 1.4" COMPILER=""
and of course, the output of emerge --info =javahelp-2.0.05_p63
 * The complete build log is located at '/var/log/portage/dev-java:javahelp-2.0.05_p63:20171214-100716.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/dev-java/javahelp-2.0.05_p63/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-java/javahelp-2.0.05_p63/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-java/javahelp-2.0.05_p63/work/javahelp2-2.0.05_svn63/javahelp_nbproject'
 * S: '/var/tmp/portage/dev-java/javahelp-2.0.05_p63/work/javahelp2-2.0.05_svn63/'
 * 
 * The following package has failed to build, install, or execute postinst:
 * 
 *  (dev-java/javahelp-2.0.05_p63:0/0::gentoo, ebuild scheduled for merge), Log file:
 *   '/var/log/portage/dev-java:javahelp-2.0.05_p63:20171214-100716.log'
 *
Comment 3 Nico Baggus 2017-12-14 10:16:01 UTC
reinstall of virtual servlet.api didn't work out either:

# locate servlet-api.jar
/usr/share/resin-servlet-api-2.4/lib/resin-servlet-api.jar
/usr/share/tomcat-servlet-api-3.0/lib/servlet-api.jar

[N] dev-java/glassfish-servlet-api (3.1.1(3.1.1)): Glassfish reference implementation of Servlet API 2.5 and JSP API 2.1
[U] dev-java/resin-servlet-api (3.0.25(2.4)@13-12-17 -> 3.0.25(2.4) 3.1.12(2.5) 4.0.26(3.0)): Resin Servlet API 3.0/JSP API 2.1 implementation
[U] dev-java/tomcat-servlet-api (7.0.82(3.0)@03-12-17 -> 3(2.2) 4.1.36(2.3) 5.5.27-r1(2.4) 6.0.44-r1(2.5) 7.0.82(3.0) 8.5.23(3.1)): Tomcat's Servlet API 4.0/JSP API 2.4?/EL API 3.1? implementation
[U] java-virtuals/servlet-api (2.4(2.4)@11-12-17 3.0-r2(3.0)@02-12-17 -> 2.2(2.2) 2.3(2.3) 2.4(2.4) 2.5-r2(2.5) 3.0-r2(3.0) 3.1-r1(3.1)): Virtual for servlet api
Comment 4 Nico Baggus 2017-12-15 00:56:40 UTC
despite the java-virtuals/servlet-api-2.4 being available it cannot use the resin servlet-api.jar.

When installing tomcat-servlet-api-2.4 and reinstalling java-virtuals/servlet-api 
makes javahelp install.

So either resin-serlvlet-api is failing to install the right file or javahelp isn't looking for the right files... (or java-virtuals/servlet-api isn;t that virtual).
Comment 5 William L. Thomson Jr. 2017-12-27 18:06:35 UTC
The virtuals concept was an experiment and some what a failed one at that. I think it is best to not use them and grab directly what you need. Which really is just tomcat-serlvet-api. Resin has not been maintained for sometime and likely will be removed. The only other was glassfish serlvet api. Which only had a slot or two. That is also not being maintained, and most all tend to us tomcat. Unless their project ships their own.

I am stopping use of virtual/servlet-api in place of tomcat-servlet-api. There really are not alternatives. If one exists, it would be specific for that usage, resin for use with resin, glassfish for use with glassfish etc.

The idea with virtuals was maybe one performs better than the other. Allowing people to swap them out and test. That was a utopian outlook. Not realizing API or other difference, missing files, etc. Could literally cause breakage as you have discovered.

It was a noble idea, but the reality is not practical. It seems to just increase potential for issues more so than making it better. I also go one step further and versions need to use the versions they ship with.

Tomcat version x.y.z, should depend on tomcat-servlet-api-x.y.z. So you are not miss matching versions. That is handled better now. Not really related to virtuals.

Hard to say if other virtuals are truely. For common javax stuff they maybe. But I tend to see things requiring a given implementation. There isn't as much choice these days. This came from a time there were different JDKs JVMs, and many were duplicating work. That has changed some over the years. Not sure the virtual concept should remain for Java or not beyond JVM.
Comment 6 Nico Baggus 2017-12-27 20:08:51 UTC
Completely acceptable solution.
Comment 7 William L. Thomson Jr. 2017-12-28 02:02:36 UTC
In the problem you ran into, its simply a name issue. One aspect of virtuals concept completely omitted. The packages may not provide the same name for the jar files.

* ERROR: dev-java/javahelp-2.0.05_p63 failed (compile phase):
*   Could not find servlet-api.jar in servlet-api-2.4

Of course it could not because for resit its resin-servlet-api.jar. If that was named servlet-api.jar it likely would work. You can make a symlink and/or rename to test. Seems that aspect was totally omitted. That goes in addition to the other issues I pointed out :)

Think more an eclass bug/issue than java-config. Eclass jar functions lack ability to handle virtuals with jars named differently. Maybe other issues as well.
Comment 8 William L. Thomson Jr. 2018-02-16 20:59:17 UTC
Seems this has been known since bug 212922
Comment 9 Volkmar W. Pogatzki 2021-06-18 18:05:13 UTC
Affected version has gone. Closing.