HTTP Server Not Serving Any RESTXQ Results

Saturday, 11 April 2015 · 5 messages · last reply 12 Apr 2015
EK
Eliot Kimber11 Apr 2015 20:31 #
I'm trying to set up some basic Web services using the basexhttp server. I'm on OS X. If I understand the docs, after running the basexhttp command, I should get the sample HTML start page returned by page:start() function defined in the restxq.xqm file when I go to http://localhost:8984 However I'm not getting that page, I'm getting a 404 response from the Jetty server: HTTP ERROR 404Problem accessing /. Reason: No function found that matches the request. Powered by Jetty:// I verified that restxq.xqm is a loaded module:
Quoted text · 1 line
> repo list
Name Version Type Path ------------------------------------- - Internal .DS_Store restxq - Internal restxq.xqm 2 package(s).
Quoted text · 1 line
>
I'm sure this worked when I first started playing with BaseX and installed it initially. I tried both 8.0.3 (the first version I used) and 8.1 with no difference. I must have done something to the configuration to cause this problem but I don't see any obvious mistake on my part: I haven't knowingly changed the web.xml or jetty.xml files and web.xml seems to clearly enable handling of root URLs by the RESTXQ handler:
  <servlet>
    <servlet-name>RESTXQ</servlet-name>
    <servlet-class>org.basex.http.restxq.RestXqServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>RESTXQ</servlet-name>
    <url-pattern>/*</url-pattern>
  </servlet-mapping>
The WebDAV service does work: I can retrieve files from specific databases using the WeDAV url. Any suggestions on where my configuration might be bad? Thanks, Eliot ————— Eliot Kimber, Owner Contrext, LLC http://contrext.com
CG
Christian Grün12 Apr 2015 01:17 #
Hi Eliot,
Quoted text · Eliot Kimber · 6 lines
> If I understand the docs, after running the basexhttp command, I should > get the sample HTML start page returned by page:start() function defined > in the restxq.xqm file when I go to http://localhost:8984 > > However I'm not getting that page, I'm getting a 404 response from the > Jetty server:
Which of our distributions (zip, war, ...) have you been using so far?
Quoted text · Eliot Kimber · 7 lines
> I verified that restxq.xqm is a loaded module: > >> repo list > Name Version Type Path > ------------------------------------- > - Internal .DS_Store > restxq - Internal restxq.xqm
restxq.xqm must indeed be located in the webapp directory, and not in the repository. Maybe you can check out the BaseX ZIP archive, it should run out of the box. Hope this helps, Christian
EK
Eliot Kimber12 Apr 2015 17:33 #
Christian, I'm using the Zip distribution. The REST service works and WebDAV works, it is only RESTXQ that doesn't appear to be correctly configured. So either I'm missing some essential configuration detail or there's an OS X-specific problem that I'm tripping over. Thanks, Eliot ————— Eliot Kimber, Owner Contrext, LLC http://contrext.com
Quoted text · Christian Grün · 27 lines
On 4/11/15, 6:17 PM, "Christian Grün" <christian.gruen at gmail.com> wrote: >Hi Eliot, > >> If I understand the docs, after running the basexhttp command, I should >> get the sample HTML start page returned by page:start() function defined >> in the restxq.xqm file when I go to http://localhost:8984 >> >> However I'm not getting that page, I'm getting a 404 response from the >> Jetty server: > >Which of our distributions (zip, war, ...) have you been using so far? > >> I verified that restxq.xqm is a loaded module: >> >>> repo list >> Name Version Type Path >> ------------------------------------- >> - Internal .DS_Store >> restxq - Internal restxq.xqm > >restxq.xqm must indeed be located in the webapp directory, and not in >the repository. Maybe you can check out the BaseX ZIP archive, it >should run out of the box. > >Hope this helps, >Christian >
EK
Eliot Kimber12 Apr 2015 17:45 #
I found my configuration error: bad WEBPATH in my user-specific .basex file. I had, for whatever reason (maybe through some bad copying at some point), set the WEBPATH to a bogus directory. Once I set it to the actual webapp location then everything works as expected. A bit of startup diagnostics here would have helped, e.g. "WEBPATH directory 'foo/bar' does not exist". I'll create an issue and try to circle back to implementing a fix once my current crunch has passed. Cheers, E. ————— Eliot Kimber, Owner Contrext, LLC http://contrext.com
Quoted text · Eliot Kimber · 53 lines
On 4/12/15, 8:33 AM, "Eliot Kimber" <ekimber at contrext.com> wrote: >Christian, > >I'm using the Zip distribution. > >The REST service works and WebDAV works, it is only RESTXQ that doesn't >appear to be correctly configured. So either I'm missing some essential >configuration detail or there's an OS X-specific problem that I'm tripping >over. > >Thanks, > >Eliot >————— >Eliot Kimber, Owner >Contrext, LLC >http://contrext.com > > > > >On 4/11/15, 6:17 PM, "Christian Grün" <christian.gruen at gmail.com> wrote: > >>Hi Eliot, >> >>> If I understand the docs, after running the basexhttp command, I should >>> get the sample HTML start page returned by page:start() function >>>defined >>> in the restxq.xqm file when I go to http://localhost:8984 >>> >>> However I'm not getting that page, I'm getting a 404 response from the >>> Jetty server: >> >>Which of our distributions (zip, war, ...) have you been using so far? >> >>> I verified that restxq.xqm is a loaded module: >>> >>>> repo list >>> Name Version Type Path >>> ------------------------------------- >>> - Internal .DS_Store >>> restxq - Internal restxq.xqm >> >>restxq.xqm must indeed be located in the webapp directory, and not in >>the repository. Maybe you can check out the BaseX ZIP archive, it >>should run out of the box. >> >>Hope this helps, >>Christian >> > > >
CG
Christian Grün12 Apr 2015 19:02 #
Quoted text · Eliot Kimber · 2 lines
> I'll create an issue and try to > circle back to implementing a fix once my current crunch has passed.
Thanks for the offer, always appreciated!

⚡Generated with XQuery