Can't use REST with 6.3.3

Monday, 13 December 2010 · 3 messages
MD
Mahender Didwania13 Dec 2010 15:35 #
Hi, Two things: 1. Earlier I was using version 6.2.9 and the class StartJaxRx.java seemed to work fine. The need is to have the ability to invoke the server from a script. I can't find the StartJaxRx in 6.3.3 any more. Using the old class with 6.3.3, the server says it started up fine, but when I attempt to access it over HTTP/REST, I get error for /basex/jax-rx (note that /basex/ is okay): Problem accessing /basex/jax-rx/. Reason: tried to access method org.basex.server.ClientSession.execute(Ljava/lang/String;Ljava/io/OutputStream;)V from class org.basex.api.jaxrx.BXOutput Caused by:
java.lang.IllegalAccessError: tried to access method org.basex.server.ClientSession.execute(Ljava/lang/String;Ljava/io/OutputStream;)V from class org.basex.api.jaxrx.BXOutput
	at org.basex.api.jaxrx.BXOutput.exec(BXOutput.java:62)
	at org.basex.api.jaxrx.BXJaxRx$1.code(BXJaxRx.java:61)
	at org.basex.api.jaxrx.BXCode.run(BXCode.java:56)
	at org.basex.api.jaxrx.BXOutput.write(BXOutput.java:51)
	at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:71)
	at com.sun.jersey.core.impl.provider.entity.StreamingOutputProvider.writeTo(StreamingOutputProvider.java:57)
	at com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:299)
	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1326)
	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1239)
	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1229)
	at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:420)
	at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:497)
	at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:684)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:326)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
	at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
2. For version 6.1, you provide various files, including a .zip, on your website; for 6.3.3, you only provide basex.jar and basex-api.jar. I had earlier created my own maven build to include all dependencies (including the ones from java.net repository), but as noted above, I cannot get 6.3.3 to work. Could you please provide a .zip file for every release like you have for 6.1 on your web-site (merely replacing BaseX61.jar with basex.jar and BaseX61-jaxrx.jar with basex-api.jar (for 6.3.3 versions) does not seem to help)? Thanks, Mahender.
CG
Christian Grün13 Dec 2010 16:03 #
Mahender, thanks for your feedback. The release of BaseX 6.5 is near, which will include all necessary files to run the JaxRx server out of the box.
MD
Mahender Didwania13 Dec 2010 17:05 #
Hi, Many thanks and I very much appreciate the lightening fast response. Upon reviewing the steps mentioned by you and what my maven build does, I found the only material difference (from the pt. of view of ability to invoke server from command-line) was that the class name was changed (for invoking the REST server) from org.basex.examples.jaxrx.StartJaxRx to rg.basex.api.jaxrx.JaxRxServer. I can run it successfully now. Thanks, Mahender
Quoted text · Christian Grün · 9 lines
----- Original Message ----- From: "Christian Grün" <christian.gruen at gmail.com> To: "Mahender Didwania" <mahender at didwania.co.uk> Cc: "basex-talk" <basex-talk at mailman.uni-konstanz.de> Sent: Monday, December 13, 2010 3:03:49 PM GMT +00:00 GMT Britain, Ireland, Portugal Subject: Re: [basex-talk] Can't use REST with 6.3.3 Mahender, thanks for your feedback. The release of BaseX 6.5 is near, which will include all necessary files to run the JaxRx server out of the box.

⚡Generated with XQuery