tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ruth, Brice" <BR...@Fiskars.com>
Subject RE: Jasper throws ExceptionInInitializerError?!
Date Fri, 01 Apr 2005 17:56:44 GMT
One thing I forgot to mention - when I do turn on debug for Ant, the
root cause that's shown is a NullPointerException. 

java.lang.ExceptionInInitializerError
        at java.lang.Class.forName1(Native Method)
        at java.lang.Class.forName(Class.java:180)
        at
org.apache.strutsel.taglib.html.ELHtmlTagBeanInfo.class$(ELHtmlTagBeanIn
fo.java:88)
        at
org.apache.strutsel.taglib.html.ELHtmlTagBeanInfo.getPropertyDescriptors
(ELHtmlTagBeanInfo.java:88)
        at
java.beans.Introspector.getTargetPropertyInfo(Introspector.java:477)
        at java.beans.Introspector.getBeanInfo(Introspector.java:390)
        at java.beans.Introspector.getBeanInfo(Introspector.java:159)
        at
org.apache.jasper.compiler.Generator$TagHandlerInfo.<init>(Generator.jav
a:3684)
        at
org.apache.jasper.compiler.Generator$GenerateVisitor.getTagHandlerInfo(G
enerator.java:2102)
        at
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.jav
a:1583)
        at
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
...
Caused by: java.lang.NullPointerException
        at
org.apache.struts.util.MessageResources.getMessageResources(MessageResou
rces.java:577)
        at
org.apache.struts.taglib.html.HtmlTag.<clinit>(HtmlTag.java:96)

Googling on getMessageResources and NullPointerException gets me a bunch
of hits about Struts not being configured right, etc. Basically, that
Struts can't find the Resources bundle configured in struts-config.xml.

Yet, if that were truly a config problem, then it wouldn't work when
compiling against Tomcat4, right? And it wouldn't compile correctly on
my G5 w/ Tomcat 5.0.28, right? That's my train of thought, at least ...

I've gone through the source now, starting with ELHtmlTagBeanInfo as
well as MessageResources.getMessageResources - stepping back through
other source as needed, and I haven't come across anything that would
appear to be a smoking gun.

Please advise!

Best,
Brice Ruth

-----Original Message-----
From: Ruth, Brice [mailto:BRuth@fiskars.com] 
Sent: Friday, April 01, 2005 11:21 AM
To: tomcat-user@jakarta.apache.org
Subject: 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.
 
 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message