ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 31450] New: - NullpointerException in CompilerAdapterFactory.doesModernCompilerExist()
Date Tue, 28 Sep 2004 12:12:06 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31450>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31450

NullpointerException in CompilerAdapterFactory.doesModernCompilerExist()

           Summary: NullpointerException in
                    CompilerAdapterFactory.doesModernCompilerExist()
           Product: Ant
           Version: 1.6.2
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: patrick.hensgens@LogicaCMG.com


I am running tomcat 4.1.30 (with ant.jar included) on an AMD64 Red Hat AS 3.0

I used both the j2se for linux (32bit) and the blackdown implementation for 
AMD64. 

The stacktrace points to line 178 in CompilerAdapterFactory:

try {
   CompilerAdapterFactory.class.getClassLoader().loadClass(MODERN_COMPILER);
   return true;
} catch (ClassNotFoundException cnfe2) {
}

Aparently the getClassLoader() method returns null. According to the api 
documentation this is possible for some implementations. As a result tomcat is 
unable to compile jsp's (jsp -> servlet works, servlet -> class doesn't)

It would be a good idea to catch the NullpointerException and add a line of 
logging.

org.apache.jasper.JasperException: Unable to compile class for JSP
        at org.apache.jasper.JspCompilationContext.compile
(JspCompilationContext.java:478)
        at org.apache.jasper.servlet.JspServletWrapper.service
(JspServletWrapper.java:190)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile
(JspServlet.java:295)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:247)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:256)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
        at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:191)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
        at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2422)
        at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
        at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:171)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:641)
        at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:163)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:641)
        at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:174)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
        at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at org.apache.catalina.connector.http.HttpProcessor.process
(HttpProcessor.java:1040)
        at org.apache.catalina.connector.http.HttpProcessor.run
(HttpProcessor.java:1151)
        at java.lang.Thread.run(Thread.java:534)
----- Root Cause -----
java.lang.NullPointerException
        at 
org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.doesModernCompile
rExist(CompilerAdapterFactory.java:178)
        at 
org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompiler
(CompilerAdapterFactory.java:132)
        at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:969)
        at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:799)
        at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:320)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:370)
        at org.apache.jasper.JspCompilationContext.compile
(JspCompilationContext.java:473)
        at org.apache.jasper.servlet.JspServletWrapper.service
(JspServletWrapper.java:190)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile
(JspServlet.java:295)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:247)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:256)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
        at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:191)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
        at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2422)
        at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
        at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:171)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:641)
        at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:163)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:641)
        at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:174)
        at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
        at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:480)
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
        at org.apache.catalina.connector.http.HttpProcessor.process
(HttpProcessor.java:1040)
        at org.apache.catalina.connector.http.HttpProcessor.run
(HttpProcessor.java:1151)
        at java.lang.Thread.run(Thread.java:534)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message