Questions tagged [notserializableexception]

Exception thrown when an instance is required to have a Serializable interface.

In Java, NotSerializableException class which extends ObjectStreamException class is responsible for notserializableexception. Thrown when an instance is required to have a Serializable interface. The serialization runtime or the class of the instance can throw this exception. The argument should be the name of the class.

121 questions
1
vote
0 answers

grails & neuroph: neural net file saving

I have a project based on neuroph. Since I am computing some values in memory I wanted to save the neural net in a file through to: neuralNet.save("/tmp/someprettyname.nnet") where neuralNet is: neuralNet = new…
1
vote
1 answer

spark scala broadcast variable not working: task not serializble

I have one dataframe like this: val temp = sc.parallelize(Seq(Array(43,53,266),Array(69,160,166),Array(266))) .toDF("value") I want to select the row that intersects with the following array: val goodValue = Array(231, 266) val broadcastGood =…
1
vote
1 answer

java.io.NotSerializableException: org.mybatis.spring.SqlSessionTemplate

I am getting below exception when I am doing clustering in Tomcat. SEVERE: Unable to serialize delta request for sessionid [E67521E84EE07AB85E0243149B4DE472.jvm2] java.io.NotSerializableException: org.mybatis.spring.SqlSessionTemplate …
Hima
  • 11
  • 2
1
vote
3 answers

How to serialize a java object with not Serializable fields inside it into byte array and deserialize the array to get the original object

Greetings to the community, I recently came up with an issue in serialization and deserialization in my java project. I have an object of a class containing other objects as fields. I would like to store the state of the object into a byte array…
1
vote
2 answers

Hazelcast : NotSerializableException

I am using a map with Hazelcast : //When I do : map.put(gen.newId(), myObject); myObject is a very complex object and does not implements Serializable. I thought that putting the config like below was enough for not having to implement serializable…
Zitun
  • 388
  • 1
  • 4
  • 13
1
vote
2 answers

java.io.NotSerializableException: java.beans.EventHandler

I have this exception I do not understand why it would be thrown or how should I handle it. try{ File file = chooser.getSelectedFile(); ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(file)); …
1
vote
1 answer

JTree D&D DataFlavor issue (NotSerializableException in some cases)

I'm implementing D&D for a JTree. I have written a custom TransferHandler and created a new Transferable class. This class is very easy: public class TreePathTransferable implements Transferable{ private static final DataFlavor[] flavors = new…
Neo
  • 1,337
  • 4
  • 21
  • 50
1
vote
1 answer

cannot find source of NotSerializableException

I am trying to create a deep copy of a rather complex data structure. It has lots of children and variables that all need to be serializable. I've done my best to mark all the classes I know need to be serializable and I have worked through…
meriley
  • 1,831
  • 3
  • 20
  • 33
1
vote
0 answers

NotSerializableException thrown while deserializing an serialized object

I have a pretty weird problem. Some data I loaded I want to save as an serialized object. I have done this before but for some reason I just can't get it to work. The weird part is, that NO exceptions are thrown in the SERIALIZING of the object,…
Jasper
  • 2,389
  • 4
  • 25
  • 40
1
vote
1 answer

Tomcat JPA warning all classes after redeploying

I am using JPA for my DB process with Tomcat. But I always get this warning from server. WARNING: Cannot serialize session attribute com.sun.faces.application.view.activeViewMaps for session…
emreturka
  • 846
  • 3
  • 18
  • 44
1
vote
1 answer

android : Why occur "NotSerializableException" even if implements "Serialization"?

Below my code: public interface Callback extends Serializable{ void onSuccess(T response); void onFail(String errMsg); } AND public class Response implements Serializable{ public String…
JuL
  • 113
  • 1
  • 7
1
vote
3 answers

How to post a JSON object to an URL?

I'm trying to post a JSON to a web service so that I can get a JSON in response as return, I have searched in Google but most of the response I found is for Android but not for core Java, this question is for a Swing application I'll give the code…
1
vote
3 answers

Caused by: java.io.NotSerializableException: android.os.Handler

I keep getting this Serializable error. Both of my classes implement it. I cant seem to find problem. I have gone through all classes and still cant find the cause. It only happens on older Android version, 2.3 and below. Seems to be working find on…
1
vote
3 answers

aparch spark, NotSerializableException: org.apache.hadoop.io.Text

here is my code: val bg = imageBundleRDD.first() //bg:[Text, BundleWritable] val res= imageBundleRDD.map(data => { val desBundle = colorToGray(bg._2) //lineA:NotSerializableException:…
Hellen
  • 3,472
  • 5
  • 18
  • 25
1
vote
1 answer

Java Serializable Object fails

I am having an issue with writing a Serializable object to a file. I have been able to narrow the problem down, but have no idea what would cause this, so I'm just looking for advice anyone may have, because I can't really give an example, but I…
user1725940
  • 93
  • 4
  • 10
1 2 3
8 9