• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

javax.transaction.RollbackException in jboss 6

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am using jboss-6.0.0 final version.

i am facing the following exception when i am sending huge volume of logs.

2011-02-25 07:11:09,065 WARN [com.arjuna.ats.arjuna] (Transaction Reaper Worker 0) ARJUNA-12121 TransactionReaper::doCancellations worker Thread[Transaction Reaper Worker 0,5,jboss] successfully canceled TX 0:ffff7f000001:126a:4d675345:a2
2011-02-25 07:11:18,753 INFO [com.iqs.sos.server.business.ejb.mdb.SyslogMDB] (Thread-19 (group:HornetQ-client-global-threads-450548035)) SentinelId ::2 : Received Count :: 4494 : Processed Count :: 4494 : Processed Time :: 33105 ms
2011-02-25 07:11:18,753 WARN [com.arjuna.ats.arjuna] (Thread-19 (group:HornetQ-client-global-threads-450548035)) ARJUNA-12077 Abort called on already aborted atomic action 0:ffff7f000001:126a:4d675345:a2
2011-02-25 07:11:18,754 INFO [com.iqs.sos.server.business.ejb.mdb.SyslogMDB] (Thread-18 (group:HornetQ-client-global-threads-450548035)) onMessage Calling..
2011-02-25 07:11:18,757 WARN [org.hornetq.ra.inflow.HornetQMessageHandler] (Thread-19 (group:HornetQ-client-global-threads-450548035)) Unable to call after delivery: javax.resource.ResourceException: javax.transaction.RollbackException: ARJUNA-16063 The transaction is not active!
at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.after(MessageInflowLocalProxy.java:263) [:1.7.17]
at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:140) [:1.7.17]
at $Proxy138.afterDelivery(Unknown Source) at org.hornetq.ra.inflow.HornetQMessageHandler.onMessage(HornetQMessageHandler.java:260) [:6.0.0.Final]
at org.hornetq.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:822) [:6.0.0.Final]
at org.hornetq.core.client.impl.ClientConsumerImpl.access$100(ClientConsumerImpl.java:46) [:6.0.0.Final]
at org.hornetq.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:940) [:6.0.0.Final]
at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100) [:6.0.0.Final]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_17]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_17]
at java.lang.Thread.run(Thread.java:619) [:1.6.0_17]
Caused by: javax.transaction.RollbackException: ARJUNA-16063 The transaction is not active!
at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1148) [:6.0.0.Final]
at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:119) [:6.0.0.Final]
at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75) [:6.0.0.Final]
at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.endTransaction(MessageInflowLocalProxy.java:464) [:1.7.17]
at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.finish(MessageInflowLocalProxy.java:343) [:1.7.17]
at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.after(MessageInflowLocalProxy.java:259) [:1.7.17]
... 10 more


After getting this exception, mdb receiving duplicate messages. (eg. sending 100000 but receiving 500000 + )

Please guide me for that issue.

Thanks.
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As the logs suggest, it's either the transaction timing out (by default the timeout is 5 minutes on beans) or some previous exception causing the transaction to fail.
 
Ranch Hand
Posts: 98
Oracle Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is a typical scenario when you send a huge message over to the MDB. The default JTA value is getting timed out and the entire transaction is getting rolled back.

You can try re-configuring the global JTA timeout by modifying the server/server-profile/deploy/ transaction-jboss-beans.xml file.

The transaction manager properties look like below.


<bean name="TransactionManager" class="com.arjuna.ats.jbossatx.jta.TransactionManagerService">
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=TransactionManager", exposedInterface=com.arjuna.ats.jbossatx.jta.TransactionManagerServiceMBean.class, registerDirectly=true)</annotation>
<annotation>@org.jboss.managed.api.annotation.ManagementObject(name="TransactionManager",componentType=@org.jboss.managed.api.annotation.ManagementComponent(type = "MCBean", subtype = "JTA"),targetInterface=com.arjuna.ats.jbossatx.jta.TransactionManagerServiceMBean.class)</annotation>

<property name="transactionTimeout">300</property>
<property name="objectStoreDir">${jboss.server.data.dir}/tx-object-store</property>
<property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>

However changing this file would affect rest of the applications deployed to the server.

The JTA timeouts can be set at a more granular level by defining them at the method level.

It can be defined in the deployment descriptor jboss.xml of your beans for a Container Managed Transaction Bean.

A sample entry for a container managed transaction looks like below.
*********************************************************

<?xml version="1.0"?>
<jboss>
<enterprise-beans>
<session>
<ejb-name>TxTimeout</ejb-name>
<jndi-name>jbosstest/tm/TxTimeout</jndi-name>
<exception-on-rollback>true</exception-on-rollback>
<method-attributes>
<method>
<method-name>testOverriddenTimeoutExpires</method-name>
<transaction-timeout>5</transaction-timeout>
</method>
<method>
<method-name>testOverriddenTimeoutDoesNotExpire</method-name>
<transaction-timeout>20</transaction-timeout>
</method>
</method-attributes>
</session>
</enterprise-beans>
</jboss>
********************************************************

However if you are using the Bean Managed Transactions, you need define the boundaries of the transactions by using the UserTransaction class in your application.

********************************************************
UserTransaction ut = (UserTransaction)ctx.lookup("java:comp/UserTransaction");
ut.setTransactionTimeout(20);
ut.begin();
...
ut.commit();
********************************************************

Cheers,
Anandraj
http://weblogic-wonders.com
 
Deva Devan
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

Duplication issue has been solved.

Now the following exception coming when mdb inserting data first time in to the database.

2011-02-25 12:16:50,309 WARN [com.arjuna.ats.arjuna] (Thread-1 (group:HornetQ-client-global-threads-708968659)) ARJUNA-12140 Adding multiple last resources is disallowed. Current resource is com.arjuna.ats.internal.arjuna.abstractrecords.LastResourceRecord@589463a0

after complete the insertion the following exception rising.

2011-02-25 12:22:45,491 INFO [com.iqs.sos.server.business.ejb.mdb.SyslogMDB] (Thread-2 (group:HornetQ-client-global-threads-708968659)) onMessage Calling..
2011-02-25 12:22:49,054 WARN [com.arjuna.ats.arjuna] (Transaction Reaper) ARJUNA-12117 TransactionReaper::check timeout for TX 0:ffff7f000001:126a:4d679d83:36 in state RUN
2011-02-25 12:22:49,058 WARN [com.arjuna.ats.arjuna] (Transaction Reaper Worker 0) ARJUNA-12095 Abort of action id 0:ffff7f000001:126a:4d679d83:36 invoked while multiple threads active within it.
2011-02-25 12:22:49,058 WARN [com.arjuna.ats.arjuna] (Transaction Reaper Worker 0) ARJUNA-12108 CheckedAction::check - atomic action 0:ffff7f000001:126a:4d679d83:36 aborting with 1 threads active!
2011-02-25 12:22:49,225 WARN [org.hornetq.core.transaction.impl.ResourceManagerImpl] (Thread-1 (group:HornetQ-scheduled-threads-538717823)) transaction with xid XidImpl (50756807 bq:0.0.0.0.0.0.0.0.0.0.-1.-1.127.0.0.1.0.0.18.106.77.103.-99.-125.0.0.0.55 formatID:131076 gtxid:0.0.0.0.0.0.0.0.0.0.-1.-1.127.0.0.1.0.0.18.106.77.103.-99.-125.0.0.0.54.49 timed out
2011-02-25 12:22:49,558 WARN [com.arjuna.ats.arjuna] (Transaction Reaper) ARJUNA-12117 TransactionReaper::check timeout for TX 0:ffff7f000001:126a:4d679d83:36 in state CANCEL
2011-02-25 12:22:50,061 WARN [com.arjuna.ats.arjuna] (Transaction Reaper) ARJUNA-12117 TransactionReaper::check timeout for TX 0:ffff7f000001:126a:4d679d83:36 in state CANCEL_INTERRUPTED
2011-02-25 12:22:50,062 WARN [com.arjuna.ats.arjuna] (Transaction Reaper) ARJUNA-12120 TransactionReaper::check worker Thread[Transaction Reaper Worker 0,5,jboss] not responding to interrupt when cancelling TX 0:ffff7f000001:126a:4d679d83:36 -- worker marked as zombie and TX scheduled for mark-as-rollback
2011-02-25 12:22:50,062 WARN [com.arjuna.ats.arjuna] (Transaction Reaper) ARJUNA-12110 TransactionReaper::check successfuly marked TX 0:ffff7f000001:126a:4d679d83:36 as rollback only
2011-02-25 12:23:19,917 WARN [com.arjuna.ats.jta] (Transaction Reaper Worker 0) ARJUNA-16045 attempted rollback of < formatId=131076, gtrid_length=29, bqual_length=28, tx_uid=0:ffff7f000001:126a:4d679d83:36, node_name=1, branch_uid=0:ffff7f000001:126a:4d679d83:37, eis_name=unknown eis name > (org.hornetq.core.client.impl.DelegatingSession@6384d62e) failed with exception code XAException.XAER_NOTA: javax.transaction.xa.XAException
at org.hornetq.core.client.impl.ClientSessionImpl.rollback(ClientSessionImpl.java:1395) [:6.0.0.Final]
at org.hornetq.core.client.impl.DelegatingSession.rollback(DelegatingSession.java:481) [:6.0.0.Final]
at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelAbort(XAResourceRecord.java:336) [:6.0.0.Final]
at com.arjuna.ats.arjuna.coordinator.BasicAction.doAbort(BasicAction.java:2902) [:6.0.0.Final]
at com.arjuna.ats.arjuna.coordinator.BasicAction.doAbort(BasicAction.java:2881) [:6.0.0.Final]
at com.arjuna.ats.arjuna.coordinator.BasicAction.Abort(BasicAction.java:1602) [:6.0.0.Final]
at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.cancel(TwoPhaseCoordinator.java:119) [:6.0.0.Final]
at com.arjuna.ats.arjuna.AtomicAction.cancel(AtomicAction.java:212) [:6.0.0.Final]
at com.arjuna.ats.arjuna.coordinator.TransactionReaper.doCancellations(TransactionReaper.java:367) [:6.0.0.Final]
at com.arjuna.ats.internal.arjuna.coordinator.ReaperWorkerThread.run(ReaperWorkerThread.java:79) [:6.0.0.Final]


I am facing data loss also.
I am using jboss 6 with hornetq for message publishing.

Please guide me for that issue.

Thanks in Advance.



 
Deva Devan
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got the message loss again..

the following i am setting for my mdb.


@MessageDriven(name = "MyMDB",
activationConfig =
{


@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/queue_name"),
@ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "AUTO_ACKNOWLEDGE")})
@Pool (value="StrictMaxPool", maxSize=40, timeout=2000)
@TransactionManagement(value = TransactionManagementType.BEAN)
@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
@TransactionTimeout(value=1000)

@ResourceAdapter("jms-ra.rar")

data loss happening while mdb gettign data from jms.

and i got the previous exception when database transaction is slow.

Please let me know the issue.

Thanks.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic