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.

111 questions
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
  • 398
  • 1
  • 4
  • 12
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,171
  • 3
  • 17
  • 42
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,591
  • 3
  • 17
  • 31
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,199
  • 4
  • 22
  • 38
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
  • 527
  • 3
  • 13
  • 39
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

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:…
hequn8128
  • 3,022
  • 5
  • 16
  • 24
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
  • 3
  • 10
1
vote
4 answers

NotSerializableException when doing file I/O using static method

So, I've got two classes that I've declared static (by making their methods static and their constructors private), Synchronizer and UserProfile. Synchronizer's saveData() function calls UserProfile's saveData() function: private static void…
1
vote
2 answers

NotSerializableException, unpredictable?

java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: java.lang.reflect.Constructor at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351) at…
ldam
  • 3,971
  • 5
  • 38
  • 67
0
votes
1 answer

DeepNetts 1.3 is having issues with the serialization on the setEarlyStopping and writeToFile any network with ADAM optimizer

This is my setup. I'm trying to check every 5 epochs if I'm overfitting and using ADAM optimizer. And trying to save the trained network to later usages. Seems no matter the setup I can use ADAM optimizer it blow due to not being able to…
0
votes
2 answers

Same code throws java.io.NotSerializableException in one Websphere app server environment but not the other

We encountered an interesting issue on our UAT WAS environment. The same code deployed to DEV (1 node) environment works perfectly. However, it throws the following exception on the UAT (2 nodes) with the same configurations. The only difference is…
user1747980
  • 195
  • 2
  • 11
0
votes
1 answer

Why am I getting java.io.NotSerializableException: Investment.Date despite implementing Serializable?

I am referencing the Date class in another class which I'm trying to write to an instance of to a file using the CompanySaver class. The Date class is a child of the calendar class which implements java.io.Serializable and has no instance variables…