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

Ask Your Question
0

Failed to unmarsh, Class not found

When attempting to write an updated object to a Space via the java API, org.openspaces.core.GigaSpace.write(Entry, lease, timeout, modifiers), I've run into some strange behavior that I can't duplicate outside of an existing space that already had this object at some point before.

Through trying to solve this problem, I've attempted to do numerous things:

  • Restart the space
  • Restart the domain the space is on
  • Delete the conflicting object from the space
  • Rename the object (hence the 4 below)
  • Changed the serialization ID for said object
    • All objects for the Space Class (FlushNotification4) are serializable.

The object in question (FlushNotification4) has two strings and an object (HotSwapRule4, serializable) which contains two additional objects (both serializable)

In a test scenario, initializing a brand new space and writing the object to the space works without any trouble. This is only an issue with an existing space that I would like to avoid having to do a hard restart of the domain to make this work.

New Developments of the issue:

  • The problem is ONLY occuring on a remote node deployed via chef. This node uses a packaged .jar that uses the gigaspaces API to write out the object.
  • Other nodes (including locally run) can write the object out to a new space without any problem.
  • After another node writes to the same space, the problematic node can then write without any problems.

More Updates

  • Using a fresh vagrant installation of redhat with nothing other than a manually installed Java, the .jar still fails to be the first to write out to the space.
  • These VMs can still be the second node to write to the space just fine.
    com.gigaspaces.lrmi.nio.UnMarshallingException: Failed to unmarsh :[RequestPacket: interface com.gigaspaces.internal.remoting.RemoteOperationsExecutor.executeOperation(com.gigaspaces.internal.remoting.RemoteOperationRequest null), isOneWay = false, isCallBack = false, Priority = REGULAR]
        at com.gigaspaces.lrmi.nio.Reader.unmarshall(Reader.java:625)
        at com.gigaspaces.lrmi.nio.Reader.unmarshallRequest(Reader.java:509)
        at com.gigaspaces.lrmi.nio.ChannelEntry.unmarshall(ChannelEntry.java:161)
        at com.gigaspaces.lrmi.nio.Pivot$ChannelEntryTask.run(Pivot.java:182)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
    Caused by: com.j_spaces.core.EntrySerializationException: Failed to deserialize Entry FlushNotification4
        at com.gigaspaces.internal.transport.EntryPacket.deserializePacket(EntryPacket.java:409)
        at com.gigaspaces.internal.transport.EntryPacket.readExternal(EntryPacket.java:357)
        at com.gigaspaces.internal.transport.AbstractEntryPacket.readExternalImpl(AbstractEntryPacket.java:296)
        at com.gigaspaces.internal.serialization.AbstractExternalizable.readExternal(AbstractExternalizable.java:38)
        at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1837)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1796)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
        at com.gigaspaces.internal.serialization.ObjectClassSerializer.read(ObjectClassSerializer.java:30)
        at com.gigaspaces.internal.io.IOUtils.readObject(IOUtils.java:693)
        at com.gigaspaces.internal.client.spaceproxy.operations.WriteEntrySpaceOperationRequest.readExternal(WriteEntrySpaceOperationRequest.java:189)
        at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1837)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1796)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
        at com.gigaspaces.internal.io.IOUtils.unmarshalValue(IOUtils.java:302)
        at com.gigaspaces.lrmi.nio.RequestPacket.readExternal(RequestPacket.java:219)
        at com.gigaspaces.lrmi.nio.Reader.unmarshall(Reader.java:585)
        ... 6 more
    Caused by: java.lang.ClassNotFoundException: HotSwapRuleInfo4
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.rmi.server.LoaderHandler$Loader.loadClass(LoaderHandler.java:1206)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:270)
        at sun.rmi.server.LoaderHandler.loadClassForName(LoaderHandler.java:1219)
        at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:452)
        at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:185)
        at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:637)
        at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:264)
        at com.gigaspaces.internal.io.AnnotatedObjectInputStream.resolveClass(AnnotatedObjectInputStream.java:180)
        at com.gigaspaces.internal.io.MarshalInputStream.resolveClass(MarshalInputStream.java:158)
        at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612)
        at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
        at com.gigaspaces.internal.serialization.ObjectClassSerializer.read(ObjectClassSerializer.java:30)
        at com.gigaspaces.internal.io.IOUtils.readObject(IOUtils.java:693)
        at com.gigaspaces.internal.io.IOUtils.readObjectArray(IOUtils.java:732)
        at com.gigaspaces.internal.io.IOUtils.readObjectArrayCompressed(IOUtils.java:859)
        at com.gigaspaces.internal.transport.EntryPacket.deserializePacket(EntryPacket.java:390)

asked 2016-04-28 13:47:38 -0600

Mogromo gravatar image

updated 2016-05-10 16:54:21 -0600

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

Mogromo

A few things; if you're never going to query the HotSwapRuleInfo4 object, ie. it's just a payload, then you can use binary serialization; see this link:

http://docs.gigaspaces.com/xap110/sto...

Another option would be to put the business objects in a jar and put it in <gigaspaces>/lib/platform/ext. This location is usually used for drivers and other class libraries that are common across processing units, but it should ensure that the class is found.

Lastly, you could enumerate the types from the type manager, but this is more in the pursuit of diagnosis than it is resolution.

Regards

John

answered 2016-05-04 08:37:30 -0600

jb gravatar image
edit flag offensive delete link more

Comments

PS - What version are you using?

jb gravatar imagejb ( 2016-05-04 08:38:31 -0600 )edit

Sorry for the delay, the remote box we were testing on was out of commission for a week. We are using gigaspaces-9.7.1-b10822

I do not have access to the actual Gigaspaces installation, and putting the expected jar in their lib directory is out of the question.

The main question has been edited with new developments.

Mogromo gravatar imageMogromo ( 2016-05-10 11:49:07 -0600 )edit

This isn't the type of question/problem the forum is designed to address; please raise a support case.

Regards

John

jb gravatar imagejb ( 2016-05-17 10:50:19 -0600 )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: 2016-04-28 13:18:56 -0600

Seen: 520 times

Last updated: May 10 '16