I was able to import XML files into the database with no problems. I
am running into issues when trying to run queries though.
First off, I just want to check - is there an easy way to simply run
an XQuery query from the command line? Or would I have to write my
own code?
I couldn't find an easy way to directly run queries from the command
line, so I moved on to trying to run them from code. I started up a
server on my local machine and then tried to run the sample code from
the "Accessing the Server" section of http://code.google.com/p/xbird/wiki/RunningAndAccessingDatabase
Unfortunately, I can't get this sample code to run. I get the
following error message:
ERROR XQEngineClient - java.rmi.UnmarshalException: error
unmarshalling return; nested exception is:
java.lang.ClassNotFoundException: xbird.engine.XQEngineServer_Stub
(no security manager: RMI class loader disabled)
I would really appreciate some help on this. If I could run queries
directly from the command line, that would be ideal. If there isn't
anything that enables this easily, I wouldn't have a problem writing
my own thing, but I can't get above the error listed above.
Thanks!
Internal XML expression of XBird requires 2x memory to original XML file.
Saxon used about 4x (I'm not sure about the current version of Saxon though).
You have to set enough heap memory for JVM through -Xmx option.
With database mode, XBird can handle 1GB XML file with 64MB (or so) memory.
> I was able to import XML files into the database with no problems. I
> am running into issues when trying to run queries though.
>
> First off, I just want to check - is there an easy way to simply run
> an XQuery query from the command line? Or would I have to write my
> own code?
You can access the database through command line.
Use fn:collection("/your-collection-name/foo.xml") instead of fn:doc()
to access stored XML documents.
> I couldn't find an easy way to directly run queries from the command
> line, so I moved on to trying to run them from code. I started up a
> server on my local machine and then tried to run the sample code from
> the "Accessing the Server" section of http://code.google.com/p/xbird/wiki/RunningAndAccessingDatabase
>
> Unfortunately, I can't get this sample code to run. I get the
> following error message:
> ERROR XQEngineClient - java.rmi.UnmarshalException: error
> unmarshalling return; nested exception is:
> java.lang.ClassNotFoundException: xbird.engine.XQEngineServer_Stub
> (no security manager: RMI class loader disabled)
The error message means that the client was unable to find and
download the stub class
though the stub class "xbird.engine.XQEngineServer_Stub" is included
in xbird-open-xx.jar.
So, please check your classpath first.
Thanks,
Makoto