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 Sat, 29 Jun 2002 01:05:10 GMT
> <jspc
>                                 srcdir="${src}"
>                                 destdir="${build}/${openbiz.part}"
>                                 package="com.openbiz.jsp"
>                                 verbose="9"
>                                 uriroot="${src}"
>                                 classpathref="project.class.path"
>                         >
>                         <include name="**/*.jsp" />
> </jspc>
>
> The WEB-INF directory is below here.

STEVE>That should work. i say should, because it clearly doesnt.

STEVE>One thing I will have to look at is classpath handling. You do not
need TLD
STEVE>implementations on the classpath, just the .tld files in /webinf or
whatever
STEVE>off uriroot.

For this test I am using some JSPs with no TagLibs, and only one
jsp:include. Heck, I even just took that out, and got the same result. I
removed WEB-INF and same result. I removed all JSP .. it worked :-) -- but
did nothing. I emptied my JSP -- empty file, it crashed same as before.

Off into wild guessing, but could it be my environment? My various versions
of classes (I have a bucket-o-load of Jakata software, thanks all, so
perhaps version mismatches?) I am wondering perhaps XML -- since I have
crimson and xerces and all. I've tried to limit my classpath to the bare
essentials, namely:

..... oops, ant -debug is telling me it is removing things from the
classpath 'cos they do not exist. [Gosh, I wish this useful error, ok --
debatably warning, came out other than jsut in debug]
It seems ANT 5 beta 3 is using xerces not crimson, I need to add that in
there. I also see my compile-time classpath is getting put before the system
env classpath (my choice) before jspc is launched, I need to change that...

... and it is working. Darn, not quite...

Now I get (per file, which is better I guess):

     [echo] SRC : .
     [echo] DEST : F:/java/build/webadmin
     [echo] URIROOT : .
     [jspc] Compiling 41 source filesF:\java\build\webadmin\com\openbiz\jsp
     [java] 2002-06-28 06:36:12 - ERROR-the file '\active.jsp' generated the
fol
lowing general exception: java.lang.NullPointerException
     [java] java.lang.NullPointerException
     [java]     at java.io.FileOutputStream.open(Native Method)
     [java]     at
java.io.FileOutputStream.<init>(FileOutputStream.java:102)
     [java]     at java.io.FileOutputStream.<init>(FileOutputStream.java:62)
     [java]     at
org.apache.jasper.compiler.Compiler.compile(Compiler.java:153
)
     [java]     at org.apache.jasper.JspC.parseFile(JspC.java:427)
     [java]     at org.apache.jasper.JspC.parseFiles(JspC.java:747)
     [java]     at org.apache.jasper.JspC.main(JspC.java:762)

The directory exists, and I do see a created directory:

	 f:/java/build/webadmin/com/openbiz/jsp

any thoughts? Clearly it seems like I have a better (hopefully right)
classpath for running Jasper, but now it seems the outputfile is somehow
making it sick. I've move it onto the same disk, I've moved it to the same
directory as source.

Just in case it is environment realted again:

CLASSPATH=F:\apps\apache\jakarta-tomcat-4.1.3\common\lib\jasper-compiler.jar
;F:\apps\apache\jakarta-tomcat-4.1.3\common\lib\jasper-runtime.jar;F:\Ant\li
b\ant.jar;F:\Ant\lib\optional.jar;F:\Ant\lib\xml-apis.jar;F:\Ant\lib\xercesI
mpl.jar;E:\apps\other\NetComponents-1.3.8a;E:\apps\junit3.7junit.jar;E:\apps
\apache\bcel-5.0\bcel.jar;E:\apps\sforge\checkstyle-2.2\checkstyle-all-2.2.j
ar

E:\data\OpenBiz\webadmin>java -version
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)

and from ant -debug:

     [java] Executing 'C:\apps\jdk1.3.1\jre\bin\java.exe' with arguments:
     [java] '-classpath'
     [java]
'C:\apps\jdk1.3.1\lib\tools.jar;F:\Ant\lib\xml-apis.jar;F:\Ant\lib\x
ercesImpl.jar;F:\Ant\lib\optional.jar;F:\Ant\lib\ant.jar;F:\apps\apache\jaka
rta-
tomcat-4.1.3\common\lib\jasper-compiler.jar;F:\apps\apache\jakarta-tomcat-4.
1.3\
common\lib\jasper-runtime.jar;E:\apps\other\NetComponents-1.3.8a;E:\apps\jun
it3.
7\junit.jar;E:\apps\apache\bcel-5.0\bcel.jar;E:\apps\sforge\checkstyle-2.2\c
heck
style-all-2.2.jar;F:\java\build\base;F:\java\build\encoding;F:\java\build\mo
del;
F:\java\build\net;F:\java\build\template;F:\java\build\api;F:\java\build\ejb
api;
F:\java\build\system;F:\java\build\common;F:\java\build\client;F:\java\build
\adm
in;F:\java\build\agent;F:\java\build\connector;F:\java\build\process;F:\java
\bui
ld\application;F:\java\build\webservice;F:\java\build\website;E:\apps\OpenBi
z\op
enbiz_ejb_client.jar;E:\apps\OpenBiz\openbiz_ejb_package.jar;E:\apps\apache\
jaka
rta-log4j-1.2\dist\lib\log4j-1.2.jar;E:\apps\IBM\MQSeries\Java\Lib;E:\apps\I
BM\M
QSeries\Java\Lib\jms.jar;E:\apps\apache\xml-axis-beta2\lib\axis.jar;E:\apps\
apac
he\xml-axis-beta2\lib\jaxrpc.jar;E:\apps\apache\xml-axis-beta2\lib\wsdl4j.ja
r;E:
\apps\ibm\uddi4j\lib\uddi4j.jar;E:\apps\apache\xalan-j_2_2_D14\bin\xalan.jar
;E:\
apps\apache\xalan-j_2_2_D14\bin\xml-apis.jar;F:\apps\Sybase\EAServer\java\li
b\ea
sj2ee.jar;F:\apps\Sybase\EAServer\java\lib\easclient.jar;F:\apps\Sybase\EASe
rver
\java\lib\easserver.jar;F:\apps\Sybase\EAServer\html\classes'
     [java] 'org.apache.jasper.JspC'
     [java] '-d'
     [java] 'F:\java\build\webadmin'
     [java] '-p'
     [java] 'com.openbiz.jsp'
     [java] '-v9'
     [java] '-die9'
     [java] 'E:\data\OpenBiz\webadmin\index.jsp'
     [java]
     [java] The ' characters around the executable and arguments are
     [java] not part of the command.

I've manually created this invocation, without Ant, and I get the same
error. I guess I need to talk to the Jasper users list pretty soon...

regards,

Adam


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