Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConcurrentModificationException occurs on commit optimistic transaction [moved] #84

Closed
lvca opened this issue Dec 10, 2012 · 0 comments
Closed

Comments

@lvca
Copy link
Member

lvca commented Dec 10, 2012

This is Issue 84 moved from a Google Code project.
Added by 2010-07-29T19:49:17.000Z by mkamalo...@gmail.com.
Please review that bug for more context and additional comments, but update this bug.
Closed (Done).

Original labels: Type-Defect, Priority-Medium

Original description

<b>What steps will reproduce the problem?</b>
1. I run code from tutorial but changed transaction type

        ODatabaseDocumentTx db = new ODatabaseDocumentTx(
                &quot;local:c:/orient_test/orient_test&quot;).open(&quot;admin&quot;, &quot;admin&quot;);

        db.begin(TXTYPE.OPTIMISTIC);

        // CREATE A NEW DOCUMENTS AND FILL IT
        ODocument doc = new ODocument(db, &quot;Person&quot;);
        doc.field(&quot;name&quot;, &quot;Luke&quot;);
        doc.field(&quot;surname&quot;, &quot;Skywalker&quot;);
        doc.field(&quot;city&quot;, new ODocument(db, &quot;City&quot;).field(&quot;name&quot;, &quot;Rome&quot;)
                .field(&quot;country&quot;, &quot;Italy&quot;));

        // SAVE THE DOCUMENT
        doc.save();
        db.commit(); // Exception on this line
        db.close();

I have exception:

Exception in thread &quot;main&quot; java.util.ConcurrentModificationException
    at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
    at java.util.HashMap$ValueIterator.next(Unknown Source)
    at com.orientechnologies.orient.core.storage.impl.local.OStorageLocalTxExecuter.commitAllPendingRecords(OStorageLocalTxExecuter.java:130)
    at com.orientechnologies.orient.core.storage.impl.local.OStorageLocal.commit(OStorageLocal.java:612)
    at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.executeCommit(ODatabaseRecordTx.java:102)
    at com.orientechnologies.orient.core.tx.OTransactionOptimistic.commit(OTransactionOptimistic.java:34)
    at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.commit(ODatabaseRecordTx.java:65)
    at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.commit(ODatabaseRecordTx.java:1)
    at com.orientechnologies.orient.core.db.ODatabaseRecordWrapperAbstract.commit(ODatabaseRecordWrapperAbstract.java:52)
    at ru.mkamalov.orienttest.Start.main(Start.java:26)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant