RE: NullPointerException in MimeHeaders
Thanks for the comment, I will search our code and see where we modify the headers concurrently. Bertalan Kis -Original Message- From: Konstantin Kolinko [mailto:knst.koli...@gmail.com] Sent: 03 February 2010 06:34 To: Tomcat Users List Subject: Re: NullPointerException in MimeHeaders 2010/2/2 Bertalan Kis bertalan@razorfish.com: It seems attachments are disabled. Here are the stacktraces: Jan 29, 2010 1:13:20 AM com.sun.xml.ws.transport.http.servlet.WSServletDelegate doGet SEVERE: caught throwable java.lang.NullPointerException at org.apache.tomcat.util.http.MimeHeaders.setValue(MimeHeaders.java:269) (...) At my company we can see NullPointerExceptions in the catalina.out files (see the attachments). We use Tomcat 6.0.14 on our 4 servers https://issues.apache.org/bugzilla/show_bug.cgi?id=47655#c9 Though that might not help you to find an error in your code. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
NullPointerException in MimeHeaders
Hi, At my company we can see NullPointerExceptions in the catalina.out files (see the attachments). We use Tomcat 6.0.14 on our 4 servers to handle web service calls from another tier of the application. The errors occur when the soap call was processed and ready to send the prepared response back to the clients. The errors force the web services client framework to resend the same soap request to the Tomcats when they are processed again. Some of our web services treat this as a business logic failure. We can't reproduce the issue on our test and development environments, it is appearing only on the production environment. The errors are seen usually 1-2 servers. When we restart the tomcats the errors can disappear from a server, but it may appear on another. The first errors were appeared after a restart of the platform, there were no new application deployed or configuration change made. Before the errors the same version of the application was running more than one and half month without problem. Different versions of the application was running fine for more than a half year. Tomcat developers gave me a hint to try the org.apache.catalina.connector.RECYCLE_FACADES=true system property to avoid reuse of request and response objects, but it was not working. We have no idea what can cause this. Can the clients cause the error? I hope someone can help me find a solution for this issue. Bertalan Kis - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: NullPointerException in MimeHeaders
(UTF8OutputStreamWriter.java:162) at com.sun.xml.stream.writers.XMLStreamWriterImpl.flush(XMLStreamWriterImpl.java:401) at com.sun.xml.stream.writers.XMLStreamWriterImpl.get(XMLStreamWriterImpl.java:2117) at com.sun.xml.ws.streaming.XMLStreamWriterUtil.getOutputStream(XMLStreamWriterUtil.java:69) at com.sun.xml.ws.message.jaxb.JAXBMessage.writePayloadTo(JAXBMessage.java:313) at com.sun.xml.ws.message.AbstractMessageImpl.writeTo(AbstractMessageImpl.java:142) at com.sun.xml.ws.encoding.StreamSOAPCodec.encode(StreamSOAPCodec.java:108) at com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:258) at com.sun.xml.ws.transport.http.HttpAdapter.encodePacket(HttpAdapter.java:320) at com.sun.xml.ws.transport.http.HttpAdapter.access$100(HttpAdapter.java:93) at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:454) at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244) at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135) at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:129) at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:160) at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:75) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.dnaO2.openspace.client.filter.MetadataRequestSynchFilter.doFilter(MetadataRequestSynchFilter.java:54) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:354) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) Jan 29, 2010 1:13:20 AM org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler process SEVERE: Error reading request, ignored java.lang.NullPointerException at org.apache.tomcat.util.http.MimeHeaders.clear(MimeHeaders.java:130) at org.apache.coyote.Response.recycle(Response.java:579) at org.apache.coyote.http11.InternalOutputBuffer.nextRequest(InternalOutputBuffer.java:349) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:901) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:354) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) Bertalan Kis -Original Message- From: Bertalan Kis Sent: 02 February 2010 12:25 To: users@tomcat.apache.org Subject: NullPointerException in MimeHeaders Hi, At my company we can see NullPointerExceptions in the catalina.out files (see the attachments). We use Tomcat 6.0.14 on our 4 servers to handle web service calls from another tier of the application. The errors occur when the soap call was processed and ready to send the prepared response back to the clients. The errors force the web services client framework to resend the same soap request to the Tomcats when they are processed again. Some of our web services treat this as a business logic failure. We can't reproduce the issue on our test and development environments, it is appearing only on the production environment. The errors are seen usually 1-2 servers. When we restart the tomcats
RE: NullPointerException in MimeHeaders
From: Bertalan Kis [mailto:bertalan@razorfish.com] Subject: RE: NullPointerException in MimeHeaders com.dnaO2.openspace.client.filter.MetadataRequestSynchFilter.doFilter (MetadataRequestSynchFilter.java:54) The above is the spot you should be looking at, since that's the only stack entry for your code. One possible problem is incorrect variable scope, such as using a static or instance variable in a filter or servlet when you should be using a local one. Static and instance variables are shared by all requests, so any concurrent threads using them can trip each other up. The same issue applies to request-specific information being stored in a session while multiple requests are being processed. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: NullPointerException in MimeHeaders
Hi, That piece of code was not changed since 2008 March and the application was working fine with this code more than half year. I can't see any suspicious in that class, maybe you can: public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException { if (isMetadataRequest(request)) { log.info(Metadata request (wsdl/xsd) received, performing synchronization.); synchronized (lock) { filterChain.doFilter(request, response); } } else { filterChain.doFilter(request, response); // row 54 } } private boolean isMetadataRequest(ServletRequest request) { return request.getParameter(wsdl) != null || request.getParameter(WSDL) != null || request.getParameter(xsd) != null; } Cheers, Bertalan Kis -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: 02 February 2010 12:53 To: Tomcat Users List Subject: RE: NullPointerException in MimeHeaders From: Bertalan Kis [mailto:bertalan@razorfish.com] Subject: RE: NullPointerException in MimeHeaders com.dnaO2.openspace.client.filter.MetadataRequestSynchFilter.doFilter (MetadataRequestSynchFilter.java:54) The above is the spot you should be looking at, since that's the only stack entry for your code. One possible problem is incorrect variable scope, such as using a static or instance variable in a filter or servlet when you should be using a local one. Static and instance variables are shared by all requests, so any concurrent threads using them can trip each other up. The same issue applies to request-specific information being stored in a session while multiple requests are being processed. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: NullPointerException in MimeHeaders
From: Bertalan Kis [mailto:bertalan@razorfish.com] Subject: RE: NullPointerException in MimeHeaders I can't see any suspicious in that class, maybe you can: The fact that the filter /sometimes/ chooses synchronization makes me very suspicious, especially since the failure occurred on the non-synchronized path. No failures being recorded for some time could well be a function of the load on the system and the occurrence of simultaneous requests. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: NullPointerException in MimeHeaders
Maybe, but I think this means that we should see the errors on all the servers and not only some of them. Currently we have 2 servers with errors and 2 without errors. It will change when we restart tomcats. Bertalan Kis -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: 02 February 2010 13:13 To: Tomcat Users List Subject: RE: NullPointerException in MimeHeaders From: Bertalan Kis [mailto:bertalan@razorfish.com] Subject: RE: NullPointerException in MimeHeaders I can't see any suspicious in that class, maybe you can: The fact that the filter /sometimes/ chooses synchronization makes me very suspicious, especially since the failure occurred on the non-synchronized path. No failures being recorded for some time could well be a function of the load on the system and the occurrence of simultaneous requests. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: NullPointerException in MimeHeaders
2010/2/2 Bertalan Kis bertalan@razorfish.com: It seems attachments are disabled. Here are the stacktraces: Jan 29, 2010 1:13:20 AM com.sun.xml.ws.transport.http.servlet.WSServletDelegate doGet SEVERE: caught throwable java.lang.NullPointerException at org.apache.tomcat.util.http.MimeHeaders.setValue(MimeHeaders.java:269) (...) At my company we can see NullPointerExceptions in the catalina.out files (see the attachments). We use Tomcat 6.0.14 on our 4 servers https://issues.apache.org/bugzilla/show_bug.cgi?id=47655#c9 Though that might not help you to find an error in your code. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org