Exception when execute Add Edge

86 views
Skip to first unread message

Hoàng Hưng

unread,
Aug 28, 2012, 11:02:09 PM8/28/12
to orient-...@googlegroups.com
I have more than 1 million Account and 2 million Shares, Execute add Share to account, sometime I've got these below. How can i avoid it:

com.orientechnologies.orient.core.exception.ODatabaseException: Record position #4350448280 was bound to file #8 but the position #155909800 is out of file size
at com.orientechnologies.orient.core.storage.impl.local.OMultiFileSegment.getRelativePosition(OMultiFileSegment.java:256)
at com.orientechnologies.orient.core.storage.impl.local.ODataLocal.getFreeSpace(ODataLocal.java:604)
at com.orientechnologies.orient.core.storage.impl.local.ODataLocal.addRecord(ODataLocal.java:198)
at com.orientechnologies.orient.core.storage.impl.local.OStorageLocal.updateRecord(OStorageLocal.java:1598)
at com.orientechnologies.orient.core.storage.impl.local.OStorageLocal.updateRecord(OStorageLocal.java:939)
at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.save(ODatabaseRaw.java:252)
at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.executeSaveRecord(ODatabaseRecordAbstract.java:668)
at com.orientechnologies.orient.core.tx.OTransactionNoTx.saveRecord(OTransactionNoTx.java:72)
at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.save(ODatabaseRecordTx.java:224)
at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.save(ODatabaseRecordTx.java:217)
at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.save(ODatabaseRecordTx.java:35)
at com.orientechnologies.orient.core.record.ORecordAbstract.save(ORecordAbstract.java:275)
at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1251)
at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1240)
at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:69)
at com.orientechnologies.orient.core.type.tree.OMVRBTreeRID.saveAllNewEntries(OMVRBTreeRID.java:364)
at com.orientechnologies.orient.core.type.tree.provider.OMVRBTreeRIDProvider.toStream(OMVRBTreeRIDProvider.java:112)
at com.orientechnologies.orient.core.type.tree.OMVRBTreeRIDSet.toStream(OMVRBTreeRIDSet.java:170)
at com.orientechnologies.orient.core.serialization.serializer.record.string.ORecordSerializerCSVAbstract.linkSetToStream(ORecordSerializerCSVAbstract.java:404)
at com.orientechnologies.orient.core.serialization.serializer.record.string.ORecordSerializerCSVAbstract.fieldToStream(ORecordSerializerCSVAbstract.java:321)
at com.orientechnologies.orient.core.serialization.serializer.record.string.ORecordSerializerSchemaAware2CSV.toString(ORecordSerializerSchemaAware2CSV.java:278)
at com.orientechnologies.orient.core.serialization.serializer.record.string.ORecordSerializerStringAbstract.toStream(ORecordSerializerStringAbstract.java:87)
at com.orientechnologies.orient.core.serialization.serializer.record.string.ORecordSerializerSchemaAware2CSV.toStream(ORecordSerializerSchemaAware2CSV.java:475)
at com.orientechnologies.orient.core.record.ORecordSchemaAwareAbstract.toStream(ORecordSchemaAwareAbstract.java:118)
at com.orientechnologies.orient.core.record.ORecordSchemaAwareAbstract.toStream(ORecordSchemaAwareAbstract.java:113)
at com.orientechnologies.orient.core.record.impl.ODocument.toStream(ODocument.java:378)
at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.executeSaveRecord(ODatabaseRecordAbstract.java:621)
at com.orientechnologies.orient.core.tx.OTransactionNoTx.saveRecord(OTransactionNoTx.java:72)
at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.save(ODatabaseRecordTx.java:224)
at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.save(ODatabaseRecordTx.java:217)
at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.save(ODatabaseRecordTx.java:35)
at com.orientechnologies.orient.core.record.ORecordAbstract.save(ORecordAbstract.java:275)
at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1251)
at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1240)
at MyOrientDBTest.queryAddFriendNetworkDomain(MyOrientDBTest.java:666)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

Hoàng Hưng

unread,
Aug 28, 2012, 11:04:50 PM8/28/12
to orient-...@googlegroups.com
I use OrientDB 1.1.0 on Win 7 (64-bit)

Luca Garulli

unread,
Aug 29, 2012, 9:57:59 AM8/29/12
to orient-...@googlegroups.com
Hi,
seems that some RID points out of current db. Have you deleted some record without update the links? If you're using the Graph API it's managed automatically, otherwise it's on charge to the developer to clean all the references to the record on delete.

Lvc@

--
 
 
 

Hoàng Hưng

unread,
Aug 30, 2012, 12:00:28 AM8/30/12
to orient-...@googlegroups.com
No, I did not delete manually.
I used:
databaseGrh.removeEdge(document);
Sometime i met java.lang.OutOfMemoryError: GC overhead limit exceeded when run update/add/delete edge. Did it cause problem with link?

"otherwise it's on charge to the developer to clean all the references to the record on delete. "
From now, i can't select on Account Vertex because it fires exception: 

Error: com.orientechnologies.orient.core.exception.ODatabaseException: Error on retrieving record #26:95360 (cluster: accountvertex)
Error: com.orientechnologies.orient.core.exception.OStorageException: Error on reading record from file 'default.8.oda', position 4346487421, size 496.00Mb: the record size is bigger then the file itself (4.05Gb). Probably the record is dirty due to a previous crash. It is strongly suggested to restore the database or export and reimport this one.

I tried 2 times with export command but:

export database D:/temp/demo_graph.export.gz

Throws:

java.lang.ArrayIndexOutOfBoundsException: 1028182
        at com.orientechnologies.orient.core.serialization.OBinaryProtocol.bytes2string(OBinaryProtocol.java:202)
        at com.orientechnologies.orient.core.serialization.OBinaryProtocol.bytes2string(OBinaryProtocol.java:159)
        at com.orientechnologies.orient.core.serialization.serializer.record.string.ORecordSerializerStringAbstract.fromStream(ORecordSerializerStringAbstract.java:76)
        at com.orientechnologies.orient.core.record.ORecordSchemaAwareAbstract.deserializeFields(ORecordSchemaAwareAbstract.java:140)
        at com.orientechnologies.orient.core.record.impl.ODocument.deserializeFields(ODocument.java:1261)
        at com.orientechnologies.orient.core.record.impl.ODocument.checkForFields(ODocument.java:1201)
        at com.orientechnologies.orient.core.record.ORecordSchemaAwareAbstract.getClassName(ORecordSchemaAwareAbstract.java:83)
        at com.orientechnologies.orient.core.fetch.json.OJSONFetchContext.writeSignature(OJSONFetchContext.java:225)
        at com.orientechnologies.orient.core.serialization.serializer.record.string.ORecordSerializerJSON.toString(ORecordSerializerJSON.java:488)
        at com.orientechnologies.orient.core.serialization.serializer.record.string.ORecordSerializerStringAbstract.toString(ORecordSerializerStringAbstract.java:65)
        at com.orientechnologies.orient.core.record.ORecordAbstract.toJSON(ORecordAbstract.java:187)
        at com.orientechnologies.orient.core.db.tool.ODatabaseExport.exportRecord(ODatabaseExport.java:473)
        at com.orientechnologies.orient.core.db.tool.ODatabaseExport.exportRecords(ODatabaseExport.java:185)
        at com.orientechnologies.orient.core.db.tool.ODatabaseExport$1.call(ODatabaseExport.java:110)
        at com.orientechnologies.orient.core.storage.OStorageAbstract.callInLock(OStorageAbstract.java:162)
        at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.callInLock(ODatabaseWrapperAbstract.java:310)
        at com.orientechnologies.orient.core.db.tool.ODatabaseExport.exportDatabase(ODatabaseExport.java:93)
        at com.orientechnologies.orient.console.OConsoleDatabaseApp.exportDatabase(OConsoleDatabaseApp.java:1389)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.orientechnologies.common.console.OConsoleApplication.execute(OConsoleApplication.java:238)
        at com.orientechnologies.common.console.OConsoleApplication.executeCommands(OConsoleApplication.java:127)
        at com.orientechnologies.common.console.OConsoleApplication.run(OConsoleApplication.java:92)
        at com.orientechnologies.orient.graph.console.OGremlinConsole.main(OGremlinConsole.java:51)
com.orientechnologies.orient.core.exception.OSerializationException: Found invalid ) character. Ensure it is opened and closed correctly.
        at com.orientechnologies.orient.core.serialization.serializer.OStringSerializerHelper.parse(OStringSerializerHelper.java:215)
        at com.orientechnologies.orient.core.serialization.serializer.OStringSerializerHelper.smartSplit(OStringSerializerHelper.java:161)
        at com.orientechnologies.orient.core.serialization.serializer.OStringSerializerHelper.smartSplit(OStringSerializerHelper.java:153)
        at com.orientechnologies.orient.core.serialization.serializer.record.string.ORecordSerializerSchemaAware2CSV.fromString(ORecordSerializerSchemaAware2CSV.java:364)
        at com.orientechnologies.orient.core.serialization.serializer.record.string.ORecordSerializerStringAbstract.fromStream(ORecordSerializerStringAbstract.java:76)
        at com.orientechnologies.orient.core.record.ORecordSchemaAwareAbstract.deserializeFields(ORecordSchemaAwareAbstract.java:140)
        at com.orientechnologies.orient.core.record.impl.ODocument.deserializeFields(ODocument.java:1261)
        at com.orientechnologies.orient.core.record.impl.ODocument.checkForFields(ODocument.java:1201)
        at com.orientechnologies.orient.core.record.impl.ODocument.rawField(ODocument.java:493)
        at com.orientechnologies.orient.core.record.impl.ODocument.field(ODocument.java:515)
        at com.orientechnologies.orient.core.type.tree.provider.OMVRBTreeRIDProvider.fromDocument(OMVRBTreeRIDProvider.java:286)
        at com.orientechnologies.orient.core.type.tree.provider.OMVRBTreeRIDProvider.fromStream(OMVRBTreeRIDProvider.java:171)
        at com.orientechnologies.orient.core.type.tree.provider.OMVRBTreeRIDProvider.lazyUnmarshall(OMVRBTreeRIDProvider.java:208)
        at com.orientechnologies.orient.core.type.tree.OMVRBTreeRID.hashedSize(OMVRBTreeRID.java:218)
        at com.orientechnologies.orient.core.type.tree.OMVRBTreeRID.size(OMVRBTreeRID.java:211)
        at com.orientechnologies.orient.core.type.tree.OMVRBTreeRIDSet.size(OMVRBTreeRIDSet.java:79)
        at com.orientechnologies.common.collection.OMultiValue.getSize(OMultiValue.java:74)
        at com.orientechnologies.orient.core.serialization.serializer.record.string.ORecordSerializerSchemaAware2CSV.toString(ORecordSerializerSchemaAware2CSV.java:161)
        at com.orientechnologies.orient.core.serialization.serializer.record.string.ORecordSerializerStringAbstract.toStream(ORecordSerializerStringAbstract.java:87)
        at com.orientechnologies.orient.core.serialization.serializer.record.string.ORecordSerializerSchemaAware2CSV.toStream(ORecordSerializerSchemaAware2CSV.java:475)
        at com.orientechnologies.orient.core.record.ORecordSchemaAwareAbstract.toStream(ORecordSchemaAwareAbstract.java:118)
        at com.orientechnologies.orient.core.record.ORecordSchemaAwareAbstract.toStream(ORecordSchemaAwareAbstract.java:113)
        at com.orientechnologies.orient.core.record.impl.ODocument.toStream(ODocument.java:378)
        at com.orientechnologies.orient.core.db.tool.ODatabaseExport.exportRecords(ODatabaseExport.java:196)
        at com.orientechnologies.orient.core.db.tool.ODatabaseExport$1.call(ODatabaseExport.java:110)
        at com.orientechnologies.orient.core.storage.OStorageAbstract.callInLock(OStorageAbstract.java:162)
        at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.callInLock(ODatabaseWrapperAbstract.java:310)
        at com.orientechnologies.orient.core.db.tool.ODatabaseExport.exportDatabase(ODatabaseExport.java:93)
        at com.orientechnologies.orient.console.OConsoleDatabaseApp.exportDatabase(OConsoleDatabaseApp.java:1389)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.orientechnologies.common.console.OConsoleApplication.execute(OConsoleApplication.java:238)
        at com.orientechnologies.common.console.OConsoleApplication.executeCommands(OConsoleApplication.java:127)
        at com.orientechnologies.common.console.OConsoleApplication.run(OConsoleApplication.java:92)
        at com.orientechnologies.orient.graph.console.OGremlinConsole.main(OGremlinConsole.java:51)

!ERROR: Error on exporting database 'demo' to: D:/temp/demo_graph.export.gz
-> Found invalid ) character. Ensure it is opened and closed correctly.


Seriously, now, I can't connect to database:

orientdb> connect local:D:/orientdb-graphed-1.1.0/databases/demo admin admin
Connecting to database [local:D:/Projects/orientDB/dbserver1.1.0/orientdb-graphed-1.1.0/databases/demo] with user 'admin'...
Error: com.orientechnologies.common.exception.OException: Error on creation of shared resource
Error: java.lang.NullPointerException

HOW can i save my database, Pzl help!



--
 
 
 

Reply all
Reply to author
Forward
0 new messages