[basex-talk] Class 'BaseXHTTP' missing?

2019-02-27 Thread Jan Stapel
Hello,

i just tried to run the Java REST-Examples found on GIT/the basex-doc. 
BaseXHTTP cannot be resolved to a type.

I am using the current version. Am I missing something?

best,

Jan



[basex-talk] JAVA xquery: accessing documents

2018-09-30 Thread Jan Stapel
Hello,

Normally (few basex-versions ago) I did:

session.execute("open main");
         session.execute("xquery doc("users.xml")//users");

But now, this results in basex interpreting the doc()-path as relative 
to it's  home-directory thus cannot find the resource..

"xquery doc("main/users.xml")//users" gives the correct results.


Do we no longer open a database but writing the full path of the 
document instead?

Whats the performance of this if accessing multiple documents of the 
same database during runtime?


-regards,

jan




Re: [basex-talk] Retrieve large amount of data from XML-resource

2017-02-15 Thread Jan Stapel
Hello Christian,


Am 15.02.2017 um 12:14 schrieb Christian Grün:
> Hi Jan,
>
>> For example for a xml-file with the size of 79167874 ("FACTOR", as shown by
>> the web-gui) "session.execute(new XQuery("doc('db/file.xml')"));" will
>> result in an exception[0].
> First of all, we have recently improved logging output for the
> client/server architecture with BaseX 8.6.1. Maybe you get some more
> helpful output with the latest snapshot [1]?
Excuse me.. In Germany we say "zu frueh gefreut"..
When running the query WITH ADMIN PERMISSIONS, it works.

When running the query with read/write permissions the same (not more 
detailed) "interupted"-Exception shows up.

Jan
>
> To decrease memory consumption, you can specify an output stream in
> your client (via setOutputStream). Do you really want to return the
> full XML document and process it in main memory? Returning 80 MB of
> data should not cause serious problems, though, even with 1GB of RAM.
> Did you manage to successfully parse this resource in the BaseX GUI
> (or is the document already stored in a database)?
>
>> My assumption is that a timeout is exceeded somewhere.. so my next question
>> is how to properly set the timeout
> For non-admin users, you can set a global server timeout via the
> TIMEOUT option [2]. If I remember correctly, the timeout will not be
> checked while a resource is parsed, it could be that it does not
> necessarily stop your query in time.
>
> Cheers,
> Christian
>
> [1] http://files.basex.org/releases/latest/
> [2] http://docs.basex.org/wiki/Options#TIMEOUT
> .
>



Re: [basex-talk] Retrieve large amount of data from XML-resource

2017-02-15 Thread Jan Stapel
Hello Christian,

Am 15.02.2017 um 12:14 schrieb Christian Grün:
> Hi Jan,
>
>> For example for a xml-file with the size of 79167874 ("FACTOR", as shown by
>> the web-gui) "session.execute(new XQuery("doc('db/file.xml')"));" will
>> result in an exception[0].
> First of all, we have recently improved logging output for the
> client/server architecture with BaseX 8.6.1. Maybe you get some more
> helpful output with the latest snapshot [1]?
I can't figure out why but both of my problems are gone after updating 
to version 8.6.1. - thank you.
(It would be helpful to know why to verify it is not an arbitrary 
problem with my system..).

btw: Is there an issue with the latest basex web-app? I am not able to 
log in (the field to specify the port is missing as well).

regards,
Jan



[basex-talk] Retrieve large amount of data from XML-resource

2017-02-15 Thread Jan Stapel
Hello,
i am getting an BaseXException when trying to get large amount of data from a 
XML-resource with a JAVA-Client.
For example for a xml-file with the size of 79167874 ("FACTOR", as shown by the 
web-gui) "session.execute(new XQuery("doc('db/file.xml')"));" will result in an 
exception[0].

My assumption is that a timeout is exceeded somewhere.. so my next question is 
how to properly set the timeout (Or in general, how to run specific commands 
via java-client, I can't find it in the wiki.
"session.query("timeout[0]");" seems to not have any influence.

Query large files in general, for example query its number of instances, seems 
to not be the problem.

Increasing the -Xmx in the basex-script did not help.
# Options for virtual machine (can be extended by global options)
BASEX_JVM="-Xmx10G $BASEX_JVM"

Increasing the -Xmx of the java-application did not help as well.
I hope you can help me.

best regards,
Jan

[0] org.basex.core.BaseXException: Interrupted.

at org.basex.api.client.ClientSession.receive(ClientSession.java:191)
at org.basex.api.client.ClientSession.execute(ClientSession.java:160)
at org.basex.api.client.ClientSession.execute(ClientSession.java:165)
at org.basex.api.client.Session.execute(Session.java:36)
at net.ddns.janstapel.datamanagement.Main.main(Main.java:37)