Custom Marshaller

classic Classic list List threaded Threaded
7 messages Options
pgarg pgarg
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Custom Marshaller

This post was updated on .
asked by anıl halil

I tried to implement a custom marshaller but it said java.lang.RuntimeException: Class org.apache.ignite.internal.processors.security.os.GridOsSecurityProcessor does not implement Serializable or externalizable

from which i understand i tries to ser/deser some other internal classes.

Can you put some docs about marshalling?

-----
This post is migrated from now discontinued Apache Ignite forum at
http://apacheignite.readme.io/v1.0/discuss
pgarg pgarg
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom Marshaller

commented by dmitriy setrakyan

We are looking into it. Can you please post the stacktrace here?

-----
This post is migrated from now discontinued Apache Ignite forum at
http://apacheignite.readme.io/v1.0/discuss
pgarg pgarg
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom Marshaller

This post was updated on .
commented by anil halil

Mar 03, 2015 5:45:23 PM org.apache.ignite.logger.java.JavaLogger error SEVERE: Got exception while starting (will rollback startup routine). java.lang.RuntimeException: Class org.apache.ignite.internal.processors.security.os.GridOsSecurityProcessor does not implement Serializable or externalizable at org.nustaq.serialization.FSTClazzInfo.<init>(FSTClazzInfo.java:121) at org.nustaq.serialization.FSTClazzInfoRegistry.getCLInfo(FSTClazzInfoRegistry.java:126) at org.nustaq.serialization.FSTObjectOutput.getFstClazzInfo(FSTObjectOutput.java:511) at org.nustaq.serialization.FSTObjectOutput.writeObjectWithContext(FSTObjectOutput.java:406) at org.nustaq.serialization.FSTObjectOutput.writeObjectWithContext(FSTObjectOutput.java:359) at org.nustaq.serialization.FSTObjectOutput.writeObjectFields(FSTObjectOutput.java:636) at org.nustaq.serialization.FSTObjectOutput.defaultWriteObject(FSTObjectOutput.java:523) at org.nustaq.serialization.FSTObjectOutput.writeObjectWithContext(FSTObjectOutput.java:442) at org.nustaq.serialization.FSTObjectOutput.writeObjectInternal(FSTObjectOutput.java:317) at org.nustaq.serialization.FSTObjectOutput.writeObject(FSTObjectOutput.java:282) at org.nustaq.serialization.FSTObjectOutput.writeObject(FSTObjectOutput.java:191) at org.apache.ignite.internal.processors.security.GridSecurityContext.writeExternal(GridSecurityContext.java:234) at org.nustaq.serialization.FSTObjectOutput.defaultWriteObject(FSTObjectOutput.java:520) at org.nustaq.serialization.FSTObjectOutput.writeObjectWithContext(FSTObjectOutput.java:442) at org.nustaq.serialization.FSTObjectOutput.writeObjectInternal(FSTObjectOutput.java:317) at org.nustaq.serialization.FSTObjectOutput.writeObject(FSTObjectOutput.java:282) at com.globalmaksimum.ignite.FSTMarshaller.marshal(OffHeapTest.scala:47) at org.apache.ignite.marshaller.AbstractMarshaller.marshal(AbstractMarshaller.java:43) at org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.joinTopology(TcpDiscoverySpi.java:1281) at org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.spiStart0(TcpDiscoverySpi.java:756) at org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi.spiStart(TcpDiscoverySpi.java:654) at org.apache.ignite.internal.managers.GridManagerAdapter.startSpi(GridManagerAdapter.java:215) at org.apache.ignite.internal.managers.discovery.GridDiscoveryManager.start(GridDiscoveryManager.java:349) at org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1361) at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:733) at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1783) at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1281) at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:863) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:462) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:443) at org.apache.ignite.Ignition.start(Ignition.java:288) at com.globalmaksimum.ignite.OffHeapTest$.delayedEndpoint$com$globalmaksimum$ignite$OffHeapTest$1(OffHeapTest.scala:94) at com.globalmaksimum.ignite.OffHeapTest$delayedInit$body.apply(OffHeapTest.scala:60) at scala.Function0$class.apply$mcV$sp(Function0.scala:40) at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12) at scala.App$$anonfun$main$1.apply(App.scala:76) at scala.App$$anonfun$main$1.apply(App.scala:76) at scala.collection.immutable.List.foreach(List.scala:381) at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35) at scala.App$class.main(App.scala:76) at com.globalmaksimum.ignite.OffHeapTest$.main(OffHeapTest.scala:60) at com.globalmaksimum.ignite.OffHeapTest.main(OffHeapTest.scala) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

-----
This post is migrated from now discontinued Apache Ignite forum at
http://apacheignite.readme.io/v1.0/discuss

pgarg pgarg
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom Marshaller

commented by dmitriy setrakyan

It looks like Ignite instance is in the scope of your clustered code and also gets serialized.

If you are using default Ignite OptimizedMarshaller or JdkMarshaller, then they honor the Java Serializable and Externalizable contracts. This way, classes like Ignite or any other Ignite artifacts get properly serialized.

However, in your own marshaller perhaps you have some different logic which does not work with Externalizable interface. To avoid serializing Ignite instance by accident, I would isolate the closure or task logic you are sending to the cluster into a static class.

Please let me know if it fixes your issue.

-----
This post is migrated from now discontinued Apache Ignite forum at
http://apacheignite.readme.io/v1.0/discuss
pgarg pgarg
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom Marshaller

This post was updated on .
commented by anil halil

Actually i dont use my ignite instance in my cluster logic. It is just a simple example. Anyway i pushed my example to git. It has only one file

https://github.com/capacman/ignite-examples

-----
This post is migrated from now discontinued Apache Ignite forum at
http://apacheignite.readme.io/v1.0/discuss
pgarg pgarg
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom Marshaller

commented by andrey novikov

I investigated this issue and found, that it was already fixed in 1.0.0-RC2, that will be released in a week.

At this moment you can use 1.0.0-RC2-SNAPSHOT, by changing your build.sbt:

libraryDependencies += "org.apache.ignite" % "ignite-core" % "1.0.0-RC2-SNAPSHOT"

resolvers += "Apache Snapshots Maven Repository" at "https://repository.apache.org/content/repositories/snapshots/"

-----
This post is migrated from now discontinued Apache Ignite forum at
http://apacheignite.readme.io/v1.0/discuss
pgarg pgarg
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom Marshaller

commented by anil halil

Ok solved thanks :)

-----
This post is migrated from now discontinued Apache Ignite forum at
http://apacheignite.readme.io/v1.0/discuss
Loading...