Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question
0

Is this exception ignored and retried?

I get an exception (see below) after committing a fairly large transaction (10'000-20'000 inserts). The db transaction seems to be committed ok, and the gigaspace seems to carry on ok too. The exception happens when writing a new record (for the next processing step) to gigaspaces. Can I ignore this? And why does it only happen after large transactions?

2014-12-22 15:45:26,600 [GS-paymentAdviceReconcilerPollingEventContainer-2] ERROR org.songbird.reconciler.processor.reconciliation.PaymentAdviceReconciler processData - unknown transaction; nested exception is net.jini.core.transaction.UnknownTransactionException: unknown transaction org.openspaces.core.TransactionDataAccessException: unknown transaction; nested exception is net.jini.core.transaction.UnknownTransactionException: unknown transaction at org.openspaces.core.exception.DefaultExceptionTranslator.internalTranslate(DefaultExceptionTranslator.java:181) at org.openspaces.core.exception.DefaultExceptionTranslator.translate(DefaultExceptionTranslator.java:50) at org.openspaces.core.DefaultGigaSpace.write(DefaultGigaSpace.java:1172) at org.openspaces.core.DefaultGigaSpace.write(DefaultGigaSpace.java:1164) at org.songbird.reconciler.processor.reconciliation.PaymentAdviceReconciler.writeData(PaymentAdviceReconciler.java:120) at org.songbird.reconciler.processor.reconciliation.PaymentAdviceReconciler.processData(PaymentAdviceReconciler.java:70) at org.songbird.reconciler.processor.reconciliation.PaymentAdviceReconcilerGigaspacesMethodinternalInvoke0.internalInvoke(Unknown Source) at com.gigaspaces.internal.reflection.fast.AbstractMethod.invoke(AbstractMethod.java:41) at org.openspaces.events.adapter.AbstractReflectionEventListenerAdapter.onEventWithResult(AbstractReflectionEventListenerAdapter.java:173) at org.openspaces.events.adapter.AbstractResultEventListenerAdapter.onEvent(AbstractResultEventListenerAdapter.java:75) at org.openspaces.events.AbstractEventListenerContainer.invokeListener(AbstractEventListenerContainer.java:194) at org.openspaces.events.polling.AbstractPollingEventListenerContainer.doReceiveAndExecute(AbstractPollingEventListenerContainer.java:316) at org.openspaces.events.polling.AbstractPollingEventListenerContainer.receiveAndExecute(AbstractPollingEventListenerContainer.java:255) at org.openspaces.events.polling.SimplePollingEventListenerContainer$AsyncEventListenerInvoker.invokeListener(SimplePollingEventListenerContainer.java:721) at org.openspaces.events.polling.SimplePollingEventListenerContainer$AsyncEventListenerInvoker.run(SimplePollingEventListenerContainer.java:662) at java.lang.Thread.run(Thread.java:695) Caused by: net.jini.core.transaction.UnknownTransactionException: unknown transaction at com.sun.jini.mahalo.TxnManagerImpl.join_impl(TxnManagerImpl.java:987) at com.sun.jini.mahalo.TxnManagerImpl.join(TxnManagerImpl.java:904) at com.sun.jini.mahalo.TxnMgrProxy.join(TxnMgrProxy.java:276) at net.jini.core.transaction.server.ServerTransaction.join(ServerTransaction.java:248) at net.jini.core.transaction.server.ServerTransaction.joinIfNeededAndEmbedded(ServerTransaction.java:398) at com.gigaspaces.internal.client.spaceproxy.SpaceProxyImpl.beforeExecute(SpaceProxyImpl.java:804) at com.gigaspaces.internal.client.spaceproxy.router.SpaceEmbeddedRemoteOperationRouter.beforeOperationExecution(SpaceEmbeddedRemoteOperationRouter.java:45) at com.gigaspaces.internal.remoting.routing.embedded.EmbeddedRemoteOperationRouter.executeImpl(EmbeddedRemoteOperationRouter.java:65) at com.gigaspaces.internal.remoting.routing.embedded.EmbeddedRemoteOperationRouter.execute(EmbeddedRemoteOperationRouter.java:60) at com.gigaspaces.internal.client.spaceproxy.router.SpaceProxyRouter.execute(SpaceProxyRouter.java:235) at com.gigaspaces.internal.client.spaceproxy.actions.SpaceProxyImplWriteAction.write(SpaceProxyImplWriteAction.java:42) at com.gigaspaces.internal.client.spaceproxy.actions.SpaceProxyImplWriteAction.write(SpaceProxyImplWriteAction.java:27) at com.gigaspaces.internal.client.spaceproxy.actions.AbstractSpaceProxyActionManager.write(AbstractSpaceProxyActionManager.java:444) at com.gigaspaces.internal.client.spaceproxy.AbstractSpaceProxy.write(AbstractSpaceProxy.java:467) at org.openspaces.core.DefaultGigaSpace.write(DefaultGigaSpace.java:1170) ... 13 more 2014-12-22 15:45:26,601 [GS-paymentAdviceReconcilerPollingEventContainer-2] INFO org.songbird.reconciler.common.ReportingProcess getSafeFile - File already exists, trying 123451234512345.2014-12-22 15:45:26.html 2014-12-22 15:45:26,601 [GS-paymentAdviceReconcilerPollingEventContainer-2] INFO org.songbird.reconciler.common.ReportingProcess getSafeFile - Got new file/Users/davidwilson/Documents/workspace/testfiles/reconciler.integration/reconciliation/reports/snieditionssa/123451234512345.2014-12-22 15:45:26.html 2014-12-22 15:45:26,601 [GS-paymentAdviceReconcilerPollingEventContainer-2] INFO org.songbird.reconciler.common.ReportingProcess getBufferedWriter - Writing file /Users/davidwilson/Documents/workspace/testfiles/reconciler.integration/reconciliation/reports/snieditionssa/123451234512345.2014-12-22 15:45:26.html 2014-12-22 15:45:26,684 [GS-paymentAdviceReconcilerPollingEventContainer-2] ERROR org.openspaces.events.polling.SimplePollingEventListenerContainer handleListenerSetupFailure - [paymentAdviceReconcilerPollingEventContainer] Setup of event listener invoker failed - trying to recover org.springframework.transaction.TransactionSystemException: Unknown transaction; nested exception is net.jini.core.transaction.UnknownTransactionException: Unknown transaction at org.openspaces.core.transaction.manager.AbstractJiniTransactionManager.convertJiniException(AbstractJiniTransactionManager.java:409) at org.openspaces.core.transaction.manager.AbstractJiniTransactionManager.doCommit(AbstractJiniTransactionManager.java:301) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723) at org.openspaces.events.polling.AbstractPollingEventListenerContainer.receiveAndExecute(AbstractPollingEventListenerContainer.java:268) at org.openspaces.events.polling.SimplePollingEventListenerContainer$AsyncEventListenerInvoker.invokeListener(SimplePollingEventListenerContainer.java:721) at org.openspaces.events.polling.SimplePollingEventListenerContainer$AsyncEventListenerInvoker.run(SimplePollingEventListenerContainer.java:662) at java.lang.Thread.run(Thread.java:695) Caused by: net.jini.core.transaction.UnknownTransactionException: Unknown transaction at com.sun.jini.mahalo.TxnManagerImpl.commit_impl(TxnManagerImpl.java:1166) at com.sun.jini.mahalo.TxnManagerImpl.commit(TxnManagerImpl.java:1139) at com.sun.jini.mahalo.TxnMgrProxy.commit(TxnMgrProxy.java:184) at net.jini.core.transaction.server.ServerTransaction.commit(ServerTransaction.java:193) at org.openspaces.core.transaction.manager.AbstractJiniTransactionManager.doCommit(AbstractJiniTransactionManager.java:298) ... 6 more

asked 2014-12-22 09:11:40 -0500

djw gravatar image
edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

You probably need to increase the transaction timeout.

answered 2014-12-22 12:19:06 -0500

shay hassidim gravatar image
edit flag offensive delete link more

Comments

I guess from your answer, that it is not safe to ignore the exception.

djw gravatar imagedjw ( 2014-12-23 01:41:48 -0500 )edit

You are getting unknown transaction execption.

Somehow you are using a transaction that is not valid. Probably because it was expired - hence the suggestion to increase its timeout.

shay hassidim gravatar imageshay hassidim ( 2014-12-23 05:44:43 -0500 )edit
0

This did the trick: <os-core:distributed-tx-manager id="transactionManager" default-timeout="1000"/> The default value (of the default-timeout) is 90 seconds, which is not enough for some of my long running transactions. Thanks for the tip.

answered 2014-12-23 04:49:43 -0500

djw gravatar image
edit flag offensive delete link more

Comments

I would advise looking into speeding up this transaction time.

Let’s start with setting this system property for all GSCs:

com.gs.transport_protocol.lrmi.maxBufferSize= 327680

You can do this via the GSC_JAVA_OPTIONS.

shay hassidim gravatar imageshay hassidim ( 2014-12-23 09:36:07 -0500 )edit

What I'm doing right now is stress testing i.e. with approx. 10-20x the transaction size I expect. In the longer term I'll need to change how the function (i.e the listener) works to:

  1. break down the size of the transaction and
  2. make it repeatable i.e. idempotent.

    Right now I've no urgent need for other tweaks. Thanks for your interest!

djw gravatar imagedjw ( 2014-12-24 01:30:52 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-12-22 09:11:40 -0500

Seen: 519 times

Last updated: Dec 23 '14