Hi Christian,

thanks for the reply. I suspected something like this when I parsed through the source code.

We have a working workaround by saving the input string to a temporary file and then sending baseX that file to index instead. This works as expected.

I'll look into it again when the new version is out.


--
There are two hard things in computer science:
cache invalidation, naming things, and off-by-one errors.




Am 09.08.2018 um 19:54 schrieb Christian Grün:
Hi Florian,

Thanks for the hint. In fact, it wasn’t you, but BaseX that was acting
wrong. Client-side command parsing was faulty due to the whitespace
that occurred in the string input.

Things have improved in the latest stable snapshot [1]. The release of
BaseX 9.1 is currently scheduled for September.

Best,
Christian

[1] http://files.basex.org/releases/latest/



On Thu, Aug 9, 2018 at 9:28 AM Florian Peschka
<florian.pesc...@tanner.de> wrote:
Hi all,

I am trying to add content to an index directly (not from a file).

Given the following setup:

        ClientSession session = new ClientSession("localhost", 1984, "admin", "admin");
        session.execute(new CreateDB("test"));
        session.execute(new Open("test"));
        session.execute(new Add("test", "<x>te st</x>"));

I receive this error:

Exception in thread "main" org.basex.core.BaseXException: Resource "C:/Users/FloPes/"<x>te st</x>"" not found.
    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 basexerrordemo.BaseXErrorDemo.main(BaseXErrorDemo.java:45)

However, when I change the Add command to send "<x>test</x>" (no space), it works as expected.

What am I doing wrong?

--
There are two hard things in computer science:
cache invalidation, naming things, and off-by-one errors.



Reply via email to