OK, I've been working with BaseX for a little while with some great success. But I am now putting some 'glue' code together and I have a simple task that I am struggling with (believe it or not)
Having an issue opening up a database (using just the BaseX jar file). I execute XQuery (inside Java program) and I try specifying the path to the database (e.g. /home/somedirectory/basex/data/MyDB). However whenever I use the full path to get the database, it can't find it. I execute the program locally (without the full path) and everything works just fine!
I've tried using db:open() and collection(). Any advice - and sorry for such a simple question. I'm sure I am overlooking something both simple and silly.
Thanks again
Having an issue opening up a database (using just the BaseX jar file). I execute XQuery (inside Java program) and I try specifying the path to the database (e.g. /home/somedirectory/basex/data/MyDB). However whenever I use the full path to get the database, it can't find it. I execute the program locally (without the full path) and everything works just fine!
We need more information: How did you specify the database path? Did you assign it to DBPATH, as described in the documentation [1]? A .basex file may simplify your life; if your setting allows it, you can also move your database directory to your Java working directory.
Christian
The DBPATH worked - boy, don't I feel dumb...oops! Thanks so much again!
On Monday, September 21, 2015 11:39 AM, Christian Grün christian.gruen@gmail.com wrote:
Having an issue opening up a database (using just the BaseX jar file). I execute XQuery (inside Java program) and I try specifying the path to the database (e.g. /home/somedirectory/basex/data/MyDB). However whenever I use the full path to get the database, it can't find it. I execute the program locally (without the full path) and everything works just fine!
We need more information: How did you specify the database path? Did you assign it to DBPATH, as described in the documentation [1]? A .basex file may simplify your life; if your setting allows it, you can also move your database directory to your Java working directory.
Christian
basex-talk@mailman.uni-konstanz.de