I'm working on an ANT script now for a web application(And I have very minimal knowledge in ant script and weblogic server administration).
When I execute the ant script , everything work fine except the script fail to precompile the jsps. PFB the ant script for jsp precompile
<!-- run jsp compile -->
<target name="jspc" unless="warBuild.notRequired" depends="compileAll">
<java classname="weblogic.jspc" fork="yes" failonerror="true">
<arg line="-compiler ${WL_COMPILER} -nowarn -compileAll -webapp ${build} -depend -d ${classes}"/>
<classpath>
<pathelement path="${app.classpath};${classes}"/>
</classpath>
</java>
</target>
And PFB the error log
jspc: [java] java.lang.NullPointerException [java] at weblogic.jsp.internal.java.JavaCompilationContext$JavacJavaCompilationContext.init(JavaCompilationContext.java:67) [java] at weblogic.jsp.internal.CPL.createJavaCompilationContext(CPL.java:584) [java] at weblogic.jsp.internal.CPL.setClassLoader(CPL.java:555) [java] at weblogic.servlet.jsp.JspCLLManager.initCompilerOptions(JspCLLManager.java:396) [java] at weblogic.servlet.jsp.JspCLLManager.initialize(JspCLLManager.java:235) [java] at weblogic.servlet.jsp.JspCLLManager.(JspCLLManager.java:228) [java] at weblogic.servlet.jsp.JspCLLManager.(JspCLLManager.java:221) [java] at weblogic.servlet.jsp.JspCLLManager.compileJsps(JspCLLManager.java:126) [java] at weblogic.servlet.jsp.jspc20.runBodyInternal(jspc20.java:456) [java] at weblogic.servlet.jsp.jspc20.runBody(jspc20.java:265) [java] at weblogic.utils.compiler.Tool.run(Tool.java:158) [java] at weblogic.utils.compiler.Tool.run(Tool.java:115) [java] at weblogic.jspc.main(jspc.java:22) [jav a] Unexpected exception while compiling jsps :java.lang.NullPointerException
Any help will be appreciated .Thanks in advance
Got the solution .
The issue is because the jre version of weblogic and jre version used in the workspace(Eclipse) was different.As a result the compilation of jsps were failed.I have changed the recommended jre version, ie jre1.6 (for weblogic 10.3.5) and it worked fine.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.