incubator-s4-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raghavendar TS <raghav280...@gmail.com>
Subject Serializing object of Instance.class in S4 0.3.0
Date Tue, 04 Sep 2012 07:19:35 GMT
Hi
In S4 0.3.0 I am trying to dispatch object of Instance.class from one PE to
another.But it is not working.ie PE2 is not receiving events from PE1 if
the event consist of object of Instance.class.What may be the problem?

Also I tried using GSON to serialize objects of Instance.class to string
and vice versa.It is throwing the exception during deserialization

Exception in thread "main" java.lang.RuntimeException: No-args constructor
for interface weka.core.Instance does not exist. Register an
InstanceCreator with Gson for this type to fix this problem.
    at
com.google.gson.MappedObjectConstructor.constructWithNoArgConstructor(MappedObjectConstructor.java:64)
    at
com.google.gson.MappedObjectConstructor.construct(MappedObjectConstructor.java:53)
    at
com.google.gson.JsonObjectDeserializationVisitor.constructTarget(JsonObjectDeserializationVisitor.java:41)
    at
com.google.gson.JsonDeserializationVisitor.getTarget(JsonDeserializationVisitor.java:56)
    at com.google.gson.ObjectNavigator.accept(ObjectNavigator.java:101)
    at
com.google.gson.JsonDeserializationContextDefault.fromJsonObject(JsonDeserializationContextDefault.java:73)
    at
com.google.gson.JsonDeserializationContextDefault.deserialize(JsonDeserializationContextDefault.java:51)
    at com.google.gson.Gson.fromJson(Gson.java:495)
    at com.google.gson.Gson.fromJson(Gson.java:444)
    at com.google.gson.Gson.fromJson(Gson.java:396)
    at com.google.gson.Gson.fromJson(Gson.java:372)
    at gson.main(gson.java:62)

What is the problem.

How can I dispatch such objects in S4 0.3.0.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message