As of 6.0.30, Tomcat doesn't come bundled with jasper-jdt.jar, instead adding ecj-3.3.1.jar. This leads to a java.lang.IllegalStateException: No Java compiler available error. Tomcat starts up fine, and the web-apps load correctly. However, accessing a web-app through browser leads to this error. Not sure how to fix this yet. From http://tomcat.apache.org/tomcat-6.0-doc/changelog.html: Tomcat 6.0.30 (jfclere) General: Switch to using the Eclipse compiler JAR directly rather than creating it from the larger JDT download. (markt) Reproducible: Always Portage 2.1.9.25 (default/linux/amd64/10.0, gcc-4.4.4, glibc-2.11.2-r3, 2.6.36-gentoo-r5 x86_64) ================================================================= System uname: Linux-2.6.36-gentoo-r5-x86_64-AMD_Opteron-tm-_Processor_244-with-gentoo-1.12.14 Timestamp of tree: Fri, 11 Feb 2011 07:30:01 +0000 app-shells/bash: 4.1_p9 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.5.4-r4, 2.6.6-r1, 3.1.2-r4 sys-apps/baselayout: 1.12.14-r1 sys-apps/sandbox: 2.4 sys-devel/autoconf: 2.65-r1 sys-devel/automake: 1.10.3, 1.11.1 sys-devel/binutils: 2.20.1-r1 sys-devel/gcc: 4.4.4-r2 sys-devel/gcc-config: 1.4.1 sys-devel/libtool: 2.2.10 sys-devel/make: 3.81-r2 virtual/os-headers: 2.6.30-r1 (sys-kernel/linux-headers) ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=native -O2 -pipe" DISTDIR="/mnt/backup/portage/distfiles" FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans" GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://gentoo.mirrors.tds.net/gentoo ftp://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ http://gentoo.netnitco.net" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j3" PKGDIR="/mnt/backup/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="/mnt/backup/portagetmp" PORTDIR="/mnt/backup/portage" PORTDIR_OVERLAY="/var/lib/layman/php" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="acl amd64 apache2 berkdb bzip2 cli cracklib crypt cups cxx dri fortran gdbm gpm iconv ipv6 mmx modules mudflap multilib mysql ncurses nls nptl nptlonly openmp pam pcre perl php pppd python readline session sockets sqlite sse sse2 ssl sysfs tcpd threads unicode vhosts xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" PHP_TARGETS="php5-3%" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nouveau nv r128 radeon savage sis tdfx trident vesa via vmware dummy v4l" 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, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 262115 [details] ebuild with added ecj.jar can you please try this ebuild? i tried to test it but i get weird behavior of tomcat here which does not make sense to me at all.
Thanks, I will test a little later tonight and report back. While doing some searching, it seems we don't need to use the ECJ approach. From http://apache.mirrors.tds.net/tomcat/tomcat-6/v6.0.30/RELEASE-NOTES Dependency Changes: =================== Tomcat 6.0 is designed to run on JSE 5.0 and later. In addition, Tomcat 6.0 uses the Eclipse JDT Java compiler for compiling JSP pages. This means you no longer need to have the complete Java Development Kit (JDK) to run Tomcat, but a Java Runtime Environment (JRE) is sufficient. The Eclipse JDT Java compiler is bundled with the binary Tomcat distributions. Tomcat can also be configured to use the compiler from the JDK to compile JSPs, or any other Java compiler supported by Apache Ant. As Gentoo requires JDK regardless, it may make sense to just set the JDK to be used for compiling JSPs.
That patch works to the point where I can start tomcat and the JSPs build properly, no longer getting the IllegalStateException. However, when trying to start up tomcat through init.d: lastochka tomcat # /etc/init.d/tomcat-6 start * Caching service dependencies ... [ ok ] * Starting Tomcat ... [ !! ] lastochka maxitravel # /etc/init.d/tomcat-6 status * status: stopped While Tomcat is actually running properly. So, I cannot kill it through init.d, have to go through kill. How/where can I see the error that caused the init.d not to catch the start up properly?
well, i have no idea where the output is written, but probably if ever logged, should go to system logger or /var/log/tomcat-6/catalina.out. you can also try to remove --background (and maybe even --stdout and --stderr) from ssd function in /etc/init.d/tomcat-6 to get the output directly on console.
Neither system logger nor the catalina.out have anything. Probably because Tomcat actually starts correctly, and can compile JSPs just fine with this ebuild. Just the init.d system doesn't catch that it started yet... I'll dig around with the modifications, try to get some reason for that.
i just committed tomcat-6.0.32-r1 which is the same as the ebuild attached. i tried starting tomcat as service and here it works fine. anyway, waiting for your results in case they are tomcat related and not some local issue.
thanks, did you overwrite the 6.0.32, or did you commit 6.0.32-r1? after a sync just now, still only see .32 from before.
nevermind, packages.gentoo.org not updated yet it seems and neither is my mirror. i've seen the -r1 in the changelog. i'll wait for it to propagate and then report back here. thanks again!
y, takes some time till the commit goes through, anyway the ebuild is the same as the one attached here. i also removed the "old" tomcat-6.0.32 ebuild
Removing --background and the --stdout and --stderr don't change anything. The script just hangs on "Starting tomcat" line, and Ctrl+C out of that kills tomcat. Here's a bit of the catalina.out that's relevant (I tried starting without the MaxiTravelWeb.war in the webapps dir, same results): Feb 13, 2011 6:44:11 PM org.apache.catalina.core.AprLifecycleListener init INFO: Loaded APR based Apache Tomcat Native library 1.1.20. Feb 13, 2011 6:44:11 PM org.apache.catalina.core.AprLifecycleListener init INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. Feb 13, 2011 6:44:11 PM org.apache.coyote.http11.Http11AprProtocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Feb 13, 2011 6:44:11 PM org.apache.coyote.ajp.AjpAprProtocol init INFO: Initializing Coyote AJP/1.3 on ajp-8009 Feb 13, 2011 6:44:11 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1203 ms Feb 13, 2011 6:44:11 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Feb 13, 2011 6:44:11 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.32 Feb 13, 2011 6:44:11 PM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor host-manager.xml Feb 13, 2011 6:44:12 PM org.apache.catalina.startup.HostConfig deployDescriptor INFO: Deploying configuration descriptor manager.xml Feb 13, 2011 6:44:12 PM org.apache.catalina.startup.HostConfig deployWAR INFO: Deploying web application archive MaxiTravelWeb.war Requesting list of hotels. Hotels returned: 13683 Finished Loading! Feb 13, 2011 6:44:29 PM org.apache.coyote.http11.Http11AprProtocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Feb 13, 2011 6:44:29 PM org.apache.coyote.ajp.AjpAprProtocol start INFO: Starting Coyote AJP/1.3 on ajp-8009 Feb 13, 2011 6:44:29 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 17643 ms The long start up is of course due to the MaxiTravelWeb.war app. It contacts a remote server on start up. The output from the init.d script is still: lastochka init.d # /etc/init.d/tomcat-6 start * Caching service dependencies ... [ ok ] * Starting Tomcat ... [ !! ] I'll post in forums, maybe someone else can find this behaviour.
Posted on forum: http://forums.gentoo.org/viewtopic-t-864473-start-0-postdays-0-postorder-asc-highlight-.html
the start bug is now handled in bug #326979 so closing this bug. thank you for help with fixing the original issue.
Thanks Miroslav!