1.4.1 fails to get remote database connection
Hi, I've just installed the new release 1.4.1 and my basic tests are failing to get remote database connection. The same test works perfectly in version 1.3.0. This is my test:
@Test public void openRemoteDb() { ODatabaseDocumentTx db = new ODatabaseDocumentTx( "remote:localhost/source-mesh-test").open("admin", "admin"); log.debug("db info:{}", db.getName());
}
This is the error I get: com.orientechnologies.common.exception.OException: Error on creation of shared resource at com.orientechnologies.common.concur.resource.OSharedContainerImpl.getResource(OSharedContainerImpl.java:55) at com.orientechnologies.orient.client.remote.OStorageRemoteThread.getResource(OStorageRemoteThread.java:397) at com.orientechnologies.orient.core.metadata.OMetadata.init(OMetadata.java:105) at com.orientechnologies.orient.core.metadata.OMetadata.load(OMetadata.java:66) at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.open(ODatabaseRecordAbstract.java:118) at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open(ODatabaseWrapperAbstract.java:47) at org.photoni.OrientGetStartedTest.openRemoteDb(OrientGetStartedTest.java:22) .... Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Collection at com.orientechnologies.orient.core.metadata.schema.OSchemaShared.fromStream(OSchemaShared.java:463) at com.orientechnologies.orient.core.type.ODocumentWrapperNoClass.reload(ODocumentWrapperNoClass.java:70) at com.orientechnologies.orient.core.metadata.schema.OSchemaShared$12.call(OSchemaShared.java:555) at com.orientechnologies.orient.core.storage.OStorageAbstract.callInLock(OStorageAbstract.java:168) at com.orientechnologies.orient.client.remote.OStorageRemoteThread.callInLock(OStorageRemoteThread.java:417) at com.orientechnologies.orient.core.metadata.schema.OSchemaShared.load(OSchemaShared.java:550) at com.orientechnologies.orient.core.metadata.OMetadata$1.call(OMetadata.java:109) at com.orientechnologies.orient.core.metadata.OMetadata$1.call(OMetadata.java:105) at com.orientechnologies.common.concur.resource.OSharedContainerImpl.getResource(OSharedContainerImpl.java:53) ... 29 more
We've a similar test case and works perfectly against remote protocol:
@Test(dependsOnMethods = { "testDbExists" }) public void testDbOpen() { database = new OObjectDatabaseTx(url); database.open("admin", "admin"); Assert.assertNotNull(database.getName()); database.close(); }
To know what happens we'd need the zipped database and debug what's wrong with it.
Hi, the issue was caused by a wrong client version. I've aligned the client to the same version of the server and everything works fine. Thanks for you support
Great.