ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Jack" <aj...@openbiz.biz>
Subject RE: jspc NullPointerException
Date Fri, 28 Jun 2002 18:00:26 GMT
Thanks Steve, I have tried with 4.1.3, with the same result.

Reading the stack trace (below) I see processWebDotXml -- which I assume
means it is trying to process a WEB-INF\web.xml, which I didn't have in the
first tree of JSPs I was working with, but even when I extract a WAR into my
directory, and I have this file, I get the same exception.

I tried JSPC from the command line, with theoretically the same parameters,
and it works.

Is there some aspect of the ANT task attemptign to deal with web.xml that I
need to configure?

jsp_compile:
     [jspc] Compiling 41 source filesF:\java\build\webadmin\com\openbiz\jsp
     [java] java.lang.NullPointerException
     [java]     at
org.apache.jasper.compiler.TldLocationsCache.processWebDotXml
(TldLocationsCache.java:169)
     [java]     at
org.apache.jasper.compiler.TldLocationsCache.<init>(TldLocati
onsCache.java:145)
     [java]     at org.apache.jasper.JspC.parseFiles(JspC.java:712)
     [java]     at org.apache.jasper.JspC.main(JspC.java:742)
     [java] Exception in thread "main"

BUILD FAILED
E:\data\OpenBiz\webadmin\build.xml:240: Java returned: 1

regards

Adam
-----Original Message-----
From: Steve Loughran [mailto:steve_l@iseran.com]
Sent: Thursday, June 27, 2002 9:59 PM
To: Ant Users List; ajack@openbiz.biz
Subject: Re: jspc NullPointerException



----- Original Message -----
From: "Adam Jack" <ajack@openbiz.biz>
To: "'Ant Users List'" <ant-user@jakarta.apache.org>
Sent: Thursday, June 27, 2002 13:45
Subject: jspc NullPointerException


> I am trying the JspC with ANT 1.5 beta 3. Some feedback, then the latest
> problem.
>
> 1) I downloaded Tomcat 4.0.4 'cos that seemed best version '4' given the
> comment in the jspc page:

I think 4.1 may be better

>
> By default the task uses the Jasper JSP compiler. This means the task
needs
> jasper.jar and jasper-runtime.jar, which come with builds of Tomcat
> 4/Catalina from the Jakarta Tomcat project
> <http://jakarta.apache.org/tomcat/>
>
> 1.1) Nothing in the "Library Dependencies" seems to mention Tomcat, let
> along versions.

> 1.2) I could find a jasper-runtime.jar but not jasper.jar. I eventually
> added jasper-compiler.jar.

ok, maybe they changed libs. file a bug report :)

> 2) I was hoping for some consistency w/ <javac> so I copied that to start.
I
> failed to give an internal <include> and the task crashed with NullPointer
> exception in the file scanning area.

file a defect then

>
> 4) Things started to work, sorta.
>      <jspc
>                               srcdir="${src}"
>                               destdir="${build}/${openbiz.part}"
>                               package="com.openbiz.jsp"
>                               verbose="9"
>                               classpathref="project.class.path"
>                       >
>                       <include name="**/*.jsp" />
>
>               </jspc>
>
> and got.
>
>      [java] java.lang.NullPointerException
>      [java]     at
> org.apache.jasper.compiler.TldLocationsCache.processWebDotXml
> (TldLocationsCache.java:169)
>      [java]     at
> org.apache.jasper.compiler.TldLocationsCache.<init>(TldLocati
> onsCache.java:145)
>      [java]     at org.apache.jasper.JspC.parseFiles(JspC.java:712)
>      [java]     at org.apache.jasper.JspC.main(JspC.java:742)
>      [java] Exception in thread "main"
>
> BUILD FAILED
> E:\data\OpenBiz\wwwroot\build.xml:237: Java returned: 1
>         at org.apache.tools.ant.taskdefs.Java.execute(Java.java:110)
>         at
> org.apache.tools.ant.taskdefs.optional.jsp.compilers.JasperC.execute(
> JasperC.java:126)
>         at
> org.apache.tools.ant.taskdefs.optional.jsp.JspC.doCompilation(JspC.ja
> va:458)
>         at
> org.apache.tools.ant.taskdefs.optional.jsp.JspC.execute(JspC.java:422
> )
>         at org.apache.tools.ant.Task.perform(Task.java:317)
>         at org.apache.tools.ant.Target.execute(Target.java:309)
>         at org.apache.tools.ant.Target.performTasks(Target.java:334)
>         at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
>         at org.apache.tools.ant.Project.executeTargets(Project.java:1250)
>         at org.apache.tools.ant.Main.runBuild(Main.java:606)
>         at org.apache.tools.ant.Main.start(Main.java:195)
>         at org.apache.tools.ant.Main.main(Main.java:234)
>
>
> Could this be 'cos my pages use taglibs? [I am not sure which one it is
> trying, so I can't hack it out.]

Taglibs have worked on jspc. Try getting a 4.1 drop instead, as that is
probably the best there is.


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message