[JBoss Seam] - No active JTA transaction on joinTransaction call
by kummer
Caused by: javax.ejb.EJBTransactionRolledbackException: javax.persistence.TransactionRequiredException: No active JTA transaction on joinTransaction call
I get the above exception seemingly randomly. At least a cannot associate it with anything. I have two versions of my project (a day or so of development apart), one consistenly throws this exception but the other doesn't.
It occurs when accessing a simple getter (no db access) on a stateful session bean. It is not the first access though, but always at the same point in the page flow.
Here is the whole exception chain:
javax.el.ELException: /auswertung.xhtml: Exception getting value of property firstAdressat of base of type : org.javassist.tmp.java.lang.Object_$$_javassist_5
| at com.sun.facelets.compiler.TextInstruction.write(TextInstruction.java:48)
| at com.sun.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:39)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:573)
| at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
| at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:229)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
| at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
| at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
| at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at lu.deka.login.LoginFilter.doFilter(LoginFilter.java:59)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Unknown Source)
| Caused by: javax.faces.el.EvaluationException: Bean: org.javassist.tmp.java.lang.Object_$$_javassist_5, property: firstAdressat
| at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:442)
| at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:82)
| at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:141)
| at com.sun.el.parser.AstValue.getValue(AstValue.java:125)
| at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:195)
| at com.sun.facelets.el.ELText$ELTextVariable.writeText(ELText.java:184)
| at com.sun.facelets.el.ELText$ELTextComposite.writeText(ELText.java:108)
| at com.sun.facelets.compiler.TextInstruction.write(TextInstruction.java:45)
| ... 47 more
| Caused by: java.lang.reflect.InvocationTargetException
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:438)
| ... 54 more
| Caused by: javax.ejb.EJBTransactionRolledbackException: javax.persistence.TransactionRequiredException: No active JTA transaction on joinTransaction call
| at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:93)
| at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:102)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:203)
| at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
| at $Proxy109.getFirstAdressat(Unknown Source)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:20)
| at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
| at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:72)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
| at org.jboss.seam.interceptors.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:40)
| at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
| at org.jboss.seam.intercept.ClientSideI
| 09:57:35,740 ERROR [STDERR] nterceptor.invoke(ClientSideInterceptor.java:50)
| at org.javassist.tmp.java.lang.Object_$$_javassist_5.getFirstAdressat(Object_$$_javassist_5.java)
| ... 59 more
| Caused by: javax.persistence.TransactionRequiredException: No active JTA transaction on joinTransaction call
| at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:469)
| at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:442)
| at org.jboss.ejb3.entity.ManagedEntityManagerFactory.registerExtendedWithTransaction(ManagedEntityManagerFactory.java:143)
| at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:67)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:46)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
| ... 88 more
|
|
|
Any help will be greatly apreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043843#4043843
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043843
19 years
[JBoss Seam] - Re: problem with messages in scheduler.
by Stateless Bean
Hi Pete!
Until my problem still exist, i made some check;
1. Downloaded newer seam version 1.2.1GA
2. Create in eclipse new project "seampay" like in examples.
3. Copied from your examples/seampay/src classes and modified:
Processor and conroler like here:
Controler
| @In
| protected Map<String, String> messages; //MY MESSAGES Instance
|
| public String saveAndSchedule()
| {
| String locale = messages.get("login.password");
| System.out.println("CONTROLER: " + locale); //here shoudl be "blabla,bleble, bububububu" and stil is login.password"
| String result = persist();
|
| Payment payment = getInstance();
| log.info("scheduling instance #0", payment);
|
| Timer timer = processor.schedulePayment(payment.getPaymentDate(),
| payment.getPaymentFrequency().getInterval(),
| payment);
|
| payment.setTimerHandle( timer.getHandle() );
|
| return result;
| }
|
Processor
| @In
| protected Map<String, String> messages;
|
| @Asynchronous
| @Transactional
| public Timer schedulePayment(@Expiration Date when,
| @IntervalDuration long interval,
| Payment payment)
| {
| payment = entityManager.merge(payment);
| String locale = messages.get("login.password");
| System.out.println("LOCALE: " + locale); //and here again
| log.info("[#0] Processing payment #1", System.currentTimeMillis(), payment.getId());
| log.info("Timer handle is #0", payment.getTimerHandle());
|
| if (payment.getActive()) {
| BigDecimal balance = payment.getAccount().adjustBalance(payment.getAmount().negate());
| log.info(":: balance is now #0", balance);
| payment.setLastPaid(new Date());
|
| if (payment.getPaymentFrequency().equals(Payment.Frequency.ONCE)) {
| payment.setActive(false);
| }
| }
|
| return null;
| }
|
and modified faces-config.xml by adding
| <application>
| <message-bundle>messages</message-bundle>
| <locale-config>
| <default-locale>en</default-locale>
| <supported-locale>en</supported-locale>
| </locale-config>
| </application>
|
and also copied my messages file to
| jboss-seam-pay.jar/messages-en.properties
|
| login.password = blabla,bleble, bububububu
|
all copied back into ear file and started on jboss 4.0.5 AS,
Problem is same as like in my app, i get "login.password" not "blabla...etc"
why?
Can anyone check this and tell me what i'm going wrong?
Maybe this is bug?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043840#4043840
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043840
19 years
[JBossCache] - TreeCache CacheLoader Issue
by robnor
Hi,
I have not used JBossCache before the project I am in, so I am green.
Background:
We have a application that we have split up into three parts; core, import and distribution. Each part is an ear, with ejb3's and a Jbosscache.
There is no problem at all in getting all caches to start and to function storing in memory data.
However. We need the cache to be persistent, thus I we have cacheloader, JDBC Cacheloader (to be more preicse).
I am using the TreeCache to store an object (ImportTracker), which holds data about the different imports. If the server somehow goes down, or if we drop an updated ear in the deploy directory, we want the application to be able to resume import, distribution etc where it was. Thus I need the in-memory cache to always write everything to the persistent store directly.
My issue is that regardless if I use filecacheloader or jdbccacheloader no data at all gets stored. If I activate debug level on jboss.cache, I can see that the transaction interceptor gets called but never the storage interceptor.
It is a bit unclear as to how the treecache is suppoed to work. If I create a node say: import/host1/
The map object has two entries, tracker and distribution
Tracker is an object with other object inside each describing a import, and distribution is also a object hoding info about different distributions.
Question: After creation of node and put of object (something like) cache.put("/import/host1", "tracker", myobject);
Later in the app when I retrieve the object, and make changes to it. Does the changes automatically update cache? or do I need to make a put everytime (to trigger update).
Anyways, my issue is that I cannot get the cacheloader to store the data. The only time I can get it to work as I want is when I retrieve the cache, and from the cahce retrieve the cacheloader and then make a put directly on that. This cannot be the way to go?
Please advice :-)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043832#4043832
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043832
19 years