You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Richard Mixon (qwest)" <rn...@qwest.net> on 2005/08/15 23:57:54 UTC
JspC compile exception in tomcat-deployer 5.5.10
Hello,
I am using the jakarta-tomcat-5.5.10-deployer to deploy my customized
war file to tomcat. When I have it do the "compile" target so it
pre-compiles the JSP's I get the exception below (its sort of long).
I've got the source and can see that it is happening as it processes the
JSPs. But it gives no clue as to which JSP is causing the problem.
Is there a way to turn on a trace that would list each file as it is
processed? I've also looked in the output directory - but there are not
class files at all. And the generated_web.xml is completely empty at
this point.
Here is how I've got the jasper2 task defined in my build.xml:
<jasper2 validateXml="false"
uriroot="${webapp.path}"
webXmlFragment="${webapp.path}/WEB-INF/generated_web.xml"
addWebXmlMappings="true"
outputDir="${webapp.path}/WEB-INF/classes" />
Notice that I turned validateXml to false - otherwise I get the
following message:
[jasper2] org.xml.sax.SAXParseException: Document is invalid: no
grammar found.
I have compared and compared my web.xml to the spec and it seems to be
OK. It complains about position 9 in the 3rd line. Line 3 follows,
position 9 is the start of the "xmlns=" attribute:
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
... which appears to be fine.
Any ideas or help is appreciated. I have tried this a few months back in
5.5.7 but got the same results (worked fine in 5.0.19). I imagine its a
problem either in one of my JSPs or in the web.xml - but cannot figure
it out.
Thanks in advance for any ideas.
- Richard
Exception from running "ant compile":
Loaded from C:\jakarta-tomcat-5.5.10-deployer\lib\jasper-compiler.jar
org/apache/jasper/compiler/AntCompiler.class
Class org.apache.jasper.compiler.AntCompiler loaded from ant loader
(parentFirst)
Class org.apache.tools.ant.BuildListener loaded from parent loader
(parentFirst)
Couldn't load Resource commons-logging.properties
Couldn't load Resource
META-INF/services/org.apache.commons.logging.LogFactory
Finding class org.apache.log4j.Logger
Finding class org.apache.log4j.Category
Finding class org.apache.log4j.spi.AppenderAttachable
Finding class org.apache.commons.logging.impl.Log4JLogger
Loaded from C:\jakarta-tomcat-5.5.10-deployer\lib\commons-logging.jar
org/apache/commons/logging/impl/Log4JLogger.class
Class org.apache.commons.logging.impl.Log4JLogger loaded from ant loader
(parentFirst)
Finding class org.apache.log4j.Category
Finding class org.apache.log4j.Category
[jasper2] java.lang.NullPointerException
[jasper2] at
org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationCon
text.java:220)
[jasper2] at org.apache.jasper.JspC.processFile(JspC.java:913)
[jasper2] at org.apache.jasper.JspC.execute(JspC.java:1061)
[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.executeSortedTargets(Project.java:1216)
[jasper2] at
org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[jasper2] at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecut
or.java:40)
[jasper2] at
org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[jasper2] at org.apache.tools.ant.Main.runBuild(Main.java:668)
[jasper2] at org.apache.tools.ant.Main.startAnt(Main.java:187)
[jasper2] at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
[jasper2] at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
[jasper2] Error in class org.apache.jasper.JspC
BUILD FAILED
C:\jakarta-tomcat-5.5.10-deployer\build.xml:49:
org.apache.jasper.JasperException
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.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecut
or.java:40)
at
org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Caused by: org.apache.jasper.JasperException
at org.apache.jasper.JspC.processFile(JspC.java:953)
at org.apache.jasper.JspC.execute(JspC.java:1061)
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)
... 12 more
--- Nested Exception ---
org.apache.jasper.JasperException
at org.apache.jasper.JspC.processFile(JspC.java:953)
at org.apache.jasper.JspC.execute(JspC.java:1061)
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)
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.executeSortedTargets(Project.java:1216)
at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecut
or.java:40)
at
org.apache.tools.ant.Project.executeTargets(Project.java:1068)
at org.apache.tools.ant.Main.runBuild(Main.java:668)
at org.apache.tools.ant.Main.startAnt(Main.java:187)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Total time: 3 seconds
C:\jakarta-tomcat-5.5.10-deployer>