BaseX update persistence

Tuesday, 6 August 2013 · 1 message
CH
Christopher Harper6 Aug 2013 09:15 #

Hi @ll,

Re-sending due to message disappearing.

When running BaseX as a server and connecting to it my update statements are successful but when using BaseX from a jar inside the JVM ­ Database creation works fine ­ the update statements don't get committed ­ not visible to other clients or after restart ­ to the database.

Select queries work fine.

Code that ­ no exception ­ fails is:

final String xQueryUpdate = String.format("for $tab in
doc('db')//tabs/tab[@id='%s'] return replace node $tab/content with %s",
tabId, value); //$NON-NLS-1$
try {
synchronized (SESSION) {
new ClientQuery(xQueryUpdate, SESSION, SESSION.getOutputStream()).close();
// System.out.println(new XQuery(xQueryUpdate).execute(CONTEXT));
SESSION.notify();
}
} catch (final IOException ioex) {
ioex.printStackTrace();
}

When tying to use XQuery - In comment ­ I get:

org.basex.core.BaseXException: Improper use? Potential bug? Your feedback is welcome:

Contact: basex-talk at mailman.uni-konstanz.de

Version: BaseX 7.6

Java: Oracle Corporation, 1.7.0_10-ea

OS: Mac OS X, x86_64

Stack Trace:

java.nio.channels.OverlappingFileLockException

sun.nio.ch.SharedFileLockTable.checkList(FileLockTable.java:255)

sun.nio.ch.SharedFileLockTable.add(FileLockTable.java:152)

What might be the issue or have I misunderstood something?

/ Chris


⚡Generated with XQuery