Subject | Re: local transaction active can't begin another. |
---|---|
Author | skullmaggots |
Post date | 2004-03-10T08:47:45Z |
The exception I posted first appears to be related to an early
NullPointerException. This early exception again is a mystery and I
found one other post of this forum from someone with exactly the same
problem. Someone suggested using the local transactions instead of xa
transactions, I would like to understand the reason for this if
anybody knows.
The exception is shown below and appears to be a problem starting a
new transaction is class GDS_Impl.
I going to switch over to using a local jca-jdbc config instead of xa
jca-jdbc config but feel I making changes blind :-(
Again to re-iterate 99.9% of the transactions work, e.g. 30,000 will
work and one or two will throw the following exception.
[06:35:45,910,MailProcessorBean] Caught
Exception:java.lang.NullPointerException: : null
STACK TRACE BEGIN[###################
java.lang.NullPointerException
at org.firebirdsql.jgds.GDS_Impl.isc_start_transaction(GDS_Impl.java:486)
at
org.firebirdsql.jca.FBManagedConnectionFactory.getCurrentIscTrHandle(FBManagedConnectionFactory.java:491)
at
org.firebirdsql.jca.FBManagedConnection.findIscTrHandle(FBManagedConnection.java:1064)
at
org.firebirdsql.jca.FBManagedConnection.internalStart(FBManagedConnection.java:676)
at
org.firebirdsql.jca.FBLocalTransaction.internalBegin(FBLocalTransaction.java:118)
at
org.firebirdsql.jca.FBLocalTransaction.begin(FBLocalTransaction.java:103)
at
org.firebirdsql.jdbc.FBConnection.ensureInTransaction(FBConnection.java:998)
at
org.firebirdsql.jdbc.FBPreparedStatement.<init>(FBPreparedStatement.java:77)
at
org.firebirdsql.jdbc.FBConnection.prepareStatement(FBConnection.java:243)
at com.beetleweed.bulkmail.ejbs.MailDAO.store(MailDAO.java:30)
at
com.beetleweed.bulkmail.ejbs.MailProcessorBean.onMessage(MailProcessorBean.java:239)
at sun.reflect.GeneratedMethodAccessor169.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:460)
at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
at
org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:62)
at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267)
at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128)
at
org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:90)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at
org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:374)
at org.jboss.ejb.Container.invoke(Container.java:700)
at
org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:824)
at
org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1114)
at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
at
org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:633)
at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:433)
at org.jboss.mq.SpySession.run(SpySession.java:298)
at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:732)
at java.lang.Thread.run(Thread.java:536)
STACK TRACE END#####################]
--- In Firebird-Java@yahoogroups.com, "skullmaggots"
<jeff.bannister@n...> wrote:
NullPointerException. This early exception again is a mystery and I
found one other post of this forum from someone with exactly the same
problem. Someone suggested using the local transactions instead of xa
transactions, I would like to understand the reason for this if
anybody knows.
The exception is shown below and appears to be a problem starting a
new transaction is class GDS_Impl.
I going to switch over to using a local jca-jdbc config instead of xa
jca-jdbc config but feel I making changes blind :-(
Again to re-iterate 99.9% of the transactions work, e.g. 30,000 will
work and one or two will throw the following exception.
[06:35:45,910,MailProcessorBean] Caught
Exception:java.lang.NullPointerException: : null
STACK TRACE BEGIN[###################
java.lang.NullPointerException
at org.firebirdsql.jgds.GDS_Impl.isc_start_transaction(GDS_Impl.java:486)
at
org.firebirdsql.jca.FBManagedConnectionFactory.getCurrentIscTrHandle(FBManagedConnectionFactory.java:491)
at
org.firebirdsql.jca.FBManagedConnection.findIscTrHandle(FBManagedConnection.java:1064)
at
org.firebirdsql.jca.FBManagedConnection.internalStart(FBManagedConnection.java:676)
at
org.firebirdsql.jca.FBLocalTransaction.internalBegin(FBLocalTransaction.java:118)
at
org.firebirdsql.jca.FBLocalTransaction.begin(FBLocalTransaction.java:103)
at
org.firebirdsql.jdbc.FBConnection.ensureInTransaction(FBConnection.java:998)
at
org.firebirdsql.jdbc.FBPreparedStatement.<init>(FBPreparedStatement.java:77)
at
org.firebirdsql.jdbc.FBConnection.prepareStatement(FBConnection.java:243)
at com.beetleweed.bulkmail.ejbs.MailDAO.store(MailDAO.java:30)
at
com.beetleweed.bulkmail.ejbs.MailProcessorBean.onMessage(MailProcessorBean.java:239)
at sun.reflect.GeneratedMethodAccessor169.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:460)
at
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
at
org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:62)
at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267)
at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128)
at
org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:90)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at
org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:374)
at org.jboss.ejb.Container.invoke(Container.java:700)
at
org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:824)
at
org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1114)
at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)
at
org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:633)
at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:433)
at org.jboss.mq.SpySession.run(SpySession.java:298)
at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:732)
at java.lang.Thread.run(Thread.java:536)
STACK TRACE END#####################]
--- In Firebird-Java@yahoogroups.com, "skullmaggots"
<jeff.bannister@n...> wrote:
> Hi,
>
> I have an application the makes heavy use of JMS using JBoss3.2.3 and
> Firebird1.0.1 with the JCA-JDBC adapter. One particular queue will
> process for example 30,000+ plus messages in around 1hr+. The MDB
> which processes this queue makes use of one entity EJB, and some other
> tables via JDBC.
>
> All JDBC access is done via a DataSource connection factory retrieved
> from JNDI.
>
> The application works for 99.9% of the messages but when processing
> one of two the messages I received a strange managed connection
> factory exception(at bottom of post).
>
> I'm at a loss as to the root cause of the exception.
>
> Has anyone seen this before? or know the underlying reason for such an
> error?
>
> thanks,
>
> Jeff.
>
> +------------------Exception------------------------------+
>
> 06:35:56,210,MailProcessorBean] DAO error : SQL error :
> ResourceException: org.firebirdsql.jca.FBResourceException: local
> transaction active: can't begin another
> Reason: local transaction active: can't begin another
> STACK TRACE BEGIN[#####################
> com.beetleweed.bulkmail.ejbs.DAOException: SQL error :
> ResourceException: org.firebirdsql.jca.FBResourceException: local
> transaction active: can't begin another
> Reason: local transaction active: can't begin another
> at
> com.beetleweed.bulkmail.ejbs.DataAccessObject.logA
> ndThrow(DataAccessObject.java:102)
> at
> com.beetleweed.bulkmail.ejbs.DataAccessObject.sqlE
> rror(DataAccessObject.java:91)
> at com.beetleweed.bulkmail.ejbs.MailDAO.store(MailDAO.java:40)
> at
> com.beetleweed.bulkmail.ejbs.MailProcessorBean.onM
> essage(MailProcessorBean.java:306)
> at sun.reflect.GeneratedMethodAccessor169.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(De
> legatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at
> org.jboss.ejb.MessageDrivenContainer$ContainerInte
> rceptor.invoke(MessageDrivenContainer.java:460)
> at
> org.jboss.resource.connectionmanager.CachedConnect
> ionInterceptor.invoke(CachedConnectionInterceptor.java:185)
> at
> org.jboss.ejb.plugins.MessageDrivenInstanceInterce
> ptor.invoke(MessageDrivenInstanceInterceptor.java:62)
> at
> org.jboss.ejb.plugins.AbstractTxInterceptor.invoke
> Next(AbstractTxInterceptor.java:84)
> at
> org.jboss.ejb.plugins.TxInterceptorCMT.runWithTran
> sactions(TxInterceptorCMT.java:267)
> at
> org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxIn
> terceptorCMT.java:128)
> at
> org.jboss.ejb.plugins.RunAsSecurityInterceptor.inv
> oke(RunAsSecurityInterceptor.java:90)
> at org.jboss.ejb.plugins.LogInterceptor.invoke(Log
> Interceptor.java:191)
> at
> org.jboss.ejb.plugins.ProxyFactoryFinderIntercepto
> r.invoke(ProxyFactoryFinderInterceptor.java:122)
> at
> org.jboss.ejb.MessageDrivenContainer.internalInvok
> e(MessageDrivenContainer.java:374)
> at org.jboss.ejb.Container.invoke(Container.java:700)
> at
> org.jboss.ejb.plugins.jms.JMSContainerInvoker.invo
> ke(JMSContainerInvoker.java:824)
> at
> org.jboss.ejb.plugins.jms.JMSContainerInvoker$Mess
> ageListenerImpl.onMessage(JMSContainerInvoker.java:1114)
> at org.jboss.jms.asf.StdServerSession.onMessage(St
> dServerSession.java:256)
> at
> org.jboss.mq.SpyMessageConsumer.sessionConsumerPro
> cessMessage(SpyMessageConsumer.java:633)
> at org.jboss.mq.SpyMessageConsumer.addMessage(SpyM
> essageConsumer.java:433)
> at org.jboss.mq.SpySession.run(SpySession.java:298)
> at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)
> at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Wo
> rker.run(PooledExecutor.java:732)
> at java.lang.Thread.run(Thread.java:536)
> Caused by: java.sql.SQLException: ResourceException:
> org.firebirdsql.jca.FBResourceException: local transaction active:
> can't begin another
> Reason: local transaction active: can't begin another
> at
> org.firebirdsql.jdbc.FBConnection.ensureInTransact
> ion(FBConnection.java:1003)
> at
> org.firebirdsql.jdbc.FBPreparedStatement.<init>(FB
> PreparedStatement.java:77)
> at
> org.firebirdsql.jdbc.FBConnection.prepareStatement
> (FBConnection.java:243)
> at com.beetleweed.bulkmail.ejbs.MailDAO.store(MailDAO.java:30)
> ... 24 more
>
> STACK TRACE END#####################]