NoTx database does not support commits, please always use tx database. Otherwise you may have problems with data consistency.
On Fri, Dec 26, 2014 at 7:46 AM, Bazooka Joes <[email protected]> wrote: > Hi! > > I am using the embedded API of OrientDB version 1.7.10 and my > application's commits do not persist across application restart. I am using > the PLocal storage type. > > If there is a sample application that demonstrates how to shutdown I would > appreciate if you could point me to it. I've tried to treat OServer as an > example application however it seems to be much more general than my > application. > > When my application shuts down with `graphDbFactory.getNoTx().shutdown();` > after doing a commit these exceptions are thrown: > > Shutting down database ... > com.orientechnologies.orient.core.tx.ORollbackException: Given > transaction was rolled back and can not be used. > at com.orientechnologies.orient.core.tx.OTransactionOptimistic.doCommit( > OTransactionOptimistic.java:450) > at com.orientechnologies.orient.core.tx.OTransactionOptimistic.commit( > OTransactionOptimistic.java:148) > at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.commit( > ODatabaseRecordTx.java:142) > at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx. > commit(ODatabaseDocumentTx.java:511) > at com.orientechnologies.orient.core.db.document. > ODatabaseDocumentTxPooled.close(ODatabaseDocumentTxPooled.java:103) > at com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.removeContext( > OrientBaseGraph.java:1550) > at com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.shutdown( > OrientBaseGraph.java:900) > > Exception in thread "Thread-7" com.orientechnologies.orient.core.exception > .OConfigurationException: Error on opening database: the engine 'plocal' > was not found. URL was: plocal:C:/..../newdb. Registered engines are: [] > at com.orientechnologies.orient.core.Orient.loadStorage(Orient.java:273) > at com.orientechnologies.orient.core.db.raw.ODatabaseRaw.open( > ODatabaseRaw.java:105) > at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open( > ODatabaseWrapperAbstract.java:49) > at com.orientechnologies.orient.core.db.record.ODatabaseRecordAbstract. > open(ODatabaseRecordAbstract.java:268) > at com.orientechnologies.orient.core.db.ODatabaseWrapperAbstract.open( > ODatabaseWrapperAbstract.java:49) > at com.orientechnologies.orient.core.db.document. > ODatabaseDocumentTxPooled.<init>(ODatabaseDocumentTxPooled.java:47) > at com.orientechnologies.orient.core.db.document.ODatabaseDocumentPool. > createResource(ODatabaseDocumentPool.java:44) > at com.orientechnologies.orient.core.db.document.ODatabaseDocumentPool. > createResource(ODatabaseDocumentPool.java:20) > at com.orientechnologies.orient.core.db.ODatabasePoolBase$1. > createNewResource(ODatabasePoolBase.java:72) > at com.orientechnologies.orient.core.db.ODatabasePoolBase$1. > createNewResource(ODatabasePoolBase.java:61) > at com.orientechnologies.common.concur.resource.OResourcePool.getResource > (OResourcePool.java:85) > at com.orientechnologies.common.concur.resource.OReentrantResourcePool. > getResource(OReentrantResourcePool.java:63) > at com.orientechnologies.orient.core.db.ODatabasePoolAbstract.acquire( > ODatabasePoolAbstract.java:154) > at com.orientechnologies.orient.core.db.ODatabasePoolAbstract.acquire( > ODatabasePoolAbstract.java:134) > at com.orientechnologies.orient.core.db.ODatabasePoolBase.acquire( > ODatabasePoolBase.java:103) > at com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.<init>( > OrientBaseGraph.java:120) > at com.tinkerpop.blueprints.impls.orient.OrientTransactionalGraph.<init>( > OrientTransactionalGraph.java:39) > at com.tinkerpop.blueprints.impls.orient.OrientGraph.<init>(OrientGraph. > java:108) > at com.tinkerpop.blueprints.impls.orient.OrientGraphFactory.getTx( > OrientGraphFactory.java:104) > at com.tinkerpop.blueprints.impls.orient.OrientGraphFactory.get( > OrientGraphFactory.java:92) > > > If my application has not committed anything before being shutdown this > exception is thrown: > > Exception in thread "Thread-7" com.orientechnologies.orient.core.exception > .OStorageException: Storage newdb is not opened. > at com.orientechnologies.orient.core.storage.OStorageEmbedded. > checkOpeness(OStorageEmbedded.java:264) > at com.orientechnologies.orient.core.storage.impl.local.paginated. > OLocalPaginatedStorage.rollback(OLocalPaginatedStorage.java:1136) > at com.orientechnologies.orient.core.tx.OTransactionOptimistic$1.call( > OTransactionOptimistic.java:183) > at com.orientechnologies.orient.core.tx.OTransactionOptimistic$1.call( > OTransactionOptimistic.java:179) > at com.orientechnologies.orient.core.storage.OStorageAbstract.callInLock( > OStorageAbstract.java:168) > at com.orientechnologies.orient.core.storage.impl.local.paginated. > OLocalPaginatedStorage.callInLock(OLocalPaginatedStorage.java:982) > at com.orientechnologies.orient.core.tx.OTransactionOptimistic.rollback( > OTransactionOptimistic.java:179) > at com.orientechnologies.orient.core.db.record.ODatabaseRecordTx.commit( > ODatabaseRecordTx.java:152) > at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx. > commit(ODatabaseDocumentTx.java:511) > at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx. > commit(ODatabaseDocumentTx.java:503) > at com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.removeContext( > OrientBaseGraph.java:1540) > at com.tinkerpop.blueprints.impls.orient.OrientBaseGraph.shutdown( > OrientBaseGraph.java:900) > > > Thank you for your help. > > -- > > --- > 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 [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- Best regards, Andrey Lomakin. -- --- 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
