JSP precompilation, jspc, NullPointerException
Hi, I try to get the precompilation working with tomcat 5.5.7 under Windows NT. I use the following target: target name=jspc taskdef classname=org.apache.jasper.JspC name=jasper2 classpath id=jspc.classpath pathelement location=${java.home}/../lib/tools.jar/ fileset dir=${tomcat.home}/bin include name=*.jar/ /fileset fileset dir=${tomcat.home}/server/lib include name=*.jar/ /fileset fileset dir=${tomcat.home}/common/lib include name=*.jar/ /fileset /classpath /taskdef jasper2 validateXml=false uriroot=${webapp.path} webXmlFragment=${webapp.path}/WEB-INF/generated_web.xml outputDir=${webapp.path}/WEB-INF/src / /target And I'm getting a NullPointer Exception (see below), looks like the Jasper cannot be created. Anyone has a clue why this happens? Thanks for your help Bernhard jspc: [jasper2] java.lang.NullPointerException [jasper2] at org.apache.jasper.JspCompilationContext.createCompiler(JspCom pilationContext.java:220) [jasper2] at org.apache.jasper.JspC.processFile(JspC.java:847) [jasper2] at org.apache.jasper.JspC.execute(JspC.java:989) [jasper2] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [jasper2] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces sorImpl.java:39) [jasper2] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet hodAccessorImpl.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.ja va: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.executeTarget(Project.java:1214) [jasper2] at org.apache.tools.ant.Project.executeTargets(Project.java:1062 ) [jasper2] at org.apache.tools.ant.Main.runBuild(Main.java:673) [jasper2] at org.apache.tools.ant.Main.startAnt(Main.java:188) [jasper2] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196) [jasper2] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55) BUILD FAILED D:\work\jspdeploy2\precompile.xml:25: org.apache.jasper.JasperException - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
jspc NullPointerException
Hey, I try to compile a JSP with the jspc-Script. I download the binary-distritbution fo tomcat-1.4.12. My Java-Version is 1.4.0 If i execute the following command a NullPointerException is thrown. ./jspc.sh -uriroot ../webapps/examples ../webapps/examples/jsp/colors/colrs.jsp 2002-11-18 10:13:30 - ERROR-the file '/jsp/colors/colrs.jsp' generated the following general exception: java.lang.NullPointerException error:null Several variations of options could't help Thanks for help Holger -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: jspc NullPointerException
Try to isolate the error further, error:null seems like it is coming from a: catch(Exception e){ System.out.println(error: + e.getMessage()); } in your code. Null pointer exception is very often a call to a method on an object which has not been instantiated. Andoni. - Original Message - From: Holger Veltrup [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, November 18, 2002 9:15 AM Subject: jspc NullPointerException Hey, I try to compile a JSP with the jspc-Script. I download the binary-distritbution fo tomcat-1.4.12. My Java-Version is 1.4.0 If i execute the following command a NullPointerException is thrown. ./jspc.sh -uriroot ../webapps/examples ../webapps/examples/jsp/colors/colrs.jsp 2002-11-18 10:13:30 - ERROR-the file '/jsp/colors/colrs.jsp' generated the following general exception: java.lang.NullPointerException error:null Several variations of options could't help Thanks for help Holger -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
jspc NullPointerException
Hey, I try to compile a JSP with the jspc-Script. I download the binary-distritbution tomcat-1.4.12. My Java-Version is 1.4.0 If I execute the following command a NullPointerException is thrown. ./jspc.sh -uriroot ../webapps/examples ../webapps/examples/jsp/colors/colrs.jsp 2002-11-18 10:13:30 - ERROR-the file '/jsp/colors/colrs.jsp' generated the following general exception: java.lang.NullPointerException error:null Several variations of options don't help Thanks for help Holger -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Re: jspc NullPointerException
I use the tomcat example of downloaded distribution. There is not my owen code intergrated. The same call (./jspc.sh -uriroot ../webapps/examples ../webapps/examples/jsp/colors/colrs.jsp) works with tomcat 4.0.3 Try to isolate the error further, error:null seems like it is coming from a: catch(Exception e){ System.out.println(error: + e.getMessage()); } in your code. Null pointer exception is very often a call to a method on an object which has not been instantiated. Andoni. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]