Thanks for that, but I don't see how it will help.   If you look below
it is the jasper2 that is causing me grief, which is essentially the
same as yours.

How long does it take to precompile the JSPs.  Is it several JSPs per
second or several seconds per JSP?  My JSPs take over 20 seconds to
compile interactively, which would make precompiling all of them
infeasible except for a nightly build.
 
I'm surprised that your script needs those package rename hacks.  Feels
like precompiling into Tomcat's work area should be built in,
bin/precompileJsps.bat|.sh.

Thanks,

Anthony

> -----Original Message-----
> From: Filip Hanik - Dev Lists [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, May 30, 2007 12:20 AM
> To: Tomcat Users List
> Subject: Re: Jasper compiler crashes
> 
> What I like to do is to compile my JSPs just like Tomcat would do it
> runtime, so that I can keep the ability to recompile my JSP files.
> 
> http://people.apache.org/~fhanik/precompile.html
> http://people.apache.org/~fhanik/tomcat-6-precompile.xml
> 
> I just whipped up the v6 script, but I believe it to work properly.
> 
> Filip
> 
> Berglas, Anthony wrote:
> > When I try to precompile I get a null pointer exception deep in
> > .servlet.JasperLoader.loadClass.  Happens for almost all of my
.jsps.
> > They work fine with incremental compile.
> >
> > They do use tags defined with JSTL .tag files.  Tags call tags.
> >
> > tomcat-6.0.10-src
> >
> > If anyone knows of decent docs on precompiling Jasper please let me
> > know.  (I know about jasper-howto.html).
> >
> > (And there is an underlying problem that Jasper is *extremely* slow
to
> > compile.  I can compile and build all of Tomcat itself from source
in
> > less time than it takes to compile one medium sized JSP (about 30
> > seconds).  It is difficult to imagine how even the sloppiest code
could
> > run that slowly.  Something is wrong.  100% CPU.)
> >
> > Ant:-
> >
> >     <taskdef classname="org.apache.jasper.JspC" name="jasper2" >
> >       <classpath id="jspc.classpath">
> >         <fileset dir="${tomcat}/bin">
> >           <include name="*.jar"/>
> >         </fileset>
> >         <fileset dir="${tomcat.lib}">
> >           <include name="*.jar"/>
> >         </fileset>
> >       </classpath>
> >     </taskdef>
> > <!--         <pathelement location="${java.home}/../lib/tools.jar"/>
-->
> >
> >    <target name="jspc" description="Try prebuilding JSPs">
> >         <delete dir="${tomcat}/webapps/plain_eg/WEB-INF/src"/>
> >         <mkdir dir="${tomcat}/webapps/plain_eg/WEB-INF/src"/>
> >         <jasper2
> >                  validateXml="false"
> >                  uriroot="${tomcat}/webapps/plain_eg"
> >                  webXmlFragment="WEB-INF/generated_web.xml"
> >                  outputDir="${tomcat}/webapps/plain_eg/WEB-INF/src"
> >                  failOnError="false"
> >                 />
> >         <!-- showSuccess="true" -->
> >
> > Stack trace:-
> >
> >
> > May 29, 2007 4:20:38 PM org.apache.jasper.JspC processFile
> > SEVERE: ERROR-the file '\token\autocrudtokentest.jsp' generated the
> > following general exception:
> > java.lang.NullPointerException
> >     at sun.misc.URLClassPath$3.run(URLClassPath.java:316)
> >     at java.security.AccessController.doPrivileged(Native Method)
> >     at sun.misc.URLClassPath.getLoader(URLClassPath.java:313)
> >     at sun.misc.URLClassPath.getLoader(URLClassPath.java:290)
> >     at sun.misc.URLClassPath.getResource(URLClassPath.java:160)
> >     at java.net.URLClassLoader$1.run(URLClassLoader.java:192)
> >     at java.security.AccessController.doPrivileged(Native Method)
> >     at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> >     at
> >
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:134)
> >     at
> >
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66)
> >     at
> >
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:
> > 598)
> >     at
> >
org.apache.jasper.servlet.JspServletWrapper.loadTagFile(JspServletWrappe
> > r.java:221)
> >     at
> >
org.apache.jasper.compiler.TagFileProcessor.loadTagFile(TagFileProcessor
> > .java:576)
> >     at
> >
org.apache.jasper.compiler.TagFileProcessor.access$000(TagFileProcessor.
> > java:50)
> >     at
> >
org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(T
> > agFileProcessor.java:627)
> >     at
> > org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
> >     at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
> >     at
> > org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
> >     at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2392)
> >     at org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
> >     at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
> >     at
> >
org.apache.jasper.compiler.TagFileProcessor.loadTagFiles(TagFileProcesso
> > r.java:645)
> >     at
> > org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:190)
> >     at
> > org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
> >     at
> > org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
> >     at
> > org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
> >     at
> >
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.ja
> > va:566)
> >     at
> >
org.apache.jasper.servlet.JspServletWrapper.loadTagFile(JspServletWrappe
> > r.java:212)
> >     at
> >
org.apache.jasper.compiler.TagFileProcessor.loadTagFile(TagFileProcessor
> > .java:576)
> >     at
> >
org.apache.jasper.compiler.TagFileProcessor.access$000(TagFileProcessor.
> > java:50)
> >     at
> >
org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(T
> > agFileProcessor.java:627)
> >     at
> > org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
> >     at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
> >     at
> > org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
> >     at
> >
org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(T
> > agFileProcessor.java:631)
> >     at
> > org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
> >     at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
> >     at
> > org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
> >     at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2392)
> >     at org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
> >     at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
> >     at
> >
org.apache.jasper.compiler.TagFileProcessor.loadTagFiles(TagFileProcesso
> > r.java:645)
> >     at
> > org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:190)
> >     at
> > org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
> >     at org.apache.jasper.JspC.processFile(JspC.java:994)
> >     at org.apache.jasper.JspC.execute(JspC.java:1143)
> >     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.dispatch.DispatchUtils.execute(DispatchUtils.java:1
> > 05)
> >     at
> > org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:134)
> >     at
> > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
> >     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.dispatch.DispatchUtils.execute(DispatchUtils.java:1
> > 05)
> >     at org.apache.tools.ant.Task.perform(Task.java:348)
> >     at org.apache.tools.ant.Target.execute(Target.java:357)
> >     at org.apache.tools.ant.Target.performTasks(Target.java:385)
> >     at
> > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
> >     at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
> >     at
> >
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecut
> > or.java:41)
> >     at
> > org.apache.tools.ant.Project.executeTargets(Project.java:1181)
> >     at org.apache.tools.ant.Main.runBuild(Main.java:698)
> >     at org.apache.tools.ant.Main.startAnt(Main.java:199)
> >     at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
> >     at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
> >     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 com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:17)
> >
> > --
> > Dr Anthony Berglas
> > Ph. +61 7 3227 4410
> > (Mob. +61 42 783 0248)
> > [EMAIL PROTECTED]; [EMAIL PROTECTED]
> >
> >
> >
---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to