I have an existing install of basex running on a centos machine. The install runs fine, I am able to edit .basex files to point to the main database, and can run the client from anywhere and connect once I make .basex changes.
I also have jetty6 running (on the same box) with the basex war package (7.3), which also runs, is accessible, and returns valid rest responses.
My issue is the rest response shows no resources available, which as far as I can tell means it is not connecting to my existing database but creating (or created) it's own. Based on the documentation on the site, I have changed the web.xml's dbpath variable to the existing BaseXData path. I have used the same value I used in the .basex files, repackaged the .war, and restarted jetty, with no success.
Other changes, like to the index.html in the war, will show, so I know I am rebuilding the war and viewing those changes correctly.
What do I need to change to make the servlet of basex see a database folder already available?
I have posted this question on stackoverflow as well: http://stackoverflow.com/questions/12976335/basex-servlet-doesnt-see-existin...
Here is my web.xml:
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
<display-name>ATS</display-name> <description>REST Services for XML data</description>
<!-- The following parameters may also be passed on as system properties: -->
<!-- Operation mode: by default, the value is "local": the servlets will work with a local database context. If "server" is specified, a database server instance will be started after the first call of a service. --> <context-param> <param-name>org.basex.mode</param-name> <param-value>local</param-value> </context-param> <context-param> <param-name>org.basex.server</param-name> <param-value>local</param-value> </context-param>
<!-- Login data: by default, no user and password is specified, and the credentials must be passed on by the client. Please check by yourself if it is safe to store your credentials in this file. --> <context-param> <param-name>org.basex.user</param-name> <param-value>admin</param-value> </context-param> <context-param> <param-name>org.basex.password</param-name> <param-value>admin</param-value> </context-param>
<!-- All database main options, which are usually stored in the .basex configuration file (DBPATH, DEBUG, etc.), can be specified as well by prefixing the key with "org.basex.". If an option references a relative path, it will be prefixed with the servlet root path. <context-param> <param-name>org.basex.dbpath</param-name> <param-value>/ats/BaseXData/</param-value> </context-param> <context-param> <param-name>org.basex.httppath</param-name> <param-value>.</param-value> </context-param> <context-param> <param-name>org.basex.repopath</param-name> <param-value>http</param-value> </context-param> <context-param> <param-name>org.basex.lang</param-name> <param-value>English</param-value> </context-param> <context-param> <param-name>org.basex.debug</param-name> <param-value>true</param-value> </context-param> <param-value>true</param-value> </context-param> -->
<!-- REST Service (can be deactivated by removing this entry) --> <servlet> <servlet-name>REST</servlet-name> <servlet-class>org.basex.http.rest.RESTServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>REST</servlet-name> <url-pattern>/rest/*</url-pattern> </servlet-mapping> </web-app>
Thank you for your time!
Dear Michael,
sorry for the late feedback. Along with BaseX 7.5, several changes have been performed in the web application context, so I would like to hear if you have already tried our latest snapshot [1], and if the problems are resolved with that version. The new version will be released pretty soon, which means there will only be minor changes in the code. If you are running BaseX as web application, the .basex can be safely ignored.
Christian
[1] http://files.basex.org/releases/latest/ ___________________________
On Fri, Oct 19, 2012 at 5:21 PM, Michael Mendez michaelgmendez@gmail.com wrote:
I have an existing install of basex running on a centos machine. The install runs fine, I am able to edit .basex files to point to the main database, and can run the client from anywhere and connect once I make .basex changes.
I also have jetty6 running (on the same box) with the basex war package (7.3), which also runs, is accessible, and returns valid rest responses.
My issue is the rest response shows no resources available, which as far as I can tell means it is not connecting to my existing database but creating (or created) it's own. Based on the documentation on the site, I have changed the web.xml's dbpath variable to the existing BaseXData path. I have used the same value I used in the .basex files, repackaged the .war, and restarted jetty, with no success.
Other changes, like to the index.html in the war, will show, so I know I am rebuilding the war and viewing those changes correctly.
What do I need to change to make the servlet of basex see a database folder already available?
I have posted this question on stackoverflow as well: http://stackoverflow.com/questions/12976335/basex-servlet-doesnt-see-existin...
Here is my web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
<display-name>ATS</display-name> <description>REST Services for XML data</description>
<!-- The following parameters may also be passed on as system properties: -->
<!-- Operation mode: by default, the value is "local": the servlets will work with a local database context. If "server" is specified, a database server instance will be started after the first call of a service. -->
<context-param> <param-name>org.basex.mode</param-name> <param-value>local</param-value> </context-param> <context-param> <param-name>org.basex.server</param-name> <param-value>local</param-value> </context-param>
<!-- Login data: by default, no user and password is specified, and the credentials must be passed on by the client. Please check by yourself if it is safe to store your credentials in this file. -->
<context-param> <param-name>org.basex.user</param-name> <param-value>admin</param-value> </context-param> <context-param> <param-name>org.basex.password</param-name> <param-value>admin</param-value> </context-param>
<!-- All database main options, which are usually stored in the .basex configuration file (DBPATH, DEBUG, etc.), can be specified as well by prefixing the key with "org.basex.". If an option references a relative path, it will be prefixed with the servlet root path. <context-param> <param-name>org.basex.dbpath</param-name> <param-value>/ats/BaseXData/</param-value> </context-param> <context-param> <param-name>org.basex.httppath</param-name> <param-value>.</param-value> </context-param> <context-param> <param-name>org.basex.repopath</param-name> <param-value>http</param-value> </context-param> <context-param> <param-name>org.basex.lang</param-name> <param-value>English</param-value> </context-param> <context-param> <param-name>org.basex.debug</param-name> <param-value>true</param-value> </context-param> <param-value>true</param-value> </context-param> -->
<!-- REST Service (can be deactivated by removing this entry) -->
<servlet> <servlet-name>REST</servlet-name> <servlet-class>org.basex.http.rest.RESTServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>REST</servlet-name> <url-pattern>/rest/*</url-pattern> </servlet-mapping> </web-app>
Thank you for your time!
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
basex-talk@mailman.uni-konstanz.de