Nullpointerexception on request.getHeaderNames method call in websphere

In websphere (version 6 sp11), when I call the request.getHeaderNames method, I get this exception

java.lang.NullPointerException

            at com.ibm.ws.webcontainer.srt.SRTServletRequest.getHeaderNames(SRTServletRequest.java:345)

            at ....

I do not have source code for SRTServletRequest.

Has anyone encountered this problem?

+3
source share
2 answers

Finally, I have an answer, thanks to everyone for helping me. the problem was as follows: 1. the developer saved the request in the class field and 2. according to the request field of the time level to which access is made, some other thread starts and ends, therefore, it destroys the call and nullPointer.

+3
source

NPE .

, WebSphere, NPE SRTServletRequest.getHeaderNames() , , , " ". , , WebSphere . , , WebSphere Spring, , , , WebSphere .

doPost() getHeaderNames(), , -, WebSphere , ? - , .

+1

Source: https://habr.com/ru/post/1713825/


All Articles