tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Artur Brinkmann" <>
Subject Re: JspC exception with log4j in WEB-INF/lib
Date Mon, 10 Oct 2005 09:47:09 GMT
> But as soon as I put log4j-1.2.9.jar into my WEB-INF/lib directory, it 
> doesn't work any more. I get the following exception:
>  [jasper2] java.lang.NullPointerException
>  [jasper2]     at 
> org.apache.jasper.JspCompilationContext.createCompiler(

After building a version of Tomcat which logs the exception that happens 
when trying to create the compiler (by default it's caught without logging), 
I was able to figure out how to fix it.

Apparently, when log4j-1.2.9.jar is in WEB-INF/lib, it also needs to be in 
the ant/lib directory (or somewhere else in the Ant classpath). If it isn't 
there, a ClassNotFound exception will be thrown when trying to create the 
compiler (either Ant or JDT), but this exception is caught without logging 
and later the NullPointer exception happens.

As a side effect, I discovered that the same goes for 
jasper-compiler-jdt.jar. The JDT compiler will not be used unless it's in 
the Ant classpath.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message