Attempts at optimizing and finding the BaseX server IllegalMonitorStateException