tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject Re: IllegalStateException: Cannot log transactions
Date Fri, 23 May 2008 05:31:40 GMT

On May 21, 2008, at 6:04 AM, Martin Vysny wrote:

> On Wed, 2008-05-21 at 14:18 +0530, Manu George wrote:
>> This looks like the XAResource that is being passed to the geronimo
>> transaction manager is not a named XA Resource. So transactions will
>> not be logged in this case. I think you can open a JIRA as it looks
>> like a bug.
>>

The crazy thing with this is that the HOWL transaction logging should  
be off by default.  Looking at our defaults for the standalone server,  
it seems like we may have mismatching configuration defaults.   Tx  
logging seems to be enabled in the TransactionManager by default  
(MaxLogFiles=1) but shut off on the DataSource side  
(TxRecovery=false), both should agree.

Adding this to your openejb.xml file should shut off tx logging and  
make the error go away:

  <TransactionManager id="TransactionManager">
      MaxLogFiles = 0
  </TransactionManager>

Alternatively, setting the "TxRecovery" property to "true" on your  
DataSources in the openejb.xml should turn on tx logging (for your  
datasources at least) and should also make the error go away.

Let us know which way you go.  This will definitely be a good one for  
the archives some docs should follow shortly.

-David

>
>> On Mon, May 19, 2008 at 4:59 PM, Martin Vysny <mvy@whitestein.com>  
>> wrote:
>>> Hi,
>>> the following error message occurs when OpenEJB tries to commit a
>>> transaction (attached at the end of the mail). There are two
>>> transactions active as one method with Required invokes another with
>>> RequiresNew.
>>> The thing is, everything works fine - OpenEJB does not crash,
>>> transactions are committed as required, only the exception is  
>>> shown in
>>> the log. I'd hate to suppress errors in log :) so, do I need to  
>>> setup
>>> openejb.xml somehow, to get rid of this Exception? Can you help me?
>>> Thanks,
>>> sincerely
>>> Martin
>>>
>>>
>>> 13:14:32,472 ERROR [btpool0-1 Transaction] Please correct the
>>> integration and supply a NamedXAResource
>>> java.lang.IllegalStateException: Cannot log transactions as
>>> org.apache.commons.dbcp.managed.LocalXAConnectionFactory
>>> $LocalXAResource@c7814f is not a NamedXAResource.
>>>       at org.apache.geronimo.transaction.manager.TransactionImpl
>>> $TransactionBranch.getResourceName(TransactionImpl.java:697)
>>>       at
>>> org.apache.geronimo.transaction.log.HOWLLog.prepare(HOWLLog.java: 
>>> 254)
>>>       at
>>> org 
>>> .apache 
>>> .geronimo 
>>> .transaction 
>>> .manager.TransactionImpl.internalPrepare(TransactionImpl.java:444)
>>>       at
>>> org 
>>> .apache 
>>> .geronimo 
>>> .transaction.manager.TransactionImpl.commit(TransactionImpl.java: 
>>> 316)
>>>       at
>>> org 
>>> .apache 
>>> .geronimo 
>>> .transaction 
>>> .manager.TransactionManagerImpl.commit(TransactionManagerImpl.java: 
>>> 245)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core 
>>> .transaction 
>>> .TransactionPolicy.commitTransaction(TransactionPolicy.java:138)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.transaction.TxRequiresNew.afterInvoke(TxRequiresNew.java:73)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.stateless.StatelessContainer._invoke(StatelessContainer.java: 
>>> 233)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.stateless.StatelessContainer._invoke(StatelessContainer.java: 
>>> 188)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.stateless.StatelessContainer.invoke(StatelessContainer.java: 
>>> 165)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core 
>>> .ivm 
>>> .EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java: 
>>> 217)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java: 
>>> 77)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .util 
>>> .proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
>>>       at $Proxy27.invokeAgent(Unknown Source)
>>>       at
>>> com 
>>> .whitestein 
>>> .fe 
>>> .impl 
>>> .ejb 
>>> .FEInternalServicesBean 
>>> .invokeAgentWithErrorHandling(FEInternalServicesBean.java:285)
>>>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>       at
>>> sun 
>>> .reflect 
>>> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>       at
>>> sun 
>>> .reflect 
>>> .DelegatingMethodAccessorImpl 
>>> .invoke(DelegatingMethodAccessorImpl.java:25)
>>>       at java.lang.reflect.Method.invoke(Method.java:597)
>>>       at  
>>> org.apache.openejb.core.interceptor.ReflectionInvocationContext
>>> $Invocation.invoke(ReflectionInvocationContext.java:158)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core 
>>> .interceptor 
>>> .ReflectionInvocationContext 
>>> .proceed(ReflectionInvocationContext.java:141)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.interceptor.InterceptorStack.invoke(InterceptorStack.java:67)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.stateless.StatelessContainer._invoke(StatelessContainer.java: 
>>> 210)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.stateless.StatelessContainer._invoke(StatelessContainer.java: 
>>> 188)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.stateless.StatelessContainer.invoke(StatelessContainer.java: 
>>> 165)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core 
>>> .ivm 
>>> .EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java: 
>>> 217)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java: 
>>> 77)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .util 
>>> .proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
>>>       at $Proxy27.invokeAgentWithErrorHandling(Unknown Source)
>>>       at
>>> com 
>>> .whitestein 
>>> .fe 
>>> .impl 
>>> .ejb 
>>> .FEInternalServicesBean 
>>> .processCommUnitInServantContext(FEInternalServicesBean.java:260)
>>>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>       at
>>> sun 
>>> .reflect 
>>> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>       at
>>> sun 
>>> .reflect 
>>> .DelegatingMethodAccessorImpl 
>>> .invoke(DelegatingMethodAccessorImpl.java:25)
>>>       at java.lang.reflect.Method.invoke(Method.java:597)
>>>       at  
>>> org.apache.openejb.core.interceptor.ReflectionInvocationContext
>>> $Invocation.invoke(ReflectionInvocationContext.java:158)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core 
>>> .interceptor 
>>> .ReflectionInvocationContext 
>>> .proceed(ReflectionInvocationContext.java:141)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.interceptor.InterceptorStack.invoke(InterceptorStack.java:67)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.stateless.StatelessContainer._invoke(StatelessContainer.java: 
>>> 210)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.stateless.StatelessContainer._invoke(StatelessContainer.java: 
>>> 188)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.stateless.StatelessContainer.invoke(StatelessContainer.java: 
>>> 165)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core 
>>> .ivm 
>>> .EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java: 
>>> 217)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java: 
>>> 77)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .util 
>>> .proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
>>>       at $Proxy27.processCommUnitInServantContext(Unknown Source)
>>>       at
>>> com 
>>> .whitestein 
>>> .fe 
>>> .impl 
>>> .services 
>>> .ClientServantContextImpl 
>>> .sendSynchronousMessage(ClientServantContextImpl.java:50)
>>>       at
>>> com 
>>> .whitestein 
>>> .lsts 
>>> .cal 
>>> .servant 
>>> .AbstractClientServant 
>>> .sendSynchronousMessage(AbstractClientServant.java:30)
>>>       at
>>> com 
>>> .whitestein 
>>> .abpm 
>>> .app 
>>> .core 
>>> .servants 
>>> .ApplicationServantImpl 
>>> .startInterpretProcess(ApplicationServantImpl.java:75)
>>>       at
>>> com 
>>> .whitestein 
>>> .abpm 
>>> .app 
>>> .core 
>>> .servants 
>>> .ApplicationServantImpl.createProcess(ApplicationServantImpl.java: 
>>> 58)
>>>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>       at
>>> sun 
>>> .reflect 
>>> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>       at
>>> sun 
>>> .reflect 
>>> .DelegatingMethodAccessorImpl 
>>> .invoke(DelegatingMethodAccessorImpl.java:25)
>>>       at java.lang.reflect.Method.invoke(Method.java:597)
>>>       at
>>> com 
>>> .whitestein 
>>> .fe 
>>> .impl 
>>> .ejb 
>>> .FEInternalServicesBean.invokeServant(FEInternalServicesBean.java: 
>>> 435)
>>>       at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown  
>>> Source)
>>>       at
>>> sun 
>>> .reflect 
>>> .DelegatingMethodAccessorImpl 
>>> .invoke(DelegatingMethodAccessorImpl.java:25)
>>>       at java.lang.reflect.Method.invoke(Method.java:597)
>>>       at  
>>> org.apache.openejb.core.interceptor.ReflectionInvocationContext
>>> $Invocation.invoke(ReflectionInvocationContext.java:158)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core 
>>> .interceptor 
>>> .ReflectionInvocationContext 
>>> .proceed(ReflectionInvocationContext.java:141)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.interceptor.InterceptorStack.invoke(InterceptorStack.java:67)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.stateless.StatelessContainer._invoke(StatelessContainer.java: 
>>> 210)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.stateless.StatelessContainer._invoke(StatelessContainer.java: 
>>> 188)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.stateless.StatelessContainer.invoke(StatelessContainer.java: 
>>> 165)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core 
>>> .ivm 
>>> .EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java: 
>>> 217)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java: 
>>> 77)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .util 
>>> .proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
>>>       at $Proxy27.invokeServant(Unknown Source)
>>>       at
>>> com 
>>> .whitestein 
>>> .fe.impl.ejb.FEClientBean.invokeServant(FEClientBean.java:258)
>>>       at sun.reflect.GeneratedMethodAccessor63.invoke(Unknown  
>>> Source)
>>>       at
>>> sun 
>>> .reflect 
>>> .DelegatingMethodAccessorImpl 
>>> .invoke(DelegatingMethodAccessorImpl.java:25)
>>>       at java.lang.reflect.Method.invoke(Method.java:597)
>>>       at  
>>> org.apache.openejb.core.interceptor.ReflectionInvocationContext
>>> $Invocation.invoke(ReflectionInvocationContext.java:158)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core 
>>> .interceptor 
>>> .ReflectionInvocationContext 
>>> .proceed(ReflectionInvocationContext.java:141)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.interceptor.InterceptorStack.invoke(InterceptorStack.java:67)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.stateless.StatelessContainer._invoke(StatelessContainer.java: 
>>> 210)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.stateless.StatelessContainer._invoke(StatelessContainer.java: 
>>> 188)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.stateless.StatelessContainer.invoke(StatelessContainer.java: 
>>> 165)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core 
>>> .ivm 
>>> .EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java: 
>>> 217)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java: 
>>> 77)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
>>>       at
>>> org 
>>> .apache 
>>> .openejb 
>>> .util 
>>> .proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
>>>       at $Proxy63.invokeServant(Unknown Source)
>>>       at
>>> com 
>>> .whitestein.fe.impl.FEClientImpl.invokeServant(FEClientImpl.java:66)
>>>       at com.whitestein.fe.client.AbstractClientCommunication
>>> $ServantInvocator.invoke(AbstractClientCommunication.java:263)
>>>       at $Proxy69.createProcess(Unknown Source)
>>>       at
>>> com 
>>> .whitestein 
>>> .abpm.webapp.beans.CreateProcessBean.create(CreateProcessBean.java: 
>>> 103)
>>>       at
>>> com 
>>> .whitestein 
>>> .abpm.webapp.beans.CreateProcessBean.create(CreateProcessBean.java: 
>>> 47)
>>>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>       at
>>> sun 
>>> .reflect 
>>> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>       at
>>> sun 
>>> .reflect 
>>> .DelegatingMethodAccessorImpl 
>>> .invoke(DelegatingMethodAccessorImpl.java:25)
>>>       at java.lang.reflect.Method.invoke(Method.java:597)
>>>       at
>>> com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java: 
>>> 146)
>>>       at
>>> com 
>>> .sun 
>>> .faces 
>>> .application 
>>> .ActionListenerImpl.processAction(ActionListenerImpl.java:92)
>>>       at javax.faces.component.UICommand.broadcast(UICommand.java: 
>>> 332)
>>>       at
>>> javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java: 
>>> 287)
>>>       at
>>> javax 
>>> .faces.component.UIViewRoot.processApplication(UIViewRoot.java:401)
>>>       at
>>> com 
>>> .sun 
>>> .faces 
>>> .lifecycle 
>>> .InvokeApplicationPhase.execute(InvokeApplicationPhase.java:95)
>>>       at  
>>> com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
>>>       at
>>> com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java: 
>>> 110)
>>>       at javax.faces.webapp.FacesServlet.service(FacesServlet.java: 
>>> 213)
>>>       at
>>> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 
>>> 487)
>>>       at
>>> org 
>>> .mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 
>>> 362)
>>>       at
>>> org 
>>> .mortbay 
>>> .jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>>>       at
>>> org 
>>> .mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 
>>> 181)
>>>       at
>>> org 
>>> .mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 
>>> 712)
>>>       at
>>> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 
>>> 405)
>>>       at
>>> org 
>>> .mortbay 
>>> .jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>>>       at
>>> org 
>>> .mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 
>>> 139)
>>>       at org.mortbay.jetty.Server.handle(Server.java:313)
>>>       at
>>> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 
>>> 506)
>>>       at org.mortbay.jetty.HttpConnection
>>> $RequestHandler.content(HttpConnection.java:844)
>>>       at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
>>>       at  
>>> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>>>       at  
>>> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
>>>       at org.mortbay.jetty.bio.SocketConnector
>>> $Connection.run(SocketConnector.java:227)
>>>       at org.mortbay.thread.BoundedThreadPool
>>> $PoolThread.run(BoundedThreadPool.java:442)
>>>
>>>
>>>
>>
> -- 
> Mgr. Martin Vysny | mvy@whitestein.com
> Software Engineer
> Whitestein Technologies s.r.o | www.whitestein.com
> Panenska 28 | 811 03 Bratislava | Slovak Republic
> Main +421 2 5443-5502 | Direct +421 2 5930-0717
>


Mime
View raw message