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

Ask Your Question
0

SimplePollingEventListenerContainer "Setup of event listener invoker failed - trying to recover"

Hi I'm trying to get an GigaSpace XPA SimplePollingEventListenerContainer working.

I did the same as in the java docs usage exampe ( http://www.gigaspaces.com/docs/JavaDo... )

to be more specific:

    SimplePollingEventListenerContainer pollingEventListenerContainer = new SimplePollingContainerConfigurer(gigaSpace)
     .template(new MyUpdateNotification())
     .eventListenerAnnotation(new Object() {
         @SpaceDataEvent
         public void eventHappened(MyUpdateNotification u) {
             System.out.println("---" + u.toString() + " -------");
         }
     }).pollingContainer();

but I'm keep getting:

SEVERE [org.openspaces.events.polling.SimplePollingEventListenerContainer] - [null] Setup of event listener invoker failed - trying to recover; Caused by: java.lang.IllegalArgumentException: Broadcast is not supported for Read/Take Operations with timeout greater than 0. (Type='GUI.MyUpdateNoticifaction' ,routing property='notifyId')
    at com.gigaspaces.internal.client.spaceproxy.operations.ReadTakeEntrySpaceOperationRequest.getPartitionedClusterExecutionType(ReadTakeEntrySpaceOperationRequest.java:126)
    at com.gigaspaces.internal.remoting.routing.partitioned.PartitionedClusterRemoteOperationRouter.execute(PartitionedClusterRemoteOperationRouter.java:94)
    at com.gigaspaces.internal.client.spaceproxy.router.SpaceProxyRouter.execute(SpaceProxyRouter.java:233)
    at com.gigaspaces.internal.client.spaceproxy.actions.SpaceProxyImplReadTakeAction.readTake(SpaceProxyImplReadTakeAction.java:63)
    at com.gigaspaces.internal.client.spaceproxy.actions.SpaceProxyImplReadTakeAction.take(SpaceProxyImplReadTakeAction.java:40)
    at com.gigaspaces.internal.client.spaceproxy.actions.SpaceProxyImplReadTakeAction.take(SpaceProxyImplReadTakeAction.java:27)
    at com.gigaspaces.internal.client.spaceproxy.actions.AbstractSpaceProxyActionManager.take(AbstractSpaceProxyActionManager.java:356)
    at com.gigaspaces.internal.client.spaceproxy.actions.AbstractSpaceProxyActionManager.take(AbstractSpaceProxyActionManager.java:332)
    at com.gigaspaces.internal.client.spaceproxy.AbstractSpaceProxy.take(AbstractSpaceProxy.java:323)
    at org.openspaces.core.DefaultGigaSpace.take(DefaultGigaSpace.java:894)
    at org.openspaces.events.polling.receive.SingleTakeReceiveOperationHandler.doReceiveBlocking(SingleTakeReceiveOperationHandler.java:42)
    at org.openspaces.events.polling.receive.AbstractNonBlockingReceiveOperationHandler.receive(AbstractNonBlockingReceiveOperationHandler.java:60)
    at org.openspaces.events.polling.SimplePollingEventListenerContainer.receiveEvent(SimplePollingEventListenerContainer.java:1031)
    at org.openspaces.events.polling.SimplePollingEventListenerContainer.doReceiveAndExecute(SimplePollingEventListenerContainer.java:953)
    at org.openspaces.events.polling.SimplePollingEventListenerContainer.receiveAndExecute(SimplePollingEventListenerContainer.java:949)
    at org.openspaces.events.polling.SimplePollingEventListenerContainer$AsyncEventListenerInvoker.invokeListener(SimplePollingEventListenerContainer.java:864)
    at org.openspaces.events.polling.SimplePollingEventListenerContainer$AsyncEventListenerInvoker.run(SimplePollingEventListenerContainer.java:805)
    at java.lang.Thread.run(Unknown Source)

I think the issue is Broadcast is not supported for Read/Take Operations with timeout greater than 0. Any ideas to get it fixed? ("normal" write/read/take works fine [but only without timeout])

Env:

  • jdk1.7.0_75
  • gigaspaces-xap-premium-10.1.0-ga

asked 2015-04-07 08:42:34 -0500

bob gravatar image
edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

Hi Shay,

I have a similar Exception with a Polling. We deployed the PU on Thurday (2015-05-14) and Friday morining (2015-05-15) in the log files appears the exception:

2015-05-15 10:59:29,218 ppp-pps-pu [1] SEVERE [org.openspaces.events.polling.SimplePollingEventListenerContainer] - [accountSettlementProcessor] **Setup of event listener invoker failed - trying to recover**; Caused by: org.springframework.transaction.TransactionSystemException: some participants failed in commit after prepare [ID=338461]: risk of partial transaction reason=net.jini.core.transaction.CannotCommitException: commit failed [ID=338461]: reason=java.lang.ClassNotFoundException: com.pagosonline.ppp4.core.common.constraints.api.AccountOperationReserveFund; nested exception is net.jini.core.transaction.CannotCommitException: some participants failed in commit after prepare [ID=338461]: risk of partial transaction reason=net.jini.core.transaction.CannotCommitException: commit failed [ID=338461]: reason=java.lang.ClassNotFoundException: com.pagosonline.ppp4.core.common.constraints.api.AccountOperationReserveFund
  1. Why we get an ClassNotFoundException? (The PU was working normally).
  2. Why a polling throw the exception message:

    "Setup of event listener invoker failed - trying to recover"

Later, the polling did not take the objects related with the template.

Thanks.

answered 2015-05-19 14:46:26 -0500

guedim gravatar image
edit flag offensive delete link more
0

If the jar deployed does include the com.pagosonline.ppp4.core.common.constraints.api.AccountOperationReserveFund you might have:

  • The same class appears more than once within the deployed jar. Check other jars within the deployed jar. JVM sometime throws ClassNotFoundException when the same class loaded more than once into the classloader. Known Java issue.
  • Somehow ClassNotFoundException is thrown since you are getting into out of memory situation and the JVM trying to drop classes without ability to reload them again. Very rare - but might happen in extreme cases. Consider increasing the MaxPermSize size. The 256 MB might be too small in your case.

Shay

answered 2015-05-19 15:10:53 -0500

shay hassidim gravatar image
edit flag offensive delete link more

Comments

The AccountOperationReserveFund is a custom validation (annotation) so was necesary to copy into the %GS_HOME%/lib/platform/ext.

guedim gravatar imageguedim ( 2015-05-24 15:00:30 -0500 )edit
0

It this a remote polling container? You should run in non-blocking mode.

answered 2015-04-08 07:04:25 -0500

shay hassidim gravatar image

updated 2015-04-08 10:24:01 -0500

edit flag offensive delete link more

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: 2015-04-07 08:42:34 -0500

Seen: 2,088 times

Last updated: May 19 '15