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

Bulk record creation in cluster with pre-created indices causes ClassCastException [moved] #104

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

Comments

@lvca
Copy link
Member

lvca commented Dec 10, 2012

This is Issue 104 moved from a Google Code project.
Added by 2010-08-26T03:54:50.000Z by campbell...@gmail.com.
Please review that bug for more context and additional comments, but update this bug.
Closed (Fixed).

Original labels: Type-Defect, Priority-Medium, v0.9.22

Original description

<b>What steps will reproduce the problem?</b>
1. Run
  java -cp .;orient-core-0.9.22-SNAPSHOT.jar;orient-commons-0.9.22-SNAPSHOT.jar;slf4j-api-1.6.1.jar IndexTester memory:testindex

Environment:
Windows XP
java version &quot;1.6.0_21&quot;

What is the expected output? 
  Program should successfully insert 50000 records into the in-memory database, then exit.
What do you see instead?
  Program throws the following ClassCastException at some point during execution (sometimes happens sooner, sometimes later):

Saved record 1 of 50000
...
...
Saved record 5958 of 50000
Saved record 5959 of 50000
Exception in thread &quot;main&quot; com.orientechnologies.orient.core.exception.ODatabase
Exception: Error on saving record in cluster #3
        at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.executeSaveRecord(ODatabaseRecordAbstract.java:457)
        at com.orientechnologies.orient.core.tx.OTransactionNoTx.save(OTransactionNoTx.java:46)
        at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.save(ODatabaseRecordTx.java:88)
        at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.save(ODatabaseRecordTx.java:30)
        at com.orientechnologies.orient.core.db.ODatabaseRecordWrapperAbstract.save(ODatabaseRecordWrapperAbstract.java:109)
        at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.save(ODatabaseDocumentTx.java:132)
        at com.orientechnologies.orient.core.db.object.ODatabaseObjectTx.save(ODatabaseObjectTx.java:170)
        at com.orientechnologies.orient.core.db.object.ODatabaseObjectTx.save(ODatabaseObjectTx.java:145)
        at IndexTester.doImport(IndexTester.java:39)
        at IndexTester.main(IndexTester.java:52)
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
        at java.lang.Integer.compareTo(Unknown Source)
        at com.orientechnologies.common.collection.OTreeMap.getEntry(OTreeMap.java:299)
        at com.orientechnologies.common.collection.OTreeMap.getEntry(OTreeMap.java:277)
        at com.orientechnologies.common.collection.OTreeMap.remove(OTreeMap.java:603)
        at com.orientechnologies.orient.core.type.tree.OTreeMapPersistent.remove(OTreeMapPersistent.java:159)
        at com.orientechnologies.orient.core.index.OPropertyIndex.remove(OPropertyIndex.java:129)
        at com.orientechnologies.orient.core.index.OPropertyIndexManager.onRecordAfterUpdate(OPropertyIndexManager.java:74)
        at com.orientechnologies.orient.core.hook.ODocumentHookAbstract.onTrigger(ODocumentHookAbstract.java:75)
        at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.callbackHooks(ODatabaseRecordAbstract.java:545)
        at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.executeSaveRecord(ODatabaseRecordAbstract.java:450)
        ... 9 more
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