通过JDBC驱动程序连接到Orient DB时出错

时间:2014-02-27 03:26:55

标签: java jdbc orientdb

我正在尝试连接到以分布式模式运行的Orient DB,我收到了以下错误

  

线程“main”中的异常com.orientechnologies.orient.core.exception.OSerializationException:   记录#-1:-1中的解组字段'members'时出错,其值为:

我正在使用:

OrientDB Version: orientdb-community-1.7-rc and 
JDBC Version: OrientDB JDBC Driver 1.7-rc2-SNAPSHOT ALL

以下是我的代码:

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", "*****");
}
根据上面的数据库连接字符串,

数据库“VANET”存在于OrientDB中,我可以使用OrientDB Studio在VANET中访问和创建类。

我已经提到并尝试过代码为per。但是没有运气。

请帮我解决这个问题。

关于我得到的错误的更多细节

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

0 个答案:

没有答案