Cannot create Class inside new transaction???

191 views
Skip to first unread message

Michael Widmann

unread,
Feb 24, 2012, 10:16:42 AM2/24/12
to orient-...@googlegroups.com, Luca
com.orientechnologies.orient.core.exception.ODatabaseException: Error on saving record in cluster #1
 at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.executeSaveRecord(ODatabaseRecordAbstract.java:654)
 at com.orientechnologies.orient.core.tx.OTransactionOptimistic.addRecord(OTransactionOptimistic.java:105)
 at com.orientechnologies.orient.core.tx.OTransactionOptimistic.saveRecord(OTransactionOptimistic.java:94)
 at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.save(ODatabaseRecordTx.java:225)
 at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.save(ODatabaseRecordTx.java:220)
 at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.save(ODatabaseRecordTx.java:42)
 at com.orientechnologies.orient.core.record.ORecordAbstract.save(ORecordAbstract.java:255)
 at com.orientechnologies.orient.core.type.tree.provider.OMVRBTreeEntryDataProviderAbstract.save(OMVRBTreeEntryDataProviderAbstract.java:163)
 at com.orientechnologies.orient.core.type.tree.provider.OMVRBTreeEntryDataProviderAbstract.save(OMVRBTreeEntryDataProviderAbstract.java:153)
 at com.orientechnologies.orient.core.type.tree.OMVRBTreeEntryPersistent.save(OMVRBTreeEntryPersistent.java:185)
 at com.orientechnologies.orient.core.type.tree.OMVRBTreePersistent.commitChanges(OMVRBTreePersistent.java:452)
 at com.orientechnologies.orient.core.type.tree.OMVRBTreeDatabaseLazySave.lazySave(OMVRBTreeDatabaseLazySave.java:69)
 at com.orientechnologies.orient.core.type.tree.OMVRBTreeDatabaseLazySave.commitChanges(OMVRBTreeDatabaseLazySave.java:57)
 at com.orientechnologies.orient.core.type.tree.OMVRBTreePersistent.put(OMVRBTreePersistent.java:370)
 at com.orientechnologies.orient.core.index.OIndexMultiValues.put(OIndexMultiValues.java:81)
 at com.orientechnologies.orient.core.index.OIndexMultiValues.put(OIndexMultiValues.java:42)
 at com.orientechnologies.orient.core.index.OIndexMVRBTreeAbstract.commit(OIndexMVRBTreeAbstract.java:616)
 at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx$1.call(ODatabaseRecordTx.java:275)
 at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx$1.call(ODatabaseRecordTx.java:265)
 at com.orientechnologies.orient.core.storage.OStorageAbstract.callInLock(OStorageAbstract.java:173)
 at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.executeCommit(ODatabaseRecordTx.java:265)
 at com.orientechnologies.orient.core.tx.OTransactionOptimistic.commit(OTransactionOptimistic.java:46)
 at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.commit(ODatabaseRecordTx.java:119)
 at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.commit(ODatabaseDocumentTx.java:311)
 at com.bayoda.db.orientdb.impl.OrientDbTransaction.commit(OrientDbTransaction.java:128)
 at com.bayoda.db.commons.cache.CacheTransactionWrapper.commit(CacheTransactionWrapper.java:110)
 at com.bayoda.client.core.service.impl.AbstractBaseServiceImpl.save(AbstractBaseServiceImpl.java:35)
 at com.bayoda.client.core.service.impl.MountPointRunServiceImpl.createMountPointRun(MountPointRunServiceImpl.java:33)
 at com.bayoda.client.engine.service.impl.backup.mountpoint.BackupMountPointTask.run(BackupMountPointTask.java:58)
 at com.bayoda.commons.concurrent.BlockingExecutor$1.run(BlockingExecutor.java:52)
 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalStateException: Cannot create a new class inside a transaction
 at com.orientechnologies.orient.core.metadata.schema.OSchemaShared.createClass(OSchemaShared.java:133)
 at com.orientechnologies.orient.core.metadata.schema.OSchemaShared.createClass(OSchemaShared.java:112)
 at com.orientechnologies.orient.core.metadata.schema.OSchemaShared.getOrCreateClass(OSchemaShared.java:169)
 at com.orientechnologies.orient.core.metadata.schema.OSchemaProxy.getOrCreateClass(OSchemaProxy.java:70)
 at com.orientechnologies.orient.core.record.ORecordSchemaAwareAbstract.setClassName(ORecordSchemaAwareAbstract.java:90)
 at com.orientechnologies.orient.core.type.tree.provider.OMVRBTreeRIDProvider.toDocument(OMVRBTreeRIDProvider.java:271)
 at com.orientechnologies.orient.core.type.tree.provider.OMVRBTreeRIDProvider.toStream(OMVRBTreeRIDProvider.java:155)
 at com.orientechnologies.orient.core.type.tree.OMVRBTreeRIDSet.toStream(OMVRBTreeRIDSet.java:171)
 at com.orientechnologies.orient.core.type.tree.OMVRBTreeRIDSet.toStream(OMVRBTreeRIDSet.java:177)
 at com.orientechnologies.orient.core.serialization.serializer.stream.OStreamSerializerListRID.toStream(OStreamSerializerListRID.java:45)
 at com.orientechnologies.orient.core.type.tree.provider.OMVRBTreeMapEntryProvider.serializeNewValue(OMVRBTreeMapEntryProvider.java:306)
 at com.orientechnologies.orient.core.type.tree.provider.OMVRBTreeMapEntryProvider.toStream(OMVRBTreeMapEntryProvider.java:269)
 at com.orientechnologies.orient.core.record.impl.ORecordBytesLazy.toStream(ORecordBytesLazy.java:40)
 at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract.executeSaveRecord(ODatabaseRecordAbstract.java:585)
 ... 32 more

Week of exceptions flying around our ears ...

--
bayoda.com - Professional Online Backup Solutions for Small and Medium Sized Companies

Luca Garulli

unread,
Feb 24, 2012, 10:19:36 AM2/24/12
to Michael Widmann, orient-...@googlegroups.com
Hi Michael,
creation of new classes inside a transaction is not allowed. This limitation is present in SVN since about 3-4 weeks or more.

The solution is easy: create the class (even empty) before the transaction. Usually a good place is at startup.
Lvc@
Reply all
Reply to author
Forward
0 new messages