You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2007/02/05 12:21:10 UTC

DO NOT REPLY [Bug 41539] New: - NullPointerException during Embedded tomcat restart

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=41539>.
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=41539

           Summary: NullPointerException during Embedded tomcat restart
           Product: Tomcat 5
           Version: 5.5.17
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: jason.polites@gmail.com


java.lang.NullPointerException
        at
org.apache.naming.resources.WARDirContext.treeLookup(WARDirContext.java:792)
        at
org.apache.naming.resources.WARDirContext.getAttributes(WARDirContext.java:443)
        at
org.apache.naming.resources.WARDirContext.getAttributes(WARDirContext.java:424)
        at
org.apache.naming.resources.BaseDirContext.getAttributes(BaseDirContext.java:724)
        at
org.apache.naming.resources.ProxyDirContext.cacheLoad(ProxyDirContext.java:1525)
        at
org.apache.naming.resources.ProxyDirContext.cacheLookup(ProxyDirContext.java:1448)
        at
org.apache.naming.resources.ProxyDirContext.lookup(ProxyDirContext.java:282)
        at
org.apache.tomcat.util.http.mapper.Mapper.internalMapWrapper(Mapper.java:781)
        at org.apache.tomcat.util.http.mapper.Mapper.internalMap(Mapper.java:625)
        at org.apache.tomcat.util.http.mapper.Mapper.map(Mapper.java:515)
        at
org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:272)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:146)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:595)

---------------------

Occurs when restarting an instance of org.apache.catalina.startup.Embedded

Single WAR context (DocBase points directly to WAR file).  Restart is issued by
stop(), then destroy(), followed by standard start-up process.  Application runs
successfully until restart.

Various combinations of stop() vs. destroy() have been used.  No change in result.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 41539] - NullPointerException during Embedded tomcat restart

Posted by bu...@apache.org.
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=41539>.
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=41539


markt@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|blocker                     |major
             Status|NEW                         |NEEDINFO




------- Additional Comments From markt@apache.org  2007-02-06 17:39 -------
Can you provide the source for a simple test case that exhibits this issue?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 41539] - NullPointerException during Embedded tomcat restart

Posted by bu...@apache.org.
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=41539>.
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=41539


markt@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|major                       |enhancement




------- Additional Comments From markt@apache.org  2007-02-27 19:56 -------
I can reproduce a variation of this. Looking at the JavaDoc for the Embedded class:
<quote>
After normal operations have begun, you can add and remove Connectors, Engines,
Hosts, and Contexts on the fly. However, once you have removed a particular
component, it must be thrown away -- you can create a new one with the same
characteristics if you merely want to do a restart.
</quote>

I don't believe the current code supports what you are trying to do. I am going
to  change this to an enhancement but I haven't looked into how feasible it
would be to implement. As always, patches are welcomed.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 41539] - NullPointerException during Embedded tomcat restart

Posted by bu...@apache.org.
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=41539>.
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=41539





------- Additional Comments From jason.polites@gmail.com  2007-02-06 23:44 -------
It's difficult to pull out an isolated test case, an I know this makes it
difficult to diagnose, however I do have some additional info:

When debugging, I noticed that after the stop command is issued, not all
connectors die. It seems that internally tomcat establishes an HTTP connection,
which causes the HTTP connector to "re-initialise".  Because the connector had
previously been stopped, it is in an uninitialised state but the "initialised"
boolean value within the Connector is still set to true.  Hence Embedded thinks
the Connector is initialised (and I get a "Connector already initialised" INFO
log) and so the subsequent intialisation issued by the "start" command is
ignored.  The end result is that the connector is in a misaligned state
(destroyed, but marked as initialised).

Even though I am creating a "new" Embedded, somehow the "old" connector is being
reused (I have verified this during debug).. perhaps some static references
being held somewhere?

I haven't tried altering the source for testing, and am not sure if this
initialisation confusion is the problem, but it seems to me the "initialised"
boolean should be reset when the Connector is destroyed.  Alternatively (and
preferrably), perhaps there should not be any static references held after the
Embedded instance is stopped?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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