I try to connect to Orient DB running in distributed mode and I get the following error
An exception in the stream "main" com.orientechnologies.orient.core.exception.OSerializationException: An error occurred while parsing the members fields in record # -1: -1 with the value:
I use:
OrientDB Version: orientdb-community-1.7-rc and
JDBC Version: OrientDB JDBC Driver 1.7-rc2-SNAPSHOT ALL
Below is my code:
public static void main(String[] args) throws ClassNotFoundException, SQLException {
Class.forName("com.orientechnologies.orient.jdbc.OrientJdbcDriver");
Connection connection = (OrientJdbcConnection) DriverManager.getConnection("jdbc:orient:remote:localhost/VANET", "root", "*****");
}
the "VANET" database according to the DB connection string above is present in OrientDB, and I can get and create classes in VANET using OrientDB Studio.
I already mentioned and tried the code as per . But no luck.
Please help me solve this problem.
A bit more about the error I get
Exception in thread "main" com.orientechnologies.orient.core.exception.OSerializationException: Error on unmarshalling field 'members' in record #-1:-1 with value:
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.orientechnologies.common.log.OLogManager.exception(OLogManager.java:162)
at com.orientechnologies.orient.core.serialization.serializer.record.string.ORecordSerializerSchemaAware2CSV.fromString(ORecordSerializerSchemaAware2CSV.java:543)
at com.orientechnologies.orient.core.serialization.serializer.record.string.ORecordSerializerStringAbstract.fromStream(ORecordSerializerStringAbstract.java:80)
at
... * <I removed these lines >* ...
at com.orientechnologies.orient.jdbc.OrientJdbcConnection.<init>(OrientJdbcConnection.java:49)
at com.orientechnologies.orient.jdbc.OrientJdbcDriver.connect(OrientJdbcDriver.java:46)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at org.poc.orientdb.jdbc.OrientJDBC.main(OrientJDBC.java:49)
Caused by: java.lang.NullPointerException
at com.orientechnologies.orient.core.record.ORecordSchemaAwareAbstract.getSchemaClass(ORecordSchemaAwareAbstract.java:82)
at com.orientechnologies.orient.core.serialization.serializer.record.string.ORecordSerializerSchemaAware2CSV.fromString(ORecordSerializerSchemaAware2CSV.java:445)
... 28 more