Hi @ll,

 

Re-sending from different address due to original 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 trying to use XQuery - In comment – I get:

 

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

Contact: basex-talk@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