Hi,
I was trying with orientdb-graphed-1.3.0 to construct a graph using the Tinkerpop/Blueprints APIs. However I hit the issue as explained in https://github.com/nuvolabase/orientdb/issues/1167. So I moved to orientdb-graphed-1.4.0-SNAPSHOT. With this now I am not hitting the earlier java.lang.NoSuchMethodError issue but this time hitting a java.lang.NullPointerException:
Caused by: java.lang.NullPointerException
at com.tinkerpop.blueprints.impls.orient.OrientVertex.deleteEdgeIfAny(OrientVertex.java:617)
at com.tinkerpop.blueprints.impls.orient.OrientVertex.removeEdges(OrientVertex.java:610)
at com.tinkerpop.blueprints.impls.orient.OrientVertex.remove(OrientVertex.java:156)
at com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.removeVertex(OrientBaseGraph.java:266)
When I peeked into the OrientVertex.removeEdges implementation; noticed following:
public static void removeEdges(ODocument iVertex, String iFieldName, OIdentifiable iVertexToRemove, boolean iAlsoInverse, boolean useVertexFieldsForEdgeLabels)
{
//...some code
if ((fieldValue instanceof OIdentifiable))
{
//...some code
}
else if ((fieldValue instanceof OMVRBTreeRIDSet))
{
if (iVertexToRemove != null) {
//...some code
}
else
{
/*
NOTE: We are here that means iVertexToRemove is null (OrientVertex.removeEdges is being called from OrientVertex.remove passing null as the value for iVertexToRemove). So passing that null iVertexToRemove into deleteEdgeIfAny below is causing the NLP within deleteEdgeIfAny at the line ODocument doc = (ODocument)iRecord.getRecord().
*/
for (it = ((OMVRBTreeRIDSet)fieldValue).iterator(false); it.hasNext(); )
deleteEdgeIfAny(iVertexToRemove);
}
}
}
Could this be fixed and some patch provided? We are evaluating OrientDB for a POC and this issue is blocking us from proceeding further.
Thanks much,
Manas
--
---
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 orient-databa...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hi Luca,
Thanks much for the quick reply.We followed your suggestion and the earlier mentioned NPE is gone. However this time we are hitting 3 other exceptions:
1) com.orientechnologies.orient.core.exception.OConcurrentModificationException
2) com.orientechnologies.orient.core.exception.ODatabaseException
3) a new NPE.
The stack traces are mentioned below. We are hitting these exceptions thru some TestNG tests (all single threaded); so not quite sure why the first one viz OConcurrentModificationException is occurring. Yet we tried to follow the solution for that one as mentioned here: https://groups.google.com/forum/#!msg/orient-database/dIE0idnVKmI/0geXbIs_mZEJ by disabling level1 cache and mvcc by adding following into orientdb-server-config.xml:
<properties>
<entry name="db.mvcc" value="false"/>
<entry name="cache.level1.enabled" value="false"/>
</properties>
at com.tinkerpop.blueprints.impls.orient.OrientVertex.remove(OrientVertex.java:156)However that didn’t fix the issue. The 3 exceptions are not occurring all the time. Sometime all the TestNG tests pass whereas sometime arbitrarily couple of them fails with above exceptions. We are using local file based OrientDB in embedded mode. Any help/pointer is resolving these would be greatly appreciated. Here are the stack traces:
Exception_1:
com.orientechnologies.orient.core.exception.OConcurrentModificationException: Cannot DELETE the record #9:147 because the version is not the latest. Probably you are deleting an old record or it has been modified by another user (db=v5 your=v6)
at com.orientechnologies.orient.core.storage.impl.local.OStorageLocal.deleteRecord(OStorageLocal.java:1943)
at com.orientechnologies.orient.core.storage.impl.local.OStorageLocalTxExecuter.deleteRecord(OStorageLocalTxExecuter.java:152)
at com.orientechnologies.orient.core.storage.impl.local.OStorageLocalTxExecuter.commitEntry(OStorageLocalTxExecuter.java:304)
at com.orientechnologies.orient.core.storage.impl.local.OStorageLocalTxExecuter.commitAllPendingRecords(OStorageLocalTxExecuter.java:184)
at com.orientechnologies.orient.core.storage.impl.local.OStorageLocal.commit(OStorageLocal.java:1302)
at com.orientechnologies.orient.core.tx.OTransactionOptimistic$2.call(OTransactionOptimistic.java:123)
at com.orientechnologies.orient.core.tx.OTransactionOptimistic$2.call(OTransactionOptimistic.java:119)
at com.orientechnologies.orient.core.storage.OStorageAbstract.callInLock(OStorageAbstract.java:168)
at com.orientechnologies.orient.core.storage.impl.local.OStorageLocal.callInLock(OStorageLocal.java:1114)
at com.orientechnologies.orient.core.tx.OTransactionOptimistic.commit(OTransactionOptimistic.java:119)
at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.commit(ODatabaseRecordTx.java:113)
at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:454)
at com.tinkerpop.blueprints.impls.orient.OrientTransactionalGraph.commit(OrientTransactionalGraph.java:49)
Exception_2:
Caused by: com.orientechnologies.orient.core.exception.ODatabaseException: Error on retrieving record using temporary RecordId: #9:-4
at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.read(ODatabaseRaw.java:256)
at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.executeReadRecord(ODatabaseRecordAbstract.java:665)
at com.orientechnologies.orient.core.tx.OTransactionOptimistic.loadRecord(OTransactionOptimistic.java:183)
at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.load(ODatabaseRecordTx.java:200)
at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.load(ODatabaseRecordTx.java:36)
at com.orientechnologies.orient.core.id.ORecordId.getRecord(ORecordId.java:293)
at com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.getVertex(OrientBaseGraph.java:293)
at com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.getVertex(OrientBaseGraph.java:49)
Exception_3:
Caused by: java.lang.NullPointerException
at com.tinkerpop.blueprints.impls.orient.OrientVertex.removeEdges(OrientVertex.java:582)
at com.tinkerpop.blueprints.impls.orient.OrientVertex.removeInverseEdge(OrientVertex.java:642)
at com.tinkerpop.blueprints.impls.orient.OrientVertex.removeEdges(OrientVertex.java:560)
at com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.removeVertex(OrientBaseGraph.java:301)
Thanks,
Manas
Hi Luca,
As you suggested earlier; for the first NPE issue we did pick the latest code from github (on yesterday i.e. 9 May 2013). For the OConcurrentModificationException; under what scenarios this can arise in a single threaded app? Any pointer in resolving these is highly appreciated.
Thanks much,
Manas
On Wednesday, May 8, 2013 6:08:22 PM UTC+5:30, Manas wrote:
Hi,
I was trying with orientdb-graphed-1.3.0 to construct a graph using the Tinkerpop/Blueprints APIs. However I hit the issue as explained in https://github.com/nuvolabase/orientdb/issues/1167. So I moved to orientdb-graphed-1.4.0-SNAPSHOT. With this now I am not hitting the earlier java.lang.NoSuchMethodError issue but this time hitting a java.lang.NullPointerException:
Caused by: java.lang.NullPointerException
at com.tinkerpop.blueprints.impls.orient.OrientVertex.deleteEdgeIfAny(OrientVertex.java:617)
at com.tinkerpop.blueprints.impls.orient.OrientVertex.removeEdges(OrientVertex.java:610)
at com.tinkerpop.blueprints.impls.orient.OrientVertex.remove(OrientVertex.java:156)
at com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.removeVertex(OrientBaseGraph.java:266)
When I peeked into the OrientVertex.removeEdges implementation; noticed following:
public static void removeEdges(ODocument iVertex, String iFieldName, OIdentifiable iVertexToRemove, boolean iAlsoInverse, boolean useVertexFieldsForEdgeLabels)
{
//...some code
if ((fieldValue instanceof OIdentifiable))
{
//...some code
}
else if ((fieldValue instanceof OMVRBTreeRIDSet))
{
if (iVertexToRemove != null) {
//...some code
}
else
{
/*
NOTE: We are here that means iVertexToRemove is null (OrientVertex.removeEdges is being called from OrientVertex.remove passing null as the value for iVertexToRemove). So passing that null iVertexToRemove into deleteEdgeIfAny below is causing the NLP within deleteEdgeIfAny at the line ODocument doc = (ODocument)iRecord.getRecord().
*/
for (it = ((OMVRBTreeRIDSet)fieldValue).iterator(false); it.hasNext(); )
deleteEdgeIfAny(iVertexToRemove);
}
}
}
Could this be fixed and some patch provided? We are evaluating OrientDB for a POC and this issue is blocking us from proceeding further.
Thanks much,
Manas