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.peschka@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.