Page 1 of 1

connection error: Could not instantiate: ro.sync.db.nxd.exist.ExistSession

Posted: Mon Jun 15, 2020 2:48 pm
by bernardusgui
In Oxygen 22.1 I am receiving the error below for a connection to eXist 4.7 (see full error message at bottom of post):
Could not instantiate: ro.sync.db.nxd.exist.ExistSession due to: java.lang.NoClassDefFoundError: Could not initialize class ro.sync.db.nxd.exist.ExistSession
This message is surprising because I've been using the same connection without problem for three months. Nothing has changed in my Oxygen configuration, and nothing has changed on the server. I am getting the same error for connections to my localhost (eXist 4.7), and another remote server (eXist 3.x).

Yet I can connect to all three without problem through the jnlp application. Moreover, when I rebuild the connection to exist 4.7 on localhost, Oxygen's wizard tells me it's successful...but then it can't open the connection, with the error above.

The only environment change I've made is to install eXist 5.2 on my local machine in a separate instance. The Oxygen connection to 5.2 local host works fine!


Context:
Mac OS 10.14
Oxygen XML Editor 22.1, build 2020061102


Thanks for the assistance.


---complete error ---

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 javax.swing.JTree.fireTreeWillExpand(JTree.java:2839)
at javax.swing.JTree.setExpandedState(JTree.java:3630)
at ro.sync.ui.application.ob.setExpandedState(Unknown Source)
at javax.swing.JTree.expandPath(JTree.java:2219)
at javax.swing.plaf.basic.BasicTreeUI.toggleExpandState(BasicTreeUI.java:2286)
at com.apple.laf.AquaTreeUI.access$1600(AquaTreeUI.java:48)
at com.apple.laf.AquaTreeUI$TreeArrowMouseInputHandler.mouseReleased(AquaTreeUI.java:395)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
at java.awt.Component.processMouseEvent(Component.java:6539)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at ro.sync.ui.application.ob.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Component.java:6304)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:733)
at java.awt.EventQueue$4.run(EventQueue.java:731)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
at ro.sync.ui.application.ApplicationLauncher$_b$1.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
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)
... 45 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class ro.sync.db.nxd.exist.ExistSession
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
... 47 more

Re: connection error: Could not instantiate: ro.sync.db.nxd.exist.ExistSession

Posted: Mon Jun 15, 2020 3:01 pm
by Radu
Hi,

There are two separate problems with Oxygen XML Editor 22.1 and Exist:

1) Oxygen 22.1 can successfully connect to an Exist 5.2.0 database but it cannot open resources from it. We just updated our Oxygen 22.1 kits on the web site with a fix for this a couple of hours ago.
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,
Radu

Re: connection error: Could not instantiate: ro.sync.db.nxd.exist.ExistSession

Posted: Mon Jun 15, 2020 3:25 pm
by bernardusgui
Dear Radu,

I deleted all old connections and rebuilt them. My two localhost connections (5.2 and 4.7) are now fine, thanks!

However I still have a problem with the remote two different servers (4.7 and 3.x). When I try to rebuild the connection through the wizard Oxygen eventually has a time out error.

Ordinarily I would say this is a server-side issue, except that I've checked with the admins for the servers and nothing has changed in configuration. Also: they are two completely different servers with the same error. These have been running for 12-24 months.

Again, no problem connecting to the above servers through the jnlp application.

Is there a configuration issue? As I had connected to these servers as recently as a few days ago, is there a workaround with configuration files already on my system?

Thanks again.


--- time out error ---

ro.sync.basic.net.http.HttpException: Connect to host:8080 [host/134.158.33.71] failed: connect timed out (http://host:8080/exist/webstart/exist.jnlp)
at ro.sync.net.protocol.http.b.s.bb(Unknown Source)
at ro.sync.net.protocol.http.b.s.h(Unknown Source)
at ro.sync.net.protocol.http.abstraction.m.p(Unknown Source)
at ro.sync.net.protocol.http.abstraction.m.d(Unknown Source)
at ro.sync.net.protocol.http.WebdavHttpURLConnection.g(Unknown Source)
at ro.sync.net.protocol.http.WebdavHttpURLConnection.getInputStream(Unknown Source)
at java.net.URL.openStream(URL.java:1045)
at ro.sync.exml.options.vc.b(Unknown Source)
at ro.sync.exml.options.vc.e(Unknown Source)
at ro.sync.exml.options.vc.h(Unknown Source)
at ro.sync.exml.options.vc$2.lre(Unknown Source)
at ro.sync.ui.application.lb.run(Unknown Source)
Caused by: org.apache.http.conn.ConnectTimeoutException: Connect to host:8080 [host/134.158.33.71] failed: connect timed out
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:151)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:374)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
... 11 more
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:386)
at java.net.Socket.connect(Socket.java:589)
at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:75)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
... 19 more

Re: connection error: Could not instantiate: ro.sync.db.nxd.exist.ExistSession

Posted: Mon Jun 15, 2020 3:42 pm
by bernardusgui
I resolved the remote server problem - I removed the port number from the config wizard and then deleted the two files in the connection as mentioned above.

Thanks again!

Re: connection error: Could not instantiate: ro.sync.db.nxd.exist.ExistSession

Posted: Mon Jun 15, 2020 4:35 pm
by Radu
Hi,

I'm glad this works for you. Sorry that we have not found a solution to make the Exist 4.x connections work out of the box.

Regards,
Radu