About Transaction

forum_thread

Join query problem with new statetment

Hi, I'm trying to implement some reporting logic in my application and got nasty exception when using query with join. The query code is: ... DEBUG o.s.orm.jpa.JpaTransactionManager - Should roll back transaction but cannot - no transaction available 2011-07-05 06:40:34.847 ["http-bio-8080"-exec-3] DEBUG ...

 
forum_thread

Updating existing persistence entries

I have stored some instances of MyObject via em.persist(myObjectInstance); I can fetch them and bind them to a kind of property editor in my app (it simply calls the setters to reflect gui editing actions). When I try to persist a object later on, I get an error like com.objectdb.o.UserException: Attempt to reuse an existing primary key value which makes sense to me but I'm missing a em.update() method. ... get it to work. The transparent update needs a transaction to be started and then committed after the setter of an persisted ... CRUD operations. When I use hibernate I can initiate a transaction, feed my persisted object which may have changed for one or more ...

 
forum_thread

"Attempt to lock a non entity object" error

Probably a simple answer for someone who's been using ObjectDB for awhile: I'm reading objects from the database outside a transaction (inside doesn't seem to matter). First cycle of doEdit and then doCancelEdit works fine. Second time I doEdit produces the error "Attempt to lock a non entity object" session.rollback() is somehow causing the problem (found through debugging) Is this enough information for someone to suggest what might be happening and how to fix it? ... I'm reading objects from the database outside a transaction (inside doesn't seem to matter). First cycle of doEdit ... all managed entity objects: ... Rolling back a transaction - either by invocation of rollback or by a commit failure." ...

 
forum_thread

Fantom

  Hi, so far I've been able to get ObjectDb to persist objects from many JVM languages, eg.: Java/Groovy/Scala/Kotlin. However, I can't seem to get Fantom to work. Anyone tried this yet? Dave     ... ( ) . with { transaction. begin ( ) persist ( new Address ( street : "Groovy" ) ) transaction. commit ( ) }   @ Entity ... com.objectdb.o._RollbackException: Failed to commit transaction: Failed to get reference value of field field ...

 
manual

[ODB1] Chapter 4 - JDO Metadata

Shows how to define JDO metadata for persistence capable classes.... stored in the database. The main difference is that, on transaction rollback, it returns automatically to its value at the beginning of the transaction. default-fetch-group (true | false) The ...

 
forum_thread

Clarification on free license restrictions

Hello,   My apologies if the answer is already on the website, but I’m struggling to find a definitive answer.  The 10 entity class restriction is very clear, but can each of these classes use unrestricted numbers of embeddable classes?  Do embeddable classes count as part of the ten?  I assume not, but I need to check before I code further (and learn more about the product).   ... get the following error: Error: Failed to commit transaction: Attempt to store an instance of a non persistable type ...

 
forum_thread

objectdb-2.6.9_02 (with "objectdb.temp.no-enhancement-crc-check") vs. generic classes with interfaces: detailed investigation

objectdb-2.6.9_02 (with "objectdb.temp.no-enhancement-crc-check" system property) The following is a detailed report on investigation of multiple issues that have been mentioned in the following forum postings and issue reports (but please do not visit them from here now, the diagnostics there are now obsolete): - Issue #282 - ObjectDB-2.6.9: Failed to commit transaction: Failed to set numeric value of field property Element.id using reflection ... -  Issue #282 - ObjectDB-2.6.9: Failed to commit transaction: Failed to set numeric value of field property Element.id using ... javax.persistence.RollbackException Failed to commit transaction: Failed to locate set method for field property ... javax.persistence.RollbackException Failed to commit transaction: Failed to locate set method for field property ...

 
forum_thread

Different behavior with persist() and queried instances?

Hi, We have a simple class that by itself contains (among others) a property pointing to a collection: class Bla {  @OneToMany(cascade = CascadeType.ALL) private List<AttributeEntity> metaAttributes = new ArrayList<AttributeEntity>(); } ... and afterwards modify the metaAttributes property within a transaction, however this is not reflected in the db. Reason is simply that the ... - Create instance of your class, call persist, commit the transaction   -> OK, object is saved in db and the list of ...

 
issue

ArrayIndexOutOfBoundsException: -1

I've attached a test which fails with the error "ArrayIndexOutOfBoundsException: -1". It runs 10 threads which create and persist objects. The objects are based on application objects so its not a single class test I'm afraid but it is standalone. I'm running as follows: java -classpath objectdb.jar;test.jar PersistTest I've attached the test jar, a jar containing the source and the odjectdb.conf. ... javax.persistence.PersistenceException Attempt to commit a transaction after failure in writing to database file ... by: com.objectdb.o.UserException: Attempt to commit a transaction after failure in writing to database file ... newer users. The result is catastrophic, since a new transaction may commit mixed old and new pages. Therefore it could corrupt the ...

 
forum_thread

Run out of memory

Hi, I've been looking into ObjectDB for our use, where everything has been great apart from I'm stuck on the following problem.   I am trying to load a large file (> 1GB), process certain information and store it back in the database to access / modify later. I require to be able to rollback changes as well, where there can be massive amount of changes.   ... changes in memory until commit. As a result, the transaction size is limited by the available JVM heap size. Actually to be able to store 1GB of data in a single transaction you currently need about 2.2GB of available JVM heap. ...