1

在使用 Kawa 2.1 和 OrientDB(社区 2.1.10)时,我看到了一些奇怪的类加载问题。我的 CLASSPATH 只包含与 kawa 和 orientdb 相关的 jar。

以下片段:

(! g (com.tinkerpop.blueprints.impls.orient.OrientGraph "remote:localhost/GratefulDeadConcerts"))
(g:addVertex "class:Person" "name" "Jill" "age" 33)
(g:commit)

生成此异常:

com.orientechnologies.orient.enterprise.channel.binary.OResponseProcessingException: Exception during response processing.
        at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClient.throwSerializedException(OChannelBinaryAsynchClient.java:446)
        at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClient.handleStatus(OChannelBinaryAsynchClient.java:398)
        at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.java:282)
        at com.orientechnologies.orient.enterprise.channel.binary.OChannelBinaryAsynchClient.beginResponse(OChannelBinaryAsynchClient.java:170)
        at com.orientechnologies.orient.client.remote.OStorageRemote.beginResponse(OStorageRemote.java:2158)
        at com.orientechnologies.orient.client.remote.OStorageRemote.commit(OStorageRemote.java:1381)
        at com.orientechnologies.orient.client.remote.OStorageRemoteThread.commit(OStorageRemoteThread.java:453)
        at com.orientechnologies.orient.core.tx.OTransactionOptimistic.doCommit(OTransactionOptimistic.java:593)
        at com.orientechnologies.orient.core.tx.OTransactionOptimistic.commit(OTransactionOptimistic.java:156)
        at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2689)
        at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:2658)
        at com.tinkerpop.blueprints.impls.orient.OrientTransactionalGraph.commit(OrientTransactionalGraph.java:161)
        at atInteractiveLevel-49.run(scratchpad.scm:54)
        at gnu.expr.ModuleExp.evalModule2(ModuleExp.java:293)
        at gnu.expr.ModuleExp.evalModule(ModuleExp.java:212)
        at kawa.Shell.run(Shell.java:291)
        at kawa.Shell.runFile(Shell.java:524)
        at kawa.standard.load.apply2(load.java:67)
        at kawa.standard.load.apply1(load.java:27)
        at gnu.mapping.Procedure.apply(Procedure.java:135)
        at gnu.mapping.Procedure.apply(Procedure.java:118)
        at gnu.mapping.CallContext.runUntilDone(CallContext.java:227)
        at gnu.expr.ModuleExp.evalModule2(ModuleExp.java:350)
        at gnu.expr.ModuleExp.evalModule(ModuleExp.java:212)
        at kawa.Shell.run(Shell.java:291)
        at kawa.Shell.run(Shell.java:203)
        at kawa.Shell.run(Shell.java:184)
        at kawa.repl.processArgs(repl.java:687)
        at kawa.repl.main(repl.java:793)
    Caused by: java.lang.RuntimeException: com.orientechnologies.orient.core.exception.ODatabaseException: Error on deserialization of Serializable
        at com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinaryV0.readSingleValue(ORecordSerializerBinaryV0.java:390)
        at com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinaryV0.deserialize(ORecordSerializerBinaryV0.java:195)
        at com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinary.fromStream(ORecordSerializerBinary.java:74)
        at com.orientechnologies.orient.core.record.impl.ODocument.deserializeFields(ODocument.java:1817)
        at com.orientechnologies.orient.server.tx.OTransactionOptimisticProxy.unmarshallRecord(OTransactionOptimisticProxy.java:284)
        at com.orientechnologies.orient.server.tx.OTransactionOptimisticProxy.begin(OTransactionOptimisticProxy.java:169)
        at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.begin(ODatabaseDocumentTx.java:1703)
        at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.commit(ONetworkProtocolBinary.java:1222)
        at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.executeRequest(ONetworkProtocolBinary.java:404)
        at com.orientechnologies.orient.server.network.protocol.binary.OBinaryNetworkProtocolAbstract.execute(OBinaryNetworkProtocolAbstract.java:223)
        at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:77)
    Caused by: com.orientechnologies.orient.core.exception.ODatabaseException: Error on deserialization of Serializable
        at com.orientechnologies.orient.core.serialization.serializer.record.binary.OSerializableWrapper.fromStream(OSerializableWrapper.java:47)
        at com.orientechnologies.orient.core.serialization.serializer.record.binary.ORecordSerializerBinaryV0.readSingleValue(ORecordSerializerBinaryV0.java:384)
        ... 10 more
    Caused by: java.lang.ClassNotFoundException: gnu.math.IntNum
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:348)
        at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:626)
        at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1613)
        at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1774)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
        at com.orientechnologies.orient.core.serialization.serializer.record.binary.OSerializableWrapper.fromStream(OSerializableWrapper.java:44)
        ... 11 more

我相信 gnu.math.IntNum 实际上已经包含在 Kawa 中,我可以在 Kawa repl 中实例化所述类。知道这里发生了什么吗?非常感谢任何帮助/指针!

4

1 回答 1

1

似乎您正在插入 OrientDB 不支持的字段 gnu.math.IntNum 。您应该将此 IntNum 转换为 Java 类型

于 2016-02-15T14:34:08.567 回答