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 2013/09/07 07:43:52 UTC
[Bug 55533] New: ProxyDirContext throws null pointer exception on
reloaded context
https://issues.apache.org/bugzilla/show_bug.cgi?id=55533
Bug ID: 55533
Summary: ProxyDirContext throws null pointer exception on
reloaded context
Product: Tomcat 7
Version: 7.0.41
Hardware: Macintosh
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
Assignee: dev@tomcat.apache.org
Reporter: matthauck@gmail.com
This looks to be a repeat of bug #24588, from some time ago...
I am actually able to reproduce this same issue consistently on tomcat 7.0.41
whenever I make a request on a reloaded context.
1) Deploy war (unpacked) onto tomcat (embedded,
org.apache.catalina.startup.Tomcat) with context set to reloadable
2) Make requests to webapp, works fine
3) Recompile war to trigger context reload
4) Each request to webapp gives this stacktrace
2013-09-06 22:32:35,093 [http-nio-8080-exec-8] ERROR
org.apache.coyote.http11.Http11NioProcessor - Error processing request
java.lang.NullPointerException
at
org.apache.naming.resources.ProxyDirContext.cacheLoad(ProxyDirContext.java:1660)
at
org.apache.naming.resources.ProxyDirContext.cacheLookup(ProxyDirContext.java:1536)
at
org.apache.naming.resources.ProxyDirContext.lookup(ProxyDirContext.java:297)
at
org.apache.tomcat.util.http.mapper.Mapper.internalMapWrapper(Mapper.java:1009)
at org.apache.tomcat.util.http.mapper.Mapper.internalMap(Mapper.java:821)
at org.apache.tomcat.util.http.mapper.Mapper.map(Mapper.java:684)
at
org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:647)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:403)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1686)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Checked, and it is failing on the same line:
int n = is.read(b, pos, length - pos);
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 55533] ProxyDirContext throws null pointer exception on
reloaded context
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55533
Matt Hauck <ma...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
--- Comment #3 from Matt Hauck <ma...@gmail.com> ---
So, it turns out there were some memory leak issues when stopping the tomcat
container. These would appear whenever I called tomcat.stop() or
context.reload(). I started to tackle these and, after doing, this problem
appears to have gone away.
Here were the memory leak issues I had:
- log4j 1.2 AsyncAppender which I did not explicitly `close()`
- an ExecutorService that I did not `shutdown()`
- a ScheduledThreadPoolExecutor that I did not `shutdown()`
After fixing these three things, I do not see this issue anymore. Not sure if
that helps track down the issue or not...
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 55533] ProxyDirContext throws null pointer exception on
reloaded context
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55533
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 55533] ProxyDirContext throws null pointer exception on
reloaded context
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55533
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
--- Comment #4 from Mark Thomas <ma...@apache.org> ---
The resource lookups go via JNDI and that uses the thread context class loader
to identify the correct resource set. My best guess is that a thread in the
executor was retaining a reference to the old class loader and that was messing
up the JNDI lookup.
I don't think there is anything that could be done in Tomcat to fix this. It is
a useful data point for folks that see similar issues in the future. Thanks for
doing the research and reporting back your findings.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 55533] ProxyDirContext throws null pointer exception on
reloaded context
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55533
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS| |All
--- Comment #1 from Mark Thomas <ma...@apache.org> ---
I can't repeat this with the latest 7.0.x code and the examples web
application.
Please provide the exact steps to reproduce this from a clean install of the
latest 7.0.x embedded distribution and the examples web application.
If it is not possible to reproduce this with the examples web application then
please provide the simplest possible web application necessary to recreate the
issue.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 55533] ProxyDirContext throws null pointer exception on
reloaded context
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55533
--- Comment #2 from Matt Hauck <ma...@gmail.com> ---
I have no idea how to whittle it down to the simplest possible webapp that
reproduces the problem. (And the webapp I'm working on is unfortunately far
from simple.) I have zero experience with tomcat internals; Do you have any
guidance on directions I can look into?
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org