ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Gibbs" <dgi...@agency.com>
Subject RE: java.lang.NoClassDefFoundError: org/apache/jasper/JspC
Date Mon, 24 Jun 2002 19:21:16 GMT
I've made a lot of progress - jspc seems to expect the libraries it requires
to be passed into the classpath attribute of the task - and not the ant
classpath.
Ant verbose has been helpful, thanks.
I've now got as far as getting a consistent null pointer exception when jspc
tries to compile the jsp pages.
As follows,

Executing 'D:\jdk1.3.1_03\jre\bin\java.exe' with arguments:
     [java] '-classpath'
     [java] 'C:\Documents and Settings\dgibbs\My
Documents\work\shop_prototype\lib\servlet.jar;C:\Documents and
Settings\dgibbs\My Documents\work\shop_prototype\lib\ant.jar;C:\Documents
and Settings\dgibbs\My
Documents\work\shop_prototype\lib\jasper-compiler.jar;C:\Documents and
Settings\dgibbs\My
Documents\work\shop_prototype\lib\jasper-runtime.jar;C:\Documents and
Settings\dgibbs\My
Documents\work\shop_prototype\lib\xmlParserAPIs.jar;C:\Documents and
Settings\dgibbs\My
Documents\work\shop_prototype\lib\xercesImpl.jar;C:\Documents and
Settings\dgibbs\My Documents\work\shop_prototype\lib\j2ee.jar;C:\Documents
and Settings\dgibbs\My
Documents\work\shop_prototype\lib\db2java.zip;C:\Documents and
Settings\dgibbs\My
Documents\work\shop_prototype\lib\log4j-1.2.jar;C:\Documents and
Settings\dgibbs\My Documents\work\shop_prototype\build;C:\Documents and
Settings\dgibbs\My Documents\work\shop_prototype\lib\common.jar;C:\Documents
and Settings\dgibbs\My
Documents\work\shop_prototype\lib\configurator.jar;C:\Documents and
Settings\dgibbs\My Documents\work\shop_prototype\lib\admin.jar;C:\Documents
and Settings\dgibbs\My
Documents\work\shop_prototype\lib\taglibs.jar;C:\Documents and
Settings\dgibbs\My
Documents\work\shop_prototype\lib\controller.jar;C:\Documents and
Settings\dgibbs\My Documents\work\shop_prototype\lib\test.jar;C:\Documents
and Settings\dgibbs\My Documents\work\shop_prototype\lib\value.jar'
     [java] 'org.apache.jasper.JspC'
     [java] '-d'
     [java] 'C:\Documents and Settings\dgibbs\My
Documents\work\shop_prototype\build\generated'
     [java] '-p'
     [java] 'com.agency.tmobile.configurator.jsp'
     [java] '-v9'
     [java] '-uriroot'
     [java] 'C:\Documents and Settings\dgibbs\My
Documents\work\shop_prototype\source\site'
     [java] '-uribase'
     [java] 'C:\Documents and Settings\dgibbs\My
Documents\work\shop_prototype\source\site'
     [java] '-die9'
     [java] 'C:\Documents and Settings\dgibbs\My
Documents\work\shop_prototype\source\site\admin\clear.jsp'
     [java] 'C:\Documents and Settings\dgibbs\My
Documents\work\shop_prototype\source\site\admin\error.jsp'
     [java] 'C:\Documents and Settings\dgibbs\My
Documents\work\shop_prototype\source\site\allowance.jsp'
     [java] 'C:\Documents and Settings\dgibbs\My
Documents\work\shop_prototype\source\site\bundle.jsp'
     [java] 'C:\Documents and Settings\dgibbs\My
Documents\work\shop_prototype\source\site\buy.jsp'
     [java] 'C:\Documents and Settings\dgibbs\My
Documents\work\shop_prototype\source\site\clear.jsp'
     [java] 'C:\Documents and Settings\dgibbs\My
Documents\work\shop_prototype\source\site\error.jsp'
     [java] 'C:\Documents and Settings\dgibbs\My
Documents\work\shop_prototype\source\site\handset.jsp'
     [java] 'C:\Documents and Settings\dgibbs\My
Documents\work\shop_prototype\source\site\handset_info.jsp'
     [java] 'C:\Documents and Settings\dgibbs\My
Documents\work\shop_prototype\source\site\includes\assistance.jsp'
     [java] 'C:\Documents and Settings\dgibbs\My
Documents\work\shop_prototype\source\site\includes\left_nav.jsp'
     [java] 'C:\Documents and Settings\dgibbs\My
Documents\work\shop_prototype\source\site\includes\nocache.jsp'
     [java] 'C:\Documents and Settings\dgibbs\My
Documents\work\shop_prototype\source\site\includes\review_or_buy.jsp'
     [java] 'C:\Documents and Settings\dgibbs\My
Documents\work\shop_prototype\source\site\includes\total_pricing.jsp'
     [java] 'C:\Documents and Settings\dgibbs\My
Documents\work\shop_prototype\source\site\index.jsp'
     [java] 'C:\Documents and Settings\dgibbs\My
Documents\work\shop_prototype\source\site\price_plan.jsp'
     [java] 'C:\Documents and Settings\dgibbs\My
Documents\work\shop_prototype\source\site\price_plan_family.jsp'
     [java] 'C:\Documents and Settings\dgibbs\My
Documents\work\shop_prototype\source\site\review.jsp'
     [java] 'C:\Documents and Settings\dgibbs\My
Documents\work\shop_prototype\source\site\services.jsp'
     [java] 'C:\Documents and Settings\dgibbs\My
Documents\work\shop_prototype\source\site\service_packs.jsp'
     [java] 'C:\Documents and Settings\dgibbs\My
Documents\work\shop_prototype\source\site\service_pack_info.jsp'
     [java] 'C:\Documents and Settings\dgibbs\My
Documents\work\shop_prototype\source\site\template.jsp'
     [java] 'C:\Documents and Settings\dgibbs\My
Documents\work\shop_prototype\source\site\topbarcontent.jsp'
     [java] 'C:\Documents and Settings\dgibbs\My
Documents\work\shop_prototype\source\site\util\configuration.jsp'
     [java] 'C:\Documents and Settings\dgibbs\My
Documents\work\shop_prototype\source\site\util\kill_session.jsp'
     [java]
     [java] The ' characters around the executable and arguments are
     [java] not part of the command.
     [java] 2002-06-24 07:50:59 - ERROR-the file '\admin\clear.jsp'
generated the following 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:97)
     [java] 	at java.io.FileOutputStream.<init>(FileOutputStream.java:57)
     [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)

I can reproduce the same error on the command line by effectively running
the same command. I did try it with a slightly shorter classpath as well
since I did hit the windows command length limit.

Now I just have to figure out where the null pointer exception is coming
from.
All wild speculations are welcome.

Dave

-----Original Message-----
From: Steve Loughran [mailto:steve_l@iseran.com]
Sent: 24 June 2002 18:46
To: Ant Users List
Subject: Re: java.lang.NoClassDefFoundError: org/apache/jasper/JspC



----- Original Message -----
From: "Dave Gibbs" <dgibbs@agency.com>
To: <ant-user@jakarta.apache.org>
Sent: Monday, June 24, 2002 9:15 AM
Subject: java.lang.NoClassDefFoundError: org/apache/jasper/JspC


> I hope some-one has solved this no-doubt simple problem,
>
> I am trying to use the jspc optional task and get the following error.
>
> "[java] java.lang.NoClassDefFoundError: org/apache/jasper/JspC
> [java] Exception in thread "main"
>
> I am using 1.5Beta3. I have the distributed "optional.jar" in the lib
> directory. I have copied "jasper-runtime.jar" and "jasper-compiler.jar" to
> the lib directory.
>
> The LOCALCLASSPATH echoed from the ant.bat is as follows
>
>
"D:\jdk1.3.1_03\lib\tools.jar;D:\jakarta-ant-1.5Beta3\lib\xml-apis.jar;D:\ja
>
karta-ant-1.5Beta3\lib\xercesImpl.jar;D:\jakarta-ant-1.5Beta3\lib\optional.j
>
ar;D:\jakarta-ant-1.5Beta3\lib\jasper-runtime.jar;D:\jakarta-ant-1.5Beta3\li
> b\jasper-compiler.jar;D:\jakarta-ant-1.5Beta3\lib\ant.jar;.;C:\Program
> Files\Apache Group\Tomcat 4.1\common\endorsed\xercesImpl.jar;C:\Program
> Files\Apache Group\Tomcat
>
4.1\common\endorsed\xmlParserAPIs.jar;D:\DB2\java\db2java.zip;D:\DB2\java\ru
> ntime.zip;D:\DB2\java\sqlj.zip;D:\DB2\bin;C:\Documents and
> Settings\dgibbs\My
>
Documents\work\shop_prototype\lib\j2ee.jar;D:\jakarta-log4j-1.2\dist\lib\log
> 4j-1.2.jar;"

1. You shoudnt need a CLASSPATH at all to run ant; set CLASSPATH="" and see
what happens
2. post an ant -verbose run, which will print out the classpath that jspc
uses


>
> Do y'all believe the error to be as reported  or could it be some further
> dependency ? As a reality check I have been trying to run jspc.bat from
the
> tomcat 4.1 distribution and am getting a similarly inexplicable
> NoClassDefFoundError for "org/xml/sax/SAXException". I'm a bit puzzled
since
> this class is distributed in "..\common\endorsed\xmlParserAPIs.jar".
> Is it something to do with the uninitialised property
> -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%"
> which I find in the jasper.bat file ? I'm not sure about the meaning if
the
> "endorsed directories".

that is a java1.4 thing. Are you running java1.4


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