Hi, There seems to be some race-condition in aries there. Something similar has been reported previously [1] [2]. I think we were able to fix it by synchronizing entity-manager-access with synchronized-blocks
synchronized(entityManager){ entityManager.merge(...); } kind regards, christoph [1] http://karaf.922171.n3.nabble.com/Exception-No-transaction-currently-active-td4025308.html [2] http://mail-archives.apache.org/mod_mbox/aries-dev/201207.mbox/%3CCAEQV%2BEEhx4zNS%3D9MbxBhBUfedeC8F%3DBvGXn7v49EzwYxBJdf3g%40mail.gmail.com%3E On 25/08/12 10:12, johnsas wrote: > Hi, > > I am using Aries 0.3 for transaction management in Karaf 2.2.8. > It works in gereral but sometimes I get the following exception when > accessing a database: > > javax.persistence.TransactionRequiredException: No transaction currently > active > at > org.apache.aries.jpa.container.context.transaction.impl.JTAPersistenceContextRegistry.getCurrentPersistenceContext(JTAPersistenceContextRegistry.java:103) > at > org.apache.aries.jpa.container.context.transaction.impl.JTAEntityManager.getPersistenceContext(JTAEntityManager.java:83) > at > org.apache.aries.jpa.container.context.transaction.impl.JTAEntityManager.merge(JTAEntityManager.java:270) > at > org.xxx.persistence.impl.DatabaseProviderDao.merge(DatabaseProviderDao.java:304) > > This error occurs out of the blue. > Do you have an idea why this happens, and what can be done to avoid it? > > > > > -- > View this message in context: > http://karaf.922171.n3.nabble.com/Aries-error-No-transaction-currently-active-tp4025825.html > Sent from the Karaf - User mailing list archive at Nabble.com. >
smime.p7s
Description: S/MIME Cryptographic Signature