tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Mixon (qwest)" <rnmi...@qwest.net>
Subject RE: Tomcat 5.5.7 deployer ExceptionInInitializer error in Struts getMessageResources
Date Tue, 15 Feb 2005 20:58:26 GMT
Sven,

Sorry I was unclear. I should have said that under Windows XP it
"compiles" fine. Same version of Tomcat (5.5.7), Ant (1.6.2) and similar
versions of Java:
XP:
 c:\EclipseProjects\workspace\stars>java -version
 java version "1.5.0_01"
  Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
  Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode, sharing)
SuSE Linux
  user1:~/tc55-deployer> java -version
  java version "1.5.0_01"
  Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
  Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_01-b08, mixed mode)
  user1:~/tc55-deployer>

What is even weirder (which probably means it is just a config issue
somewhere) is that when I set up a log4j.properties file to see if that
will illuminate the problem in jasper, I get a different exception
(NPE).

I've attached two runs below that show where this happens.

Thank you - Richard

user1:~> cd tc55-deployer/
user1:~> export ANT_HOME=/opt/apache-ant-1.6.2
user1:~> . /etc/sysconfig/tc55
user1:~> . setJava $SETJAVA_OPTS
user1:~/tc55-deployer> java -version
java version "1.5.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_01-b08, mixed mode)
user1:~/tc55-deployer>
user1:~/tc55-deployer> pwd
/home/user1/tc55-deployer
user1:~/tc55-deployer> $ANT_HOME/bin/ant clean
LOCALCLASSPATH=/opt/apache-ant-1.6.2/lib/ant-launcher.jar:/home/user1/to
mcat-deployer/log4j-1.2.8.jar
LOCALCLASSPATH=/opt/apache-ant-1.6.2/lib/ant-launcher.jar:/home/user1/to
mcat-deployer/log4j-1.2.8.jar
Buildfile: build.xml

clean:
   [delete] Deleting directory /home/user1/tc55-deployer/build

BUILD SUCCESSFUL
Total time: 1 second
user1:~/tc55-deployer> $ANT_HOME/bin/ant --execdebug compile
LOCALCLASSPATH=/opt/apache-ant-1.6.2/lib/ant-launcher.jar:/home/user1/to
mcat-deployer/log4j-1.2.8.jar
LOCALCLASSPATH=/opt/apache-ant-1.6.2/lib/ant-launcher.jar:/home/user1/to
mcat-deployer/log4j-1.2.8.jar
exec "/usr/java/jdk1.5.0_01/bin/java" -Xms256m -Xmx256m -classpath
"/opt/apache-ant-1.6.2/lib/ant-launcher.jar:/home/user1/tomcat-deployer/
log4j-1.2.8.jar" -Dant.home="/opt/apache-ant-1.6.2" -Dant.library.dir="/
opt/apache-ant-1.6.2/lib" org.apache.tools.ant.launch.Launcher -lib ""
"compile"
Buildfile: build.xml

clean:

customizeContext:
     [echo] Customizing
/home/user1/tc55-deployer/build/webapp/stars/META-INF/stars.xml
     [move] Moving 1 files to /home/user1/tc55-deployer/stars/META-INF
     [echo] Changing hibernate.connection.driver_class to
com.mysql.jdbc.Driver
     [copy] Copying 1 file to /home/user1/tc55-deployer/stars/META-INF
     [copy] Copying
/home/user1/tc55-deployer/stars/META-INF/context.xml_bak to
/home/user1/tc55-deployer/stars/META-INF/context.xml
     [echo] Customizing stars/WEB-INF/web.xml
     [move] Moving 1 files to /home/user1/tc55-deployer/stars/WEB-INF
     [copy] Copying 1 file to /home/user1/tc55-deployer/stars/WEB-INF
     [echo] Customizing stars/WEB-INF/classes/treecache.xml
     [move] Moving 1 files to
/home/user1/tc55-deployer/stars/WEB-INF/classes
     [copy] Copying 1 file to
/home/user1/tc55-deployer/stars/WEB-INF/classes
     [echo] Set location to redirect user to when logging off
     [move] Moving 1 files to /home/user1/tc55-deployer/stars/WEB-INF
     [copy] Copying 1 file to /home/user1/tc55-deployer/stars/WEB-INF
     [echo] l4j.error.mail: true;
     [echo] customizeLog4jProperties: true;

customizeContext2:
     [echo] Customizing
/home/user1/tc55-deployer/build/webapp/stars/WEB-INF/classes/log4j.prope
rties
     [move] Moving 1 files to
/home/user1/tc55-deployer/stars/WEB-INF/classes
     [copy] Copying 1 file to
/home/user1/tc55-deployer/stars/WEB-INF/classes

compile:
     [copy] Copying 620 files to
/home/user1/tc55-deployer/build/webapp/stars
  [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
/home/user1/tc55-deployer/build.xml:56:
java.lang.ExceptionInInitializerError

Total time: 9 seconds
user1:~/tc55-deployer> [ NOW ADD log4j.properties TO THE CLASSPATH]
user1:~/tc55-deployer> export
LOCALCLASSPATH=/home/user1/tc55-deployer/classes/
user1:~/tc55-deployer> ls -l /home/user1/tc55-deployer/classes/
total 4
-rw-r--r--  1 user1 users 513 2005-02-15 13:30 log4j.properties
user1:~/tc55-deployer> $ANT_HOME/bin/ant --execdebug compile
LOCALCLASSPATH=/opt/apache-ant-1.6.2/lib/ant-launcher.jar:/home/user1/tc
55-deployer/classes/
LOCALCLASSPATH=/opt/apache-ant-1.6.2/lib/ant-launcher.jar:/home/user1/tc
55-deployer/classes/
exec "/usr/java/jdk1.5.0_01/bin/java" -Xms256m -Xmx256m -classpath
"/opt/apache-ant-1.6.2/lib/ant-launcher.jar:/home/user1/tc55-deployer/cl
asses/" -Dant.home="/opt/apache-ant-1.6.2" -Dant.library.dir="/opt/apach
e-ant-1.6.2/lib" org.apache.tools.ant.launch.Launcher -lib "" "compile"
Buildfile: build.xml

clean:
   [delete] Deleting directory /home/user1/tc55-deployer/build

customizeContext:
     [echo] Customizing
/home/user1/tc55-deployer/build/webapp/stars/META-INF/stars.xml
     [move] Moving 1 files to /home/user1/tc55-deployer/stars/META-INF
     [echo] Changing hibernate.connection.driver_class to
com.mysql.jdbc.Driver
     [copy] Copying 1 file to /home/user1/tc55-deployer/stars/META-INF
     [copy] Copying
/home/user1/tc55-deployer/stars/META-INF/context.xml_bak to
/home/user1/tc55-deployer/stars/META-INF/context.xml
     [echo] Customizing stars/WEB-INF/web.xml
     [move] Moving 1 files to /home/user1/tc55-deployer/stars/WEB-INF
     [copy] Copying 1 file to /home/user1/tc55-deployer/stars/WEB-INF
     [echo] Customizing stars/WEB-INF/classes/treecache.xml
     [move] Moving 1 files to
/home/user1/tc55-deployer/stars/WEB-INF/classes
     [copy] Copying 1 file to
/home/user1/tc55-deployer/stars/WEB-INF/classes
     [echo] Set location to redirect user to when logging off
     [move] Moving 1 files to /home/user1/tc55-deployer/stars/WEB-INF
     [copy] Copying 1 file to /home/user1/tc55-deployer/stars/WEB-INF
     [echo] l4j.error.mail: true;
     [echo] customizeLog4jProperties: true;

customizeContext2:
     [echo] Customizing
/home/user1/tc55-deployer/build/webapp/stars/WEB-INF/classes/log4j.prope
rties
     [move] Moving 1 files to
/home/user1/tc55-deployer/stars/WEB-INF/classes
     [copy] Copying 1 file to
/home/user1/tc55-deployer/stars/WEB-INF/classes

compile:
     [copy] Copying 620 files to
/home/user1/tc55-deployer/build/webapp/stars
  [jasper2] java.lang.NullPointerException
  [jasper2]     at
org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationCon
text.java:220)
  [jasper2]     at org.apache.jasper.JspC.processFile(JspC.java:847)
  [jasper2]     at org.apache.jasper.JspC.execute(JspC.java:989)
  [jasper2]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
  [jasper2]     at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
  [jasper2]     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
  [jasper2]     at java.lang.reflect.Method.invoke(Method.java:585)
  [jasper2]     at
org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:123)
  [jasper2]     at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
  [jasper2]     at org.apache.tools.ant.Task.perform(Task.java:364)
  [jasper2]     at org.apache.tools.ant.Target.execute(Target.java:341)
  [jasper2]     at
org.apache.tools.ant.Target.performTasks(Target.java:369)
  [jasper2]     at
org.apache.tools.ant.Project.executeTarget(Project.java:1214)
  [jasper2]     at
org.apache.tools.ant.Project.executeTargets(Project.java:1062)
  [jasper2]     at org.apache.tools.ant.Main.runBuild(Main.java:673)
  [jasper2]     at org.apache.tools.ant.Main.startAnt(Main.java:188)
  [jasper2]     at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
  [jasper2]     at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)

BUILD FAILED
/home/user1/tc55-deployer/build.xml:56:
org.apache.jasper.JasperException

Total time: 4 seconds
user1:~/tc55-deployer>


-----Original Message-----
From: sven morales [mailto:aka_sergio@yahoo.com]
Sent: Tuesday, February 15, 2005 1:31 PM
To: Tomcat Users List
Subject: Re: Tomcat 5.5.7 deployer ExceptionInInitializer error in
Struts getMessageResources


Hi,
   What do you mean by "Under Windows XP it deploys
fine." ?  I thought your problem is compiling?  This
deployer (manager webapps) compiles okay in XP and not
in SuSE?

aka_sergio

--- "Richard Mixon (qwest)" <rnmixon@qwest.net> wrote:

> Anybody have any ideas? I have googled this list and
> others and so far
> no clues
> Thank you - Richard
>
> -----Original Message-----
> From: Richard Mixon (qwest)
> [mailto:rnmixon@qwest.net]
> Sent: Tuesday, February 15, 2005 1:31 AM
> To: TomcatUsers
> Subject: Tomcat 5.5.7 deployer
> ExceptionInInitializer error
>
>
> When I use the client deployer to compile my web app
> I am getting this
> error under SuSE Linux (SLES9). Under Windows XP it
> deploys fine.
>
> It seems sort of puzzling as to why the deployer is
> running the Struts
>
org.apache.struts.util.MessageResources.getMessageResources
> during a
> compile.
>
> Here is a the output:
>
>
>   ltojsw@kingfish:~/tc55-deployer> echo $JAVA_HOME
>   /usr/java/jdk1.5.0_01
>   ltojsw@kingfish:~/tc55-deployer> echo $ANT_HOME
>   /opt/apache-ant-1.6.2
>   ltojsw@kingfish:~/tc55-deployer> $ANT_HOME/bin/ant
> compile
>   Buildfile: build.xml
>
>   clean:
>
>   compile:
>        [copy] Copying 625 files to
> /home/ltojsw/tc55-deployer/build/webapp/stars
>     [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
>   /home/ltojsw/tc55-deployer/build.xml:45:
> java.lang.ExceptionInInitializerError
>
>   Total time: 8 seconds
>
> The  stack trace is below (running ant with -verbose
> flag).
>
> Any idea would fix this?
>
> Thank you - Richard
>
>   [jasper2] Error in class org.apache.jasper.JspC
>
> BUILD FAILED
> /home/ltojsw/tc55-deployer/build.xml:45:
> java.lang.ExceptionInInitializerError
>         at
>
org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:131)
>         at
>
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
>         at
> org.apache.tools.ant.Task.perform(Task.java:364)
>         at
> org.apache.tools.ant.Target.execute(Target.java:341)
>         at
>
org.apache.tools.ant.Target.performTasks(Target.java:369)
>         at
>
org.apache.tools.ant.Project.executeTarget(Project.java:1214)
>         at
>
org.apache.tools.ant.Project.executeTargets(Project.java:1062)
>         at
> org.apache.tools.ant.Main.runBuild(Main.java:673)
>         at
> org.apache.tools.ant.Main.startAnt(Main.java:188)
>         at
>
org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
>         at
>
org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
> Caused by: java.lang.ExceptionInInitializerError
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:164)
>         at
>
org.apache.strutsel.taglib.html.ELFormTagBeanInfo.class$(ELFormTagBeanIn
> fo.java:41)
>         at
>
org.apache.strutsel.taglib.html.ELFormTagBeanInfo.getPropertyDescriptors
> (ELFormTagBeanInfo.java:41)
>         at
>
java.beans.Introspector.getTargetPropertyInfo(Introspector.java:475)
>         at
>
java.beans.Introspector.getBeanInfo(Introspector.java:385)
>         at
>
java.beans.Introspector.getBeanInfo(Introspector.java:155)
>         at
>
org.apache.jasper.compiler.Generator$TagHandlerInfo.<init>(Generator.jav
> a:3676)
>         at
>
org.apache.jasper.compiler.Generator$GenerateVisitor.getTagHandlerInfo(G
> enerator.java:2098)
>         at
>
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.jav
> a:1579)
>         at
>
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
>         at
>
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
>         at
>
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
>         at
>
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.jav
> a:1685)
>         at
>
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
>         at
>
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
>         at
>
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
>         at
>
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.jav
> a:1685)
>         at
>
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
>         at
>
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
>         at
>
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
>         at
>
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
>         at
>
org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
>         at
>
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
>         at
>
org.apache.jasper.compiler.Generator.generate(Generator.java:3268)
>         at
>
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:189)
>         at
>
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
>         at
> org.apache.jasper.JspC.processFile(JspC.java:854)
>         at
> org.apache.jasper.JspC.execute(JspC.java:989)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>         at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
> a:39)
>         at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
> Impl.java:25)
>         at
> java.lang.reflect.Method.invoke(Method.java:585)
>         at
>
org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:123)
>         ... 10 more
> Caused by: java.lang.NullPointerException
>         at
>
org.apache.struts.util.MessageResources.getMessageResources(MessageResou
> rces.java:498)
>         at
>
org.apache.struts.taglib.html.FormTag.<clinit>(FormTag.java:95)
>         ... 44 more
> --- Nested Exception ---
> java.lang.ExceptionInInitializerError
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:164)
>         at
>
org.apache.strutsel.taglib.html.ELFormTagBeanInfo.class$(ELFormTagBeanIn
> fo.java:41)
>         at
>
org.apache.strutsel.taglib.html.ELFormTagBeanInfo.getPropertyDescriptors
> (ELFormTagBeanInfo.java:41)
>         at
>
java.beans.Introspector.getTargetPropertyInfo(Introspector.java:475)
>         at
>
java.beans.Introspector.getBeanInfo(Introspector.java:385)
>         at
>
java.beans.Introspector.getBeanInfo(Introspector.java:155)
>         at
>
org.apache.jasper.compiler.Generator$TagHandlerInfo.<init>(Generator.jav
> a:3676)
>         at
>
org.apache.jasper.compiler.Generator$GenerateVisitor.getTagHandlerInfo(G
> enerator.java:2098)
>         at
>
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.jav
> a:1579)
>         at
>
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1441)
>         at
>
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
>
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

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




---------------------------------------------------------------------
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