-
15. Re: Seam transaction interceptor could not find transaction in jboss 7
lightguard Nov 1, 2011 1:39 AM (in response to yangju.richard.yang.pearson.com)I'm pretty sure we'll have a fix for this in Beta5.
It doesn't show the problem in Arquillian because the threads in Arquillian are treated as EE threads, I found out from Stuart the other day.
-
16. Re: Seam transaction interceptor could not find transaction in jboss 7
tdtappe Jan 30, 2012 5:13 AM (in response to yangju.richard.yang.pearson.com)Is this supposed to be fixed already? I most probably seem to have the same issue here with JBoss 7.0.2 and Seam 3.1.0.Final: in a non-EE thread I do get a TransactionRequiredException.
--Heiko
-
17. Re: Seam transaction interceptor could not find transaction in jboss 7
lightguard Jan 30, 2012 1:52 PM (in response to yangju.richard.yang.pearson.com)I haven't see this for a while. Please post more info about your project.
-
18. Re: Seam transaction interceptor could not find transaction in jboss 7
tdtappe Jan 31, 2012 4:16 AM (in response to yangju.richard.yang.pearson.com)The project is based solely on CDI (no ejb stuff) using seam 3.1.0.Final, packaged in a war and deployed on JBoss 7.0.2.
It uses JPA 2.0 (Hibernate 3.6.0.Final) and JSF 2.1.
I am in the process of migrating it from seam 3.0 to seam 3.1 and didn't have any problems with 3.0 concerning this issue.
BTW, I want to migrate to 3.1 because I might solve a problem with this version!? See my comment here.The first thing I needed to do was adding
org.jboss.seam.transaction.TransactionInterceptor
in the beans.xml.
IIRC it was because I couldn't read from the database. Is this supposed to be necessary with seam 3.1?But after setting the interceptor I still couldn't write to the database. So I added @Transactional to classes/methods that write to the database.
After that most of the app seemed to work correctly. But here and there I ran into lazy evaluation exceptions. After adding a few more
@Transactional to some reading classes/methods this went away also.One thing left is that every now and then I do get a
transaction not available
exception. I don't know why. Sometimes it works, sometime it doesn't.
It might be a timeout issue? Maybe related to this? -
19. Re: Seam transaction interceptor could not find transaction in jboss 7
tdtappe Jan 31, 2012 4:24 AM (in response to yangju.richard.yang.pearson.com)It just happened again - this is the log output concerning the mentioned timeout problem:
WARN [com.arjuna.ats.arjuna] ARJUNA12117: TransactionReaper::check timeout for TX 0:ffffc0a80115:-316e5a16:4f27ab44:375 in state RUN WARN [com.arjuna.ats.arjuna] ARJUNA12095: Abort of action id 0:ffffc0a80115:-316e5a16:4f27ab44:375 invoked while multiple threads active within it. WARN [com.arjuna.ats.arjuna] ARJUNA12108: CheckedAction::check - atomic action 0:ffffc0a80115:-316e5a16:4f27ab44:375 aborting with 1 threads active! WARN [com.arjuna.ats.jta] ARJUNA16029: SynchronizationImple.afterCompletion - failed for org.jboss.as.jpa.transaction.TransactionUtil$SessionSynchronization@f068882 with exception: java.lang.IllegalStateException at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple.getTransactionImple(TransactionSynchronizationRegistryImple.java:225) [jbossjts-4.15.3.Final.jar:] at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple.putResource(TransactionSynchronizationRegistryImple.java:103) [jbossjts-4.15.3.Final.jar:] at org.jboss.as.jpa.transaction.TransactionUtil.putEntityManagerInTransactionRegistry(TransactionUtil.java:195) at org.jboss.as.jpa.transaction.TransactionUtil.access$200(TransactionUtil.java:46) at org.jboss.as.jpa.transaction.TransactionUtil$SessionSynchronization.afterCompletion(TransactionUtil.java:220) at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:117) [jbossjts-4.15.3.Final.jar:] at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:403) [jbossjts-4.15.3.Final.jar:] at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:335) [jbossjts-4.15.3.Final.jar:] at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.cancel(TwoPhaseCoordinator.java:121) [jbossjts-4.15.3.Final.jar:] at com.arjuna.ats.arjuna.AtomicAction.cancel(AtomicAction.java:212) [jbossjts-4.15.3.Final.jar:] at com.arjuna.ats.arjuna.coordinator.TransactionReaper.doCancellations(TransactionReaper.java:367) [jbossjts-4.15.3.Final.jar:] at com.arjuna.ats.internal.arjuna.coordinator.ReaperWorkerThread.run(ReaperWorkerThread.java:79) [jbossjts-4.15.3.Final.jar:] WARN [com.arjuna.ats.arjuna] ARJUNA12127: TwoPhaseCoordinator.afterCompletion - returned failure for SynchronizationImple< 0:ffffc0a80115:-316e5a16:4f27ab44:377, org.jboss.as.jpa.transaction.TransactionUtil$SessionSynchronization@f068882 > WARN [com.arjuna.ats.arjuna] ARJUNA12121: TransactionReaper::doCancellations worker Thread[Transaction Reaper Worker 0,5,main] successfully canceled TX 0:ffffc0a80115:-316e5a16:4f27ab44:375 WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: null ERROR [org.hibernate.util.JDBCExceptionReporter] javax.resource.ResourceException: Error checking for a transaction
-
20. Re: Seam transaction interceptor could not find transaction in jboss 7
lightguard Jan 31, 2012 5:05 AM (in response to yangju.richard.yang.pearson.com)I know there were some transaction fixes since 7.0.2. Try 7.1.0.CR1b and see if the problem still persists.
-
21. Re: Seam transaction interceptor could not find transaction in jboss 7
tdtappe Jan 31, 2012 8:49 AM (in response to yangju.richard.yang.pearson.com)Not that easy :-(
There are obviously some changes in 7.1 that make it quite hard to migrate. Especially I have some problem with Hibernate 3.6 and Infinispan (see here). -
22. Re: Seam transaction interceptor could not find transaction in jboss 7
lightguard Jan 31, 2012 4:19 PM (in response to yangju.richard.yang.pearson.com)You're using Hibernate 3.6 instead of 4.x?
-
23. Re: Seam transaction interceptor could not find transaction in jboss 7
tdtappe Feb 1, 2012 5:59 AM (in response to yangju.richard.yang.pearson.com)I have to for the time being :-( It's because of the jbpm version (4.3) I use as my integrated workflow approach.
But I managed to switch to 7.1 now. I switched off 2nd level caching and now I am able to deploy and start my app.
I will now start testing...
One thing I encountered already: I do get an error messageERROR [org.jboss.as.txn] JBAS010152: APPLICATION ERROR: transaction still active in request with status 0
after selecting some record via primefaces autocomplete component. But the app still works as expected. Any idea what this error message wants to tell me?
-
24. Re: Seam transaction interceptor could not find transaction in jboss 7
mihaisheng Feb 1, 2012 6:15 AM (in response to yangju.richard.yang.pearson.com)seam-xxx.3.0.0 upgraded to seam-xxx.3.1.0.Final,and try again.
3.1.0.Final is latest version of seam-modules. -
25. Re: Seam transaction interceptor could not find transaction in jboss 7
tdtappe Feb 1, 2012 7:34 AM (in response to yangju.richard.yang.pearson.com)All problems started after upgrading to seam 3.1.0.Final! I never had these problems with 3.0.0
-
26. Re: Seam transaction interceptor could not find transaction in jboss 7
tdtappe Feb 1, 2012 7:53 AM (in response to yangju.richard.yang.pearson.com)Hmm... for further testing I need to resolve the following problem first:
My exception handler isn't visited any longer. It looks something like this:@HandlesExceptions public class ExceptionHandler { public void handleException( @Handles(during = TraversalMode.BREADTH_FIRST, precedence = Precedence.HIGH) CaughtException<Exception> evt, Logger log, ExternalContext ec, FacesContext context, SessionExceptionHolder holder, ViewExceptionHolder viewHolder, HttpServletResponse response, HttpServletRequest request) { // some stuff } // more exceptions to be handled }
The same code still worked with JBoss 7.0.2.
-
27. Re: Seam transaction interceptor could not find transaction in jboss 7
tdtappe Feb 2, 2012 2:15 AM (in response to tdtappe)But at least it seems that the additional @Transactional annotations I had to add to several classes/methods aren't necessary any longer with JBoss 7.1.
Unfortunately I cannot easily switch to JBoss 7.1 because of the Hibernate 3.6 / Infinispan / jBPM problem.
-
28. Re: Seam transaction interceptor could not find transaction in jboss 7
langerc Mar 6, 2012 8:33 AM (in response to tdtappe)I ran into the same problem.I dont use hibernate, but a service layer and access to a nosql database.
The error
ERROR [org.jboss.as.txn] JBAS010152: APPLICATION ERROR: transaction still active in request with status 0
raises at different ocasions without any sideeffects. (Except the errormessage)
The Bean that raises the errormessage at every request is pretty forward
@Named
@RequestScoped
@URLMapping(id="detail", pattern="/detail/#{detailBean.id}",viewId="/detail.xhtml")
public class DetailBean implements Serializable {
@Inject ProductService productService;
String id = null;
@Produces @Named("productdetail")
public Product findDetail() throws ProductNotFoundException {
//find and return product
}
}
There is no transaction involved at all.
even if i add @TransactionManagement(TransactionManagementType.BEAN) to the bean the messages raises at every request filling up my log.
I Use seam 3.1 prettyfaces and jboss 7.1 final.
-
29. Re: Seam transaction interceptor could not find transaction in jboss 7
lightguard Mar 6, 2012 4:14 PM (in response to langerc)You may have found a corner case. This happens because a transaction was either not rolledback or committed from a previous request (often an AJAX request). You could create a filter to rollback or commit a transaction.