Problems running queries

19 views
Skip to first unread message

Jacob Snyder

unread,
Dec 9, 2011, 4:15:49 PM12/9/11
to xbird-users
For a class project, I am benchmarking various XQuery implementations
with the XMark benchmark. I was able to run queries on XML files in
the manner described by the Quick Start guide. However, for large
files, this uses a lot of RAM. I am trying to use the database
storage to address this. However, I am running into problems.

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!

Makoto YUI

unread,
Dec 13, 2011, 3:11:13 AM12/13/11
to xbird...@googlegroups.com, jrs...@case.edu
2011/12/10 Jacob Snyder <jrs...@case.edu>:

> For a class project, I am benchmarking various XQuery implementations
> with the XMark benchmark.  I was able to run queries on XML files in
> the manner described by the Quick Start guide.  However, for large
> files, this uses a lot of RAM.

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

Reply all
Reply to author
Forward
0 new messages