About rollback

forum_thread

Removing an entity throws exception

Hi all, I'm testing ObjectDB for my project, but I have troubles with it. At this time I'm not able to remove customer entity, when it's read by a query (it's attached), it throws this exception: Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: com.objectdb.o._RollbackException: Failed to commit transaction: 51 ... ... { em. getTransaction ( ) . rollback ( ) ; throw new RuntimeException ...

 
manual

JPA Lifecycle Events

Explains how to use JPA lifecycle events (client side triggers) with callback methods and listener classes.... an active transaction, the transaction is marked for rollback and no more callback methods are invoked for that operation. ...

 
forum_thread

Attempt to refresh a non managed entity object (error 635)

Just ran into a problem that I've not seen in 10 years of running ObjectDb: java.lang.IllegalArgumentException Attempt to refresh a non managed entity object (error 635) Nothing changed in my code, but I'm wondering if there is a problem with the config file, and /or my recent experiments with Intellij's JPA database explorer, which required me to use a JPA persistence.xml configuration file. (I was able to use to run objectdb queries from inside Intellij). ... in my tests, for example, managed, but objects surviving a rollback. Pretty sure that my configuration is not right. ...

 
issue

Unexpected exception (Error 990) - NullPointerException

I'm using Version 2.5.4_05 Maybe this Exception is created by calling em.merge()  - et least this is what I do in the named line. ... file only stated, that the transaction has been marked for rollback. Why it has been marked was not clear. ...

 
forum_thread

Optimistic locking: prevent version increment on entity collection attribute

Hello, I have an entity E with an attribute which is a collection of entities (one to many relationship) with an optimistic locking strategy supported by a version field. Is it possible to prevent the increment of the version of entity E when entities are added to or removed from the collection? Something like the equivalent of @OptimisticLock(excluded=true) in Hibernate? Thanks, Farid ... we are still in the same transaction (before any commit or rollback). In the debugger, when I check the document instance in the ...

 
manual

[ODB1] Chapter 4 - JDO Metadata

Shows how to define JDO metadata for persistence capable classes.... the database. The main difference is that, on transaction rollback, it returns automatically to its value at the beginning of the ...

 
forum_thread

java 8 LocalDateTime is not working in query

My entity class has a field of type java.time.LocalDateTime. I'm able to persist entities and I'm able to query without datetime field in where clause, but with datetime in where clause doesn't return anything and not exception.   ... @Convert annotation defined in the JPA standard, I get an rollback caused by this exception: com.objectdb.o.UserException: Attempt ...

 
forum_thread

How to Use a SF with extended Persistence Context?

Hey, I have a problem to use SF with an Extended Persistence Context Regarding to Transactions. The need for an extended persistence Context emerges for the need to create queries in advance for fast execution so I need to store the queries and I need an EntityManager that doesn't get closed between calls. When I call the SF directly no problem happens but if I use SL to hold a reference to the SF I get com.objectdb.o._PersistenceException: Attempt to begin a new transaction when a transaction is active. ... com.objectdb.o._TransactionRequiredException: Attempt to rollback a transaction when no transaction is active at ... at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.rollback(BaseTransactionManagerDelegate.java:114) at ...

 
forum_thread

NullPointerException while setting a new property value

Hello, we are using ObjectDB version 2.4.4 and we are unable to resolve following NPE on enhanced entity: java.lang.NullPointerException at com.objectdb.o.ENT.beforeModifyMember(ENT.java:1099) at model.PluginMetaData.__odbSet_maxAllowedDownloads(PluginMetaData.java:1) at model.PluginMetaData.setMaxAllowedDownloads(PluginMetaData.java:268) at model.PluginMetaData.setPluginDescriptor(PluginMetaData.java:94) PluginMetaData looks like this (nothing extraordinary, no relationship to other @entities): ... em. getTransaction ( ) . rollback ( ) ; em. close ( ) ; ...

 
manual

[ODB1] Chapter 3 - Persistent Classes

Explains what a persistence capable class is and which types are supported by JDO.... are going to be cleared at transaction end (for example on rollback). This event is rarely used. Other persistent objects and even ...