You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Ruth, Brice" <BR...@Fiskars.com> on 2005/04/01 19:21:11 UTC

Jasper throws ExceptionInInitializerError?!

Good morning,
 
I am migrating an automated build process from a Windows 2K system to a
RedHat EL 3 system, with some trouble. When I run a particular build via
Ant, that uses the JSP precompiling task (jasper2), it fails, but
somehow, not immediately. When I go into the output or destination
directory for the jasper task, the first .java file is created ... it
bombs out, though, at the place in the JSP where the Struts html:html
tag is first encountered.
 
What's more frustrating, is that on the RHEL3 system, I have tomcat4 and
tomcat5 installed (4.1.31 and 5.0.30). When I provide a tomcat.home
property that points to Tomcat4 (so the common/lib JARs from tomcat4 are
used), it builds fine. When I specify a tomcat.home pointing to tomcat5,
it fails. 
 
The Tomcat packages were installed from the JPackage project and are
running against IBM's 1.4.2 JDK (Intel/x86).
 
I've spent many hours on this, tried a variety of things, all with no
success. It seems that either (a) something is missing from a CLASSPATH
or (b) there is a conflict somehow. Note, the project (with the same
build.xml file) runs just fine on our local systems ... my local
development platform is a dual G5 (Mac) w/ Tomcat 5.0.28 - no problems
here. We also use the MyEclipse plug-in to Eclipse which pre-compiles
JSPs in the background for syntax checking, and it doesn't have any
problem with the project configuration. Moreover, on the Win 2K box,
this was all working fine, albeit compiling for a Tomcat4 target, not
Tomcat5.
 
I am at my wits end here. Any help or pointers would be most
appreciated.
 
Here's the error from the Ant build:
 
jspc:
     [copy] Copying 1 file to
/opt/build/checkout/Imagebank/WebRoot/WEB-INF
  [jasper2] log4j:WARN No appenders could be found for logger
(org.apache.jasper.compiler.JspRuntimeContext).
  [jasper2] log4j:WARN Please initialize the log4j system properly.
 
BUILD FAILED
/opt/build/build-Imagebank.xml:9: The following error occurred while
executing this line:
/opt/build/checkout/Imagebank/build.xml:201:
java.lang.ExceptionInInitializerError
 
I can turn on the debugging output for Ant if more verbosity is
necessary.
 
p.s. Another project builds just fine on this platform, against tomcat5,
using the same frameworks (Struts, etc.).
 
Brice D. Ruth
Sr. IT Analyst
Fiskars Brands, Inc.