Again: Check datasource configuration. Could not instantiate: ro.sync.db.nxd.exist.ExistSession...

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
fschmitt
Posts: 9
Joined: Mon Jul 20, 2015 3:31 pm

Again: Check datasource configuration. Could not instantiate: ro.sync.db.nxd.exist.ExistSession...

Post by fschmitt » Mon Jul 06, 2020 5:12 pm

Hi,

some days ago, i've noticed that my previously working datasource connections to a eXist-db instance failed to work. It seems to be similar to the issue described some months ago, just with the difference that the datasource connections worked fine since then up to now. Sadly, i can't tell exactly when it stopped working. And it doesn't help to re-create the datasource definitions using the Wizard.

Client: Windows 10, <oXygen/> XML Editor 22.1, build 2020061102. Tested both with OpenJDK 14.0.1 and Java SE 8u202.

Server: eXist 4.7.1 (Build: 201908132202) with Java 11.

I've already removed all datasource definitions, purged the jar repositories from %USER%\AppData\Roaming\com.oxygenxml and re-created the datasource both using the eXist-Connection Wizard and manually (by copying the jar files from a eXist 4.7.1 installation from exist_home,
lib/core and lib/endorsed) - didn't help.

EDIT:
Connecting from a different (linux) client works fine - same oxygen version, OpenJDK. Thus, i copied the jars from the working linux client datasource to the windows client - didn't help. So it seems that the problem isn't caused by the jars provided for the datasource connection.

Complete error message:

Code: Select all

Check datasource configuration. Could not instantiate: ro.sync.db.nxd.exist.ExistSession due to: java.lang.NoClassDefFoundError: Could not initialize class ro.sync.db.nxd.exist.ExistSession
java.io.IOException: Could not instantiate: ro.sync.db.nxd.exist.ExistSession due to: java.lang.NoClassDefFoundError: Could not initialize class ro.sync.db.nxd.exist.ExistSession
	at ro.sync.db.nxd.o.l(Unknown Source)
	at ro.sync.db.b.j.x(Unknown Source)
	at ro.sync.db.b.j.getCurrentState(Unknown Source)
	at ro.sync.db.h$_d.treeWillExpand(Unknown Source)
	at java.desktop/javax.swing.JTree.fireTreeWillExpand(JTree.java:2870)
	at java.desktop/javax.swing.JTree.setExpandedState(JTree.java:3696)
	at ro.sync.ui.application.ob.setExpandedState(Unknown Source)
	at java.desktop/javax.swing.JTree.expandPath(JTree.java:2244)
	at java.desktop/javax.swing.plaf.basic.BasicTreeUI.toggleExpandState(BasicTreeUI.java:2616)
	at java.desktop/javax.swing.plaf.basic.BasicTreeUI.handleExpandControlClick(BasicTreeUI.java:2601)
	at java.desktop/javax.swing.plaf.basic.BasicTreeUI.checkForClickInExpandControl(BasicTreeUI.java:2549)
	at java.desktop/javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection(BasicTreeUI.java:4007)
	at java.desktop/javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressedDND(BasicTreeUI.java:3993)
	at java.desktop/javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressed(BasicTreeUI.java:3952)
	at java.desktop/java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:287)
	at java.desktop/java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:287)
	at java.desktop/java.awt.Component.processMouseEvent(Component.java:6633)
	at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
	at ro.sync.ui.application.ob.processMouseEvent(Unknown Source)
	at java.desktop/java.awt.Component.processEvent(Component.java:6401)
	at java.desktop/java.awt.Container.processEvent(Container.java:2263)
	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5012)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4844)
	at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4919)
	at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4545)
	at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4489)
	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2764)
	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4844)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: java.io.IOException: Could not instantiate: ro.sync.db.nxd.exist.ExistSession due to: java.lang.NoClassDefFoundError: Could not initialize class ro.sync.db.nxd.exist.ExistSession
	at ro.sync.db.nxd.o.e(Unknown Source)
	at ro.sync.db.nxd.o.c(Unknown Source)
	... 47 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class ro.sync.db.nxd.exist.ExistSession
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:427)
	... 49 more

adrian
Posts: 2659
Joined: Tue May 17, 2005 4:01 pm

Re: Again: Check datasource configuration. Could not instantiate: ro.sync.db.nxd.exist.ExistSession...

Post by adrian » Mon Jul 06, 2020 6:03 pm

Hi,

Please have a look at this topic.
Radu wrote:2) Oxygen 22.1 cannot connect at all to an Exist 4.x database. This problem occurs because we updated the logging libraries in the Oxygen distribution and we cannot control this problem from our code, the Exist 4.x comes with an older logging library which has a bug. In this case, go to Data Sources preferences page, edit the Exist 4.x data source, and from the driver files list, remove the references to the log4j-api-*.jar and log4j-core-*.jar libraries.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

fschmitt
Posts: 9
Joined: Mon Jul 20, 2015 3:31 pm

Re: Again: Check datasource configuration. Could not instantiate: ro.sync.db.nxd.exist.ExistSession...

Post by fschmitt » Mon Jul 06, 2020 6:07 pm

adrian wrote:
Mon Jul 06, 2020 6:03 pm
Hi,

Please have a look at this topic.
Radu wrote:2) Oxygen 22.1 cannot connect at all to an Exist 4.x database. This problem occurs because we updated the logging libraries in the Oxygen distribution and we cannot control this problem from our code, the Exist 4.x comes with an older logging library which has a bug. In this case, go to Data Sources preferences page, edit the Exist 4.x data source, and from the driver files list, remove the references to the log4j-api-*.jar and log4j-core-*.jar libraries.
Regards,
Adrian
Hi Adrian, thanks a lot, thas was exactly the cause and solved the issue - thanks a lot, everything working now fine!

Post Reply