Hi, Im using Tomcat 5.5.9 and JDK 1.5.0_02. Im trying to precompile the
Liferay Pro Portal 3.2 JSPs using the ant build script found on the apache
web site:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html#Web%20Appl
ication%20Compilation
modified to add jars placed in common/lib/ext. JAVA_HOME is set to
/usr/java/jdk1.5.0_02.
When I run the ant script, I get a NullPointerException. Below is the
script I am using and the output from the ant command. Any idea what I
might be doing wrong?
Thanks. -- Bud
project name=Webapp Precompilation default=all basedir=.
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
fileset dir=${tomcat.home}/common/lib/ext
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
target name=compile
mkdir dir=${webapp.path}/WEB-INF/classes/
mkdir dir=${webapp.path}/WEB-INF/lib/
javac destdir=${webapp.path}/WEB-INF/classes
optimize=off
debug=on failonerror=false
srcdir=${webapp.path}/WEB-INF/src
excludes=**/*.smap
classpath
pathelement location=${webapp.path}/WEB-INF/classes/
fileset dir=${webapp.path}/WEB-INF/lib
include name=*.jar/
/fileset
pathelement location=${tomcat.home}/common/classes/
fileset dir=${tomcat.home}/common/lib
include name=*.jar/
/fileset
fileset dir=${tomcat.home}/common/lib/ext
include name=*.jar/
/fileset
pathelement location=${tomcat.home}/shared/classes/
fileset dir=${tomcat.home}/shared/lib
include name=*.jar/
/fileset
fileset dir=${tomcat.home}/bin
include name=*.jar/
/fileset
/classpath
include name=** /
exclude name=tags/** /
/javac
/target
target name=all depends=jspc,compile
/target
/project
---
#ant -v -Dtomcat.home=/usr/local/tomcat/jakarta-tomcat-5.5.9
-Dwebapp.path=/usr/local/tomcat/jakarta-tomcat-5.5.9/webapps/liferay
Apache Ant version 1.6.2 compiled on July 16 2004
Buildfile: build.xml
Detected Java version: 1.5 in: /usr/java/jdk1.5.0_02/jre
Detected OS: Linux
parsing buildfile /usr/local/tomcat/jakarta-tomcat-5.5.9/bin/build.xml with
URI = file:///usr/local/tomcat/jakarta-tomcat-5.5.9/bin/build.xml
Project base dir set to: /usr/local/tomcat/jakarta-tomcat-5.5.9/bin
Build sequence for target `all' is [jspc, compile, all]
Complete build sequence is [jspc, compile, all, ]
jspc:
[jasper2] java.lang.NullPointerException
[jasper2] at
org.apache.jasper.JspCompilationContext.createCompiler(JspCompilationContext
.java:220)
[jasper2] at org.apache.jasper.JspC.processFile(JspC.java:849)
[jasper2] at org.apache.jasper.JspC.execute(JspC.java:991)
[jasper2] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[jasper2] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
[jasper2] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.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.java: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)
[jasper2] Error in class org.apache.jasper.JspC
BUILD FAILED
/usr/local/tomcat/jakarta-tomcat-5.5.9/bin/build.xml:27:
org.apache.jasper.JasperException
at org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:131)
at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at