From: christophe g. <chr...@e-...> - 2013-04-04 18:09:50
|
solved - for those who encounter this behavior, %rest:POST should be %rest:POST({$data}) C. On Thu, Apr 4, 2013 at 2:09 PM, christophe geiser < chr...@e-...> wrote: > short update: > same behavior with standalone or standard mode, openJDK 6 or Sun 7, > calling post from curl or eXide (httpclient:post) > C. > > > On Thu, Apr 4, 2013 at 1:38 PM, christophe geiser < > chr...@e-...> wrote: > >> Hi all >> >> Not sure I understand what is happening here (actually, sure I don't) >> >> test case : >> >> curl -X POST -d "usr=usr&psw=psw" >> http://localhost:8088/client/restxq/deploy/123/real/true/bla >> >> with a restxq function like : >> >> declare >> %rest:POST >> %rest:path("/deploy/{$appKey}/{$deploy-type}/{$activate}/{$doc-id}") >> %rest:form-param("usr", "{$usr}", "test") >> %rest:form-param("psw", "{$psw}", "test") >> >> function rep:deploy($usr, $psw, $appKey, $deploy-type,$activate, >> $doc-id) { >> <ok/> >> }; >> >> the request return <ok/> as expected approx one time over 10. Otherwise, >> I get this : >> >> <html> >> <head> >> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> >> <title>Error 500 Server Error</title> >> </head> >> <body><h2>HTTP ERROR 500</h2> >> <p>Problem accessing /client/restxq/deploy/123/real/true/fgh. Reason: >> <pre> Server Error</pre></p><h3>Caused >> by:</h3><pre>java.lang.NullPointerException >> at >> org.exist.extensions.exquery.restxq.impl.ResourceFunctionExecutorImpl.convertToExistFunctionArguments(ResourceFunctionExecutorImpl.java:251) >> at >> org.exist.extensions.exquery.restxq.impl.ResourceFunctionExecutorImpl.execute(ResourceFunctionExecutorImpl.java:165) >> at >> org.exquery.restxq.impl.AbstractRestXqService.service(AbstractRestXqService.java:166) >> at >> org.exist.extensions.exquery.restxq.impl.RestXqServiceImpl.service(RestXqServiceImpl.java:118) >> at >> org.exist.extensions.exquery.restxq.impl.RestXqServlet.service(RestXqServlet.java:97) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) >> at >> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669) >> at >> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455) >> at >> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) >> at >> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:578) >> at >> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) >> at >> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072) >> at >> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382) >> at >> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) >> at >> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006) >> at >> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) >> at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:229) >> at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:103) >> at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:47) >> at >> org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:211) >> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) >> at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669) >> at >> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455) >> at >> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) >> at >> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:560) >> at >> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) >> at >> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072) >> at >> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382) >> at >> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) >> at >> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006) >> at >> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) >> at >> org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154) >> at >> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) >> at org.eclipse.jetty.server.Server.handle(Server.java:365) >> at >> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485) >> at >> org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:937) >> at >> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:998) >> at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:856) >> at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) >> at >> org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) >> at >> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628) >> at >> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) >> at >> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) >> at >> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) >> at java.lang.Thread.run(Thread.java:662) >> </pre> >> <hr /><i><small>Powered by Jetty://</small></i><br/> >> >> <br/> >> <br/> >> <br/> >> <br/> >> <br/> >> <br/> >> <br/> >> <br/> >> <br/> >> <br/> >> <br/> >> <br/> >> <br/> >> <br/> >> <br/> >> <br/> >> <br/> >> <br/> >> <br/> >> >> </body> >> </html> >> >> I could not find anything related in the logs (jetty or eXist) >> >> #eXist build info (updated using svnkit) >> #Thu, 07 Feb 2013 11:03:29 +0100 >> #eXist build info >> project.version=2.0 >> project.build=20130207 >> svn.revision=18252 >> >> Cheers, >> C. >> >> >> -- >> ɹǝsıǝƃ ǝɥdoʇsıɹɥɔ >> e-Smile, solutions in monitoring and information management >> -- >> > > > > -- > ɹǝsıǝƃ ǝɥdoʇsıɹɥɔ > e-Smile, solutions in monitoring and information management > -- > -- ɹǝsıǝƃ ǝɥdoʇsıɹɥɔ e-Smile, solutions in monitoring and information management -- |