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 2011/09/23 15:05:38 UTC

DO NOT REPLY [Bug 51883] New: NullPointerException in StandardContextValve.invoke

https://issues.apache.org/bugzilla/show_bug.cgi?id=51883

             Bug #: 51883
           Summary: NullPointerException in StandardContextValve.invoke
           Product: Tomcat 7
           Version: 7.0.19
          Platform: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: stfighter@mail.ru
    Classification: Unclassified


>From time to time I get NullPointerException in StandardContextValve during
Comet-based application. After this the request isn't handled correctly. Here
is the stack trace. This issue pops up periodically, but inconsistently, I
cannot describe how to reproduce it. Here is the exception stack trace.

23.09.2011 16:48:44 org.apache.catalina.connector.CoyoteAdapter service
SEVERE: An exception or error occurred in the container during the request
processing
java.lang.NullPointerException
    at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:124)
    at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
    at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
    at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:851)
    at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
    at
org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:313)
    at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
    at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1544)
    at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:636)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 51883] NullPointerException in StandardContextValve.invoke

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51883

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|                            |WONTFIX

--- Comment #5 from Mark Thomas <ma...@apache.org> 2011-10-19 16:25:09 UTC ---
Three weeks and no further information. Closing as WONTFIX as per previous
comment.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 51883] NullPointerException in StandardContextValve.invoke

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51883

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 51883] NullPointerException in StandardContextValve.invoke

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51883

--- Comment #2 from Edward Alexandrov <st...@mail.ru> 2011-09-23 13:37:14 UTC ---
The app is definitely running

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 51883] NullPointerException in StandardContextValve.invoke

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51883

--- Comment #3 from Konstantin Kolinko <kn...@gmail.com> 2011-09-27 00:55:40 UTC ---
It looks a lot like bug 51494 (NPE in StandardContextValve if request is being
processed while webapp is being redeployed), but that should have been fixed in
7.0.19.

Note, that it contradicts with your
> The app is definitely running

but I see no other way how this issue can occur in StandardContextValve.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 51883] NullPointerException in StandardContextValve.invoke

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51883

Konstantin Kolinko <kn...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         OS/Version|                            |All

--- Comment #1 from Konstantin Kolinko <kn...@gmail.com> 2011-09-23 13:30:13 UTC ---
In TOMCAT_7_0_19: (The code is the same in the current trunk)
It is inside the following method:
  public final void invoke(Request request, Response response)
  throws IOException, ServletException {

122     // Wait if we are reloading
123     boolean reloaded = false;
124     while (context.getPaused()) {
125     reloaded = true;
126     try {
127     Thread.sleep(1000);
128     } catch (InterruptedException e) {
129     // Ignore
130     }
131     }

The only reason that I see why context can be null on line 124 is that the
webapp has been stopped.

In that case you would not be able to process the request anyway. The NPE is
unexpected, but it saves you from infinite looping there.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 51883] NullPointerException in StandardContextValve.invoke

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51883

--- Comment #4 from Mark Thomas <ma...@apache.org> 2011-09-27 10:59:44 UTC ---
There are a number of things that are odd about this bug report.

1. It states that this occurs for Comet requests but the stack trace shows that
a non-Comet request is being processed since Http11NioProcessor.process()
appears rather than Http11NioProcessor.event()

2. The NPE can only occur if the Context has been stopped but it is stated that
the application is running.

There is more going on here than the information available so far suggests.
Without further information that explains what is happening this issue will
eventually get resolved as WONTFIX.

What we really need to know is how to reproduce this issue or enough clues to
enable us to make an educated guess as to how this is happening. The questions
that spring to mind at this point are:
- Has the application ever been reloaded?
- Might these errors be triggered as an inactive request times out?
- Access log entries for the relevant requests would also help

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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