Hi, Do you have this exception when all application flow is executed in single thread mode, is not it ?
On Mon, Sep 1, 2014 at 11:11 AM, Bharathi ns <[email protected]> wrote: > I am getting the following exception when I try to save a OrientGraph > database. > > Here is my code where I have implemented the commit. > > > > OrientGraph orientGraph = null; > > String source = enrichData.getSource(); > > > orientGraph = orientConfiguration.open(); > LocationDocument location = enrichData.getGeoLocation(); > > Vertex locationVertex = null; > Vertex contentVertex = null; > Vertex userVertex = null; > > if ((location != null) && !location.isNull()) { > locationVertex = getLocationVertex(location, orientGraph); > } > > ContentDocument content = enrichData.getContent(); > if ((content != null) && (StringUtils.isNotBlank(content.getTweetId()))) { > contentVertex = getContentVertex(orientGraph, content, source); > } > > UserDocument user = enrichData.getUserInfo(); > if ((user != null) && (StringUtils.isNotBlank(user.getUserId()))) { > userVertex = createUser(orientGraph, user, source); > } > > if (locationVertex != null) { > orientGraph.addEdge(null, userVertex, locationVertex, "lives_at"); > } > if ((contentVertex != null) && (userVertex != null)) { > orientGraph.addEdge(null, contentVertex, userVertex, "posted_by"); > } > orientGraph.commit(); > > if (orientGraph != null) { > orientConfiguration.close(orientGraph); > } > > > Output: > > java.lang.RuntimeException: > com.orientechnologies.orient.core.exception.OConcurrentModificationException: > Cannot UPDATE the record #13:8 because the version is not the latest. > Probably you are updating an old record or it has been modified by another > user (db=v7 your=v6) > > at > backtype.storm.utils.DisruptorQueue.consumeBatchToCursor(DisruptorQueue.java:90) > ~[storm-core-0.9.0.1.jar:na] > at > backtype.storm.utils.DisruptorQueue.consumeBatchWhenAvailable(DisruptorQueue.java:61) > ~[storm-core-0.9.0.1.jar:na] > at > backtype.storm.disruptor$consume_batch_when_available.invoke(disruptor.clj:62) > ~[storm-core-0.9.0.1.jar:na] > at > backtype.storm.daemon.executor$fn__3498$fn__3510$fn__3557.invoke(executor.clj:730) > ~[storm-core-0.9.0.1.jar:na] > at backtype.storm.util$async_loop$fn__444.invoke(util.clj:403) > ~[storm-core-0.9.0.1.jar:na] > at clojure.lang.AFn.run(AFn.java:24) [clojure-1.4.0.jar:na] > at java.lang.Thread.run(Thread.java:722) [na:1.7.0_17]Caused by: > com.orientechnologies.orient.core.exception.OConcurrentModificationException: > Cannot UPDATE the record #13:8 because the version is not the latest. > Probably you are updating an old record or it has been modified by another > user (db=v7 your=v6) > at > com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage.updateRecord(OLocalPaginatedStorage.java:797) > ~[orientdb-core-1.7.6.jar:1.7.6] > at > com.orientechnologies.orient.core.db.raw.ODatabaseRaw.save(ODatabaseRaw.java:273) > ~[orientdb-core-1.7.6.jar:1.7.6] > at > com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.executeSaveRecord(ODatabaseRecordAbstract.java:1132) > ~[orientdb-core-1.7.6.jar:1.7.6] > at > com.orientechnologies.orient.core.tx.OTransactionOptimistic.addRecord(OTransactionOptimistic.java:422) > ~[orientdb-core-1.7.6.jar:1.7.6] > at > com.orientechnologies.orient.core.tx.OTransactionOptimistic.saveRecord(OTransactionOptimistic.java:365) > ~[orientdb-core-1.7.6.jar:1.7.6] > at > com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.save(ODatabaseRecordTx.java:319) > ~[orientdb-core-1.7.6.jar:1.7.6] > at > com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.save(ODatabaseRecordTx.java:40) > ~[orientdb-core-1.7.6.jar:1.7.6] > at > com.orientechnologies.orient.core.record.ORecordAbstract.save(ORecordAbstract.java:334) > ~[orientdb-core-1.7.6.jar:1.7.6] > at > com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1458) > ~[orientdb-core-1.7.6.jar:1.7.6] > at > com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1447) > ~[orientdb-core-1.7.6.jar:1.7.6] > at > com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1436) > ~[orientdb-core-1.7.6.jar:1.7.6] > at > com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:81) > ~[orientdb-core-1.7.6.jar:1.7.6] > at > com.orientechnologies.orient.core.db.record.ridbag.embedded.OEmbeddedRidBag.serialize(OEmbeddedRidBag.java:291) > ~[orientdb-core-1.7.6.jar:1.7.6] > at > com.orientechnologies.orient.core.db.record.ridbag.ORidBag.toStream(ORidBag.java:222) > ~[orientdb-core-1.7.6.jar:1.7.6] > at > com.orientechnologies.orient.core.serialization.serializer.record.string.ORecordSerializerCSVAbstract.fieldToStream(ORecordSerializerCSVAbstract.java:542) > ~[orientdb-core-1.7.6.jar:1.7.6] > at > com.orientechnologies.orient.core.serialization.serializer.record.string.ORecordSerializerSchemaAware2CSV.toString(ORecordSerializerSchemaAware2CSV.java:495) > ~[orientdb-core-1.7.6.jar:1.7.6] > at > com.orientechnologies.orient.core.serialization.serializer.record.string.ORecordSerializerStringAbstract.toStream(ORecordSerializerStringAbstract.java:669) > ~[orientdb-core-1.7.6.jar:1.7.6] > at > com.orientechnologies.orient.core.serialization.serializer.record.string.ORecordSerializerSchemaAware2CSV.toStream(ORecordSerializerSchemaAware2CSV.java:258) > ~[orientdb-core-1.7.6.jar:1.7.6] > at > com.orientechnologies.orient.core.record.ORecordSchemaAwareAbstract.toStream(ORecordSchemaAwareAbstract.java:420) > ~[orientdb-core-1.7.6.jar:1.7.6] > at > com.orientechnologies.orient.core.record.ORecordSchemaAwareAbstract.toStream(ORecordSchemaAwareAbstract.java:415) > ~[orientdb-core-1.7.6.jar:1.7.6] > at > com.orientechnologies.orient.core.record.impl.ODocument.toStream(ODocument.java:446) > ~[orientdb-core-1.7.6.jar:1.7.6] > at > com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage.commitEntry(OLocalPaginatedStorage.java:2102) > ~[orientdb-core-1.7.6.jar:1.7.6] > at > com.orientechnologies.orient.core.storage.impl.local.paginated.OLocalPaginatedStorage.commit(OLocalPaginatedStorage.java:1078) > ~[orientdb-core-1.7.6.jar:1.7.6] > at > com.orientechnologies.orient.core.tx.OTransactionOptimistic.doCommit(OTransactionOptimistic.java:132) > ~[orientdb-core-1.7.6.jar:1.7.6] > at > com.orientechnologies.orient.core.tx.OTransactionOptimistic.commit(OTransactionOptimistic.java:105) > ~[orientdb-core-1.7.6.jar:1.7.6] > at > com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.commit(ODatabaseRecordTx.java:142) > ~[orientdb-core-1.7.6.jar:1.7.6] > at > com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:504) > ~[orientdb-core-1.7.6.jar:1.7.6] > at > com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:496) > ~[orientdb-core-1.7.6.jar:1.7.6] > at > com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.commit(ONetworkProtocolBinary.java:1096) > ~[orientdb-server-1.7.2.jar:1.7.2] > at > com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.executeRequest(ONetworkProtocolBinary.java:344) > ~[orientdb-server-1.7.2.jar:1.7.2] > at > com.orientechnologies.orient.server.network.protocol.binary.OBinaryNetworkProtocolAbstract.execute(OBinaryNetworkProtocolAbstract.java:169) > ~[orientdb-server-1.7.2.jar:1.7.2] > at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:45) > ~[orient-commons-1.7.6.jar:1.7.6] > > -- > > --- > You received this message because you are subscribed to the Google Groups > "OrientDB" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- Best regards, Andrey Lomakin. Orient Technologies the Company behind OrientDB -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
