首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用OrientDB时Kawa中的类加载器问题

使用OrientDB时Kawa中的类加载器问题
EN

Stack Overflow用户
提问于 2016-02-15 16:48:45
回答 1查看 176关注 0票数 1

在使用kwa2.1和OrientDB (社区2.1.10)时,我发现了一些奇怪的类加载问题。我的CLASSPATH只包含与kawa和orientdb相关的jar。

以下代码片段:

代码语言:javascript
复制
(! g (com.tinkerpop.blueprints.impls.orient.OrientGraph "remote:localhost/GratefulDeadConcerts"))
(g:addVertex "class:Person" "name" "Jill" "age" 33)
(g:commit)

生成此异常:

代码语言:javascript
复制
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中实例化上述类。知道这是怎么回事吗?非常感谢您的帮助/指点!

EN

回答 1

Stack Overflow用户

发布于 2016-02-15 22:34:09

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

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35404890

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档