java - NullPointerException in filter from Ajax Request -
i've migrate apache nginx web server. since that, npe error filters on ajax request :
java.lang.nullpointerexception @ org.ulpmm.eev.web.administration.modifyelevedossierutilisateur.verificationdateentree(modifyelevedossierutilisateur.java:340) @ org.ulpmm.eev.web.administration.modifyelevedossierutilisateur.modifyuser(modifyelevedossierutilisateur.java:175) @ org.ulpmm.eev.web.administration.modifyelevedossierutilisateur.doprocess(modifyelevedossierutilisateur.java:142) @ org.ulpmm.eev.web.administration.modifyelevedossierutilisateur.dopost(modifyelevedossierutilisateur.java:91) @ javax.servlet.http.httpservlet.service(httpservlet.java:641) @ javax.servlet.http.httpservlet.service(httpservlet.java:722) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:305) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:210) @ org.ulpmm.eev.utils.setcharacterencodingfilter.dofilter(setcharacterencodingfilter.java:125) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:243) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:210) @ org.ulpmm.eev.filter.realipfilter.dofilter(realipfilter.java:19) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:243) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:210)
here realipfilter.java :
public void dofilter(servletrequest request, servletresponse response, filterchain chain) throws ioexception, servletexception { if (chain != null) { if (request instanceof httpservletrequest) { realiprequestwrapper rirw = new realiprequestwrapper((httpservletrequest) request); chain.dofilter(rirw, response); } else { chain.dofilter(request, response); } } }
line 19 1 chain.dofilter(rirw, response);
and setcharacterencodingfilter :
public void dofilter(servletrequest request, servletresponse response, filterchain chain) throws ioexception, servletexception { // conditionally select , set character encoding used /* if (ignore || (request.getcharacterencoding() == null)) { string encoding = selectencoding(request); if (encoding != null) request.setcharacterencoding(encoding); } */ request.setcharacterencoding("utf-8"); // pass control on next filter if (chain != null) { chain.dofilter(request, response); } }
line 125 1 chain.dofilter(request, response)
.
i thought npe on chain
added test there no change.
it seems occur ajax request. except them don't error.
it great if have clue :)
thank you.
marc
as told @marthusson , @seelenvirtuose, npe thrown in data process classes , not in filters.
the filters relays.
by fixing classes fine.
thank :)
Comments
Post a Comment