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

Ask Your Question

exception while writing to space

I get the following exception during a test using an embedded space:

org.openspaces.core.UncategorizedSpaceException: nested exception is java.lang.NullPointerException
    at org.openspaces.core.exception.DefaultExceptionTranslator.translate(DefaultExceptionTranslator.java:54)
    at org.openspaces.core.DefaultGigaSpace.write(DefaultGigaSpace.java:624)
    at org.openspaces.core.DefaultGigaSpace.write(DefaultGigaSpace.java:616)
    at my.packege.MyClass2.myMethod(MyClass2.java:234)
    at my.package.MyClass1.VolumeThrottle$1.notify(MyClass1.java:65)
    at com.j_spaces.core.client.NotifyDelegator.notify(NotifyDelegator.java:182)
    at com.j_spaces.core.client.RemoteEventListenerExporter$TransientDelegator.notify(RemoteEventListenerExporter.java:155)
    at com.gigaspaces.internal.lrmi.stubs.LRMIRemoteEventListener.notify(LRMIRemoteEventListener.java:96)
    at com.j_spaces.core.server.processor.RemoteEventBusPacket.notifyListener(RemoteEventBusPacket.java:124)
    at com.gigaspaces.events.SingleNotifyExecutor.execute(SingleNotifyExecutor.java:26)
    at com.j_spaces.core.Notifier.execute(Notifier.java:145)
    at com.j_spaces.core.server.processor.RemoteEventBusPacket.execute(RemoteEventBusPacket.java:106)
    at com.j_spaces.core.Notifier.dispatch(Notifier.java:69)
    at com.j_spaces.core.Notifier.dispatch(Notifier.java:33)
    at com.j_spaces.kernel.WorkingGroup$TaskWrapper.run(WorkingGroup.java:60)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
    at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NullPointerException
    at com.j_spaces.core.client.transport.TypeManager.getWriteResult(TypeManager.java:393)
    at com.j_spaces.core.client.transport.TypeManager.convertWriteOrUpdateResult(TypeManager.java:229)
    at com.gigaspaces.internal.client.spaceproxy.actions.WriteProxyAction.getResult(WriteProxyAction.java:43)
    at com.gigaspaces.internal.client.spaceproxy.actions.AbstractSpaceProxyActionManager.write(AbstractSpaceProxyActionManager.java:361)
    at com.gigaspaces.internal.client.spaceproxy.AbstractSpaceProxy.write(AbstractSpaceProxy.java:413)
    at org.openspaces.core.DefaultGigaSpace.write(DefaultGigaSpace.java:622)
... 16 more

I'm trying to reproduce this in a simpler code snippet but failed till now.
In MyClass1 I have a listener on a NotifyActionType.NOTIFYLEASEEXPIRATION event. Which then calls a method on MyClass2 writes an object then fails with this exception when writing a wrapper object containing that object with a few fields changed. Our production code works without writing the object that is wrapped before wrapping it, but I tried a refactor to simplify my code and considered not harm in writing that object. Some times I simply have to write the object, and in few situations I must write the wrapper but not necessarily the object itself, in order to simplify code I tried to always write it. This is what I tried to reproduce but failed to get that exception till now.
Can you give me some help based on this exception only (I can't submit all my code), or anything I could try to reproduce it?

This thread was imported from the previous forum.
For your reference, the original is available here

asked 2010-11-11 08:31:04 -0500

lukeh gravatar image

updated 2013-08-08 09:52:00 -0500

jaissefsfex gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

a wild guess: clone the object before you write it.
Does this happens also when you are running running in remote mode?

answered 2010-11-11 08:39:23 -0500

shay hassidim gravatar image
edit flag offensive delete link more


Thanks for reply Shay,

I tried to clone everything I write (especially what is written extra in the version that fails), also cloned before wrapping. It didn't helped.
For now I tried to reproduce locally with a snipplet but I plan to make a test with remote space too.
Forgot to mention I use gigaspaces-xap-premium-7.1.0-ga-b4300


lukeh gravatar imagelukeh ( 2010-11-11 08:48:25 -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


Asked: 2010-11-11 08:31:04 -0500

Seen: 73 times

Last updated: Nov 11 '10