Transaction not found for multiple vms

18 views
Skip to first unread message

Michał Jurczuk

unread,
Oct 11, 2015, 8:42:07 AM10/11/15
to Activate Persistence Framework
I'm testing our application in multiple machine environment. We are using play framework 2.3 and activate framework 1.7. Database is PostgreSQL 9.3.
I've added two system properties:
- activate.offlineLocking.enable=true
- activate.offlineLocking.validateReads=true
and additional "version" column for all entities. 

After running two machines it works properly displaying list of events on both. When I modify one event on first machine machine, it still works properly on first machine (version property has been increased). 
But when I switch to second machine after this change first events display returns transaction not found exception in my Persistance context. After second refresh everything is updated and works good.
Is this intentional behaviour and how can I handle this exception, or what should I modify to make multiple vms works properly? 

Flávio Brasil

unread,
Oct 11, 2015, 8:50:33 AM10/11/15
to Michał Jurczuk, Activate Persistence Framework
Hi Michal,

The transaction not found error happens because the code using the entity is not inside a `transactional{}` block. You can check the stack trace to identify the line and add the transaction.

Regards,

Flavio

--
You received this message because you are subscribed to the Google Groups "Activate Persistence Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to activate-persist...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michał Jurczuk

unread,
Oct 11, 2015, 12:11:55 PM10/11/15
to Activate Persistence Framework, michal....@goodsoft.pl
I'm getting this exception on second machine only after changing some event (on event list), and there is transactional block code. It have to be related to offlineLocking.
Thanks
To unsubscribe from this group and stop receiving emails from it, send an email to activate-persistence+unsub...@googlegroups.com.

Michał Jurczuk

unread,
Oct 15, 2015, 3:26:10 PM10/15/15
to Activate Persistence Framework, michal....@goodsoft.pl
Here stack trace:
play.api.Application$$anon$1: Execution exception[[RequiredTransactionException: null]]
at play.api.Application$class.handleError(Application.scala:296) ~[com.typesafe.play.play_2.11-2.3.9.jar:2.3.9]
at play.api.DefaultApplication.handleError(Application.scala:402) [com.typesafe.play.play_2.11-2.3.9.jar:2.3.9]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$14$$anonfun$apply$1.applyOrElse(PlayDefaultUpstreamHandler.scala:205) [com.typesafe.play.play_2.11-2.3.9.jar:2.3.9]
at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$14$$anonfun$apply$1.applyOrElse(PlayDefaultUpstreamHandler.scala:202) [com.typesafe.play.play_2.11-2.3.9.jar:2.3.9]
at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:36) [org.scala-lang.scala-library-2.11.7.jar:na]
Caused by: net.fwbrasil.radon.RequiredTransactionException: null
at net.fwbrasil.radon.transaction.TransactionManager.getRequiredActiveTransaction(TransactionManager.scala:43) ~[net.fwbrasil.radon-stm_2.11-1.7.jar:1.7]
at net.fwbrasil.activate.statement.query.QueryContext$class.startTransaction(QueryContext.scala:442) ~[net.fwbrasil.activate-core_2.11-1.7.jar:1.7]
at net.fwbrasil.activate.statement.query.QueryContext$class.byId(QueryContext.scala:279) ~[net.fwbrasil.activate-core_2.11-1.7.jar:1.7]
at models.partaPersistanceContext$.byId(partaPersistanceContext.scala:10) ~[parta-server.parta-server-1.1.jar:1.1]
at net.fwbrasil.activate.statement.query.QueryContext$class.byId(QueryContext.scala:276) ~[net.fwbrasil.activate-core_2.11-1.7.jar:1.7]
[error] application - An error occurred
Reply all
Reply to author
Forward
0 new messages