jetty - Facing java.lang.NoSuchMethodError: HttpServletRequest.getParts()Ljava/util/Collection -
i've seen many issues related exception here in , of them being solved adding "commons-file-upload"
jar apache. tried use solution , i've added same version of jar projects, not seem fix problem, i'm still facing problem. know question has been asked, wonder if give me hand specific problem. stacktrace:
java.lang.nosuchmethoderror: javax.servlet.http.httpservletrequest.getparts()ljava/util/collection; @ fr.synomia.v4.ws.remotelayer.ws.rest.restserver.getparameters(restserver.java:378) @ fr.synomia.v4.ws.remotelayer.ws.rest.restserver.parseurlrequest(restserver.java:367) @ fr.synomia.v4.ws.remotelayer.ws.rest.restserver.access$0(restserver.java:354) @ fr.synomia.v4.ws.remotelayer.ws.rest.restserver$1.handle(restserver.java:67) @ org.eclipse.jetty.server.handler.handlerwrapper.handle(handlerwrapper.java:110) @ org.eclipse.jetty.server.server.handle(server.java:346) @ org.eclipse.jetty.server.httpconnection.handlerequest(httpconnection.java:442) @ org.eclipse.jetty.server.httpconnection$requesthandler.headercomplete(httpconnection.java:924) @ org.eclipse.jetty.http.httpparser.parsenext(httpparser.java:582) @ org.eclipse.jetty.http.httpparser.parseavailable(httpparser.java:218) @ org.eclipse.jetty.server.asynchttpconnection.handle(asynchttpconnection.java:51) @ org.eclipse.jetty.io.nio.selectchannelendpoint.handle(selectchannelendpoint.java:586) @ org.eclipse.jetty.io.nio.selectchannelendpoint$1.run(selectchannelendpoint.java:44) @ org.eclipse.jetty.util.thread.queuedthreadpool.runjob(queuedthreadpool.java:598) @ org.eclipse.jetty.util.thread.queuedthreadpool$3.run(queuedthreadpool.java:533) @ java.lang.thread.run(thread.java:662)
the exception thrown when invoke method getparts
class restserver
using httpservletrequest
, i've been looking information , says version of jar used must same projects , did way, not working.
the piece of code invoking getparts()
:
private map<string,object> getparameters(httpservletrequest request,boolean jsonp, string callback) { map<string,object> lsparameteres = new hashmap<string, object>(); collection<part> parts = null; try { parts = request.getparts();//the exception begins here!
i grateful if me, time. best regards.
javax.servlet.http.httpservletrequest.getparts()
available starting servlet api 3.0
things check:
- be sure running jetty 9 (or newer)
- make sure have
web-inf/web.xml
configured use servlet api 3.0 (or newer) - make sure build tool using servlet-api 3.1 (or newer) jars.
- (optionally) make sure have same servlet api 3.1 jar in
web-inf/lib
directory.
Comments
Post a Comment