tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksander Grzebyta" <aleksander.grzeb...@talex.com.pl>
Subject java.lang.NullPointerException at "TldLocationsCache.processJars" when running Tomcat 4.x built from sources
Date Sun, 16 Jun 2002 21:12:26 GMT
Dear Collegues !

0.

I think the problem is enough close to source that I can post my help
request here. I did not obtain any answer in user list and did some code
introspection. Any help will be appreciated.

1.

I tried to build Tomcat 4.0.3 and then 4.1 (from cvs) and every time failing
the same way (!) when running the built project. (running tomcat and
pointing the browser to http://localhost:8080).
The compilation run rather fine - just some depreciation warnings. I
followed instructions in BUILT.txt.
Please point me into the right direction. I know something went wrong. But
what ? Has anybody similar problems ?

There were some inconsistences:

3.

The downloaded "jakarta-tomcat-connectors" does not contain
SystemLogHandler.class" - I found it on the one downloaded from cvs.

4.

Also there were no
# ----- Commons Logging, version 1.0.1 or later -----
in the location pointed in build.properties.sample file:
commons-logging.loc=http://jakarta.apache.org/builds/jakarta-commons/release
/commons-logging/v1.0.1/commons-logging-1.0.1.tar.gz
I have found them also somewhere among cvs downloaded files.


5.

After some introspcetion of the code I found out that in file
ApplicationContext.java there is a masked exception in the followin method:

private Set getResourcePathsInternal(DirContext resources, String path) {

        ResourceSet set = new ResourceSet();
        try {
            listCollectionPaths(set, resources, path);
        } catch (NamingException e) {
                        return (null);
        }
        set.setLocked(true);
        return (set);

    }

And that's why I obtain NullPointerException.


After further introspcetion I foun out that the problem is somewhere under
the following call:

private static void listCollectionPaths
        (Set set, DirContext resources, String path)
        throws NamingException {

        System.out.println("ControlPoint_)" );

>>>>>>>>>>>>>>>>>>>>>> 
      Enumeration childPaths =
resources.listBindings(path);

My output of running the Tomcat is as follows with printStackTrace() of the
exception caught in getResourcePathsInternal method:

F:\t4tlx\jakarta-tomcat-4.0\build\bin>startup
Using CATALINA_BASE:   ..
Using CATALINA_HOME:   ..
Using CATALINA_TMPDIR: ..\temp
Using JAVA_HOME:       f:\j\jdk140
2002-06-16 22:45:19 org.apache.commons.modeler.Registry loadRegistry
INFO: Loading registry information
2002-06-16 22:45:19 org.apache.commons.modeler.Registry getRegistry
INFO: Creating new Registry instance
2002-06-16 22:45:19 org.apache.commons.modeler.Registry getServer
INFO: Creating MBeanServer
2002-06-16 22:45:20 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 8080
2002-06-16 22:45:20 org.apache.jk.server.JkMain init
INFO: Starting Jk2, base dir= .. conf=..\conf\jk2.properties
2002-06-16 22:45:20 org.apache.jk.server.JkMain start
INFO: APR not loaded, disabling jni components: java.io.IOException: no
jkjni in java.library.path
2002-06-16 22:45:20 org.apache.jk.common.ChannelSocket init
INFO: JK: listening on tcp port 8019
2002-06-16 22:45:20 org.apache.jk.common.ChannelUn init
INFO: No file, disabling unix channel
2002-06-16 22:45:20 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 ... init time=80 ms
Starting service Tomcat-Standalone
Apache Tomcat/4.1
ServletContext implemented by:
org.apache.catalina.core.ApplicationContextFacade
getResourcePaths uses path = /WEB-INF/lib
V2
ControlPoint_0
Exception Caught
javax.naming.NamingException: Resource /WEB-INF/lib not found
        at
org.apache.naming.resources.FileDirContext.listBindings(FileDirContext.java:
364)
        at
org.apache.naming.resources.ProxyDirContext.listBindings(ProxyDirContext.jav
a:523)
        at
org.apache.catalina.core.ApplicationContext.listCollectionPaths(ApplicationC
ontext.java:1108)
        at
org.apache.catalina.core.ApplicationContext.getResourcePathsInternal(Applica
tionContext.java:722)
        at
org.apache.catalina.core.ApplicationContext.getResourcePaths(ApplicationCont
ext.java:703)
        at
org.apache.catalina.core.ApplicationContextFacade.getResourcePaths(Applicati
onContextFacade.java:158)
        at
org.apache.jasper.compiler.TldLocationsCache.processJars(TldLocationsCache.j
ava:203)
        at
org.apache.jasper.compiler.TldLocationsCache.<init>(TldLocationsCache.java:1
39)
        at
org.apache.jasper.EmbededServletOptions.<init>(EmbededServletOptions.java:35
0)
        at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:265)
        at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91
9)
        at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:811)
        at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3294)
        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3486)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
        at
org.apache.catalina.core.StandardHost.start(StandardHost.java:738)
        at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
        at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:347)
        at
org.apache.catalina.core.StandardService.start(StandardService.java:497)
        at
org.apache.catalina.core.StandardServer.start(StandardServer.java:2185)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:510)
        at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
        at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)
ServletContext implemented by:
org.apache.catalina.core.ApplicationContextFacade


6.

sincerely Olek
Poznan, Poland

System : w2k
JDK: 1.4.0
ANT: 1.4.1

Tomcat 4.0.3 - source download
Tomcat 4.1 from cvs


7.

javax.servlet.ServletException: Servlet.init() for servlet jsp threw
exception
 at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:94
7)
 at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:656)
 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:214)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.ja
va:191)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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:2350)
 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
 at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:171
)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.invok
eNext(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.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
 at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
 at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:380)
 at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
 at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:518)
 at java.lang.Thread.run(Thread.java:536)

root cause
java.lang.NullPointerException
 at
org.apache.jasper.compiler.TldLocationsCache.processJars(TldLocationsCache.j
ava:203)
 at
org.apache.jasper.compiler.TldLocationsCache.(TldLocationsCache.java:139)
 at org.apache.jasper.EmbededServletOptions.(EmbededServletOptions.java:350)
 at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:265)
 at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:91
9)
 at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:656)
 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:214)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.ja
va:191)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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:2350)
 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
 at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:171
)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(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.invok
eNext(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.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
 at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
 at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:380)
 at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
 at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:518)
 at java.lang.Thread.run(Thread.java:536)





--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message