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
0
votes
3 answers

Java writing/reading unserializable objects to/from file

I am using JSI (Java Spatial Index, RTree) to implement 2D spatial search. I want to save the tree to file, which triggered java.io.NotSerializableException using code below. public class GeographicIndexer { private static final Logger log =…
Nathaniel Ding
  • 166
  • 1
  • 10
0
votes
1 answer

Overriding methods in class implementing Serializable

I am trying to create a distributed processing system on Android through Bluetooth, so I created a class that implements Serializable, made a method to serialize and deserialize that object so that I can send it as a ByteArray. The problem is that I…
0
votes
4 answers

Java notSerializableExceptionError

When trying to save an arraylist of my class Click, I get this error: java.io.NotSerializableException:javax.swing.text.DefaultHighlighter$LayeredHighlightInfo on this line of code: os.writeObject(saveList);. Even though I made my Click class…
0
votes
1 answer

ObjectInputStream throwing NotSerializableException

I'm trying to read an array (called PWlist) of objects from a .dat file using ObjectInputStream. The array contains two different objects, LongPW and PinPW. When I try to perform the read, I am getting this…
-1
votes
1 answer

My class is Serializable and i have java.io.NotSerializableException why?

I have this exception and I don't understand why. The error log : java.io.NotSerializableException: java.io.ObjectOutputStream at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1184) at…
-1
votes
1 answer

java.lang.RuntimeException: Parcelable encountered IOException writing serializable object (name = com.xxx.xxx.xxx.model.CategoryModel)

I am passing a list of model from one fragment A to another fragment B, when when i press recent app button on fragment B it crashed. data class CategoryModel( @SerializedName("id") val id : Int, @SerializedName("name") val categoryName :…
Rakesh kushwaha
  • 709
  • 1
  • 10
  • 22
-1
votes
1 answer

MyClass NotSerializableException

I created a class named Components. It has some components like Button, TextArea, VerticalLayout, etc. I didn't make this class serializable because I don't need to, but when I start the server (I use Tomcat), I get this…
Champ
  • 51
  • 1
  • 7
-1
votes
1 answer

HTTP request from Jenkins pipeline with proxy auth and client certificate

I need to make an HTTP call from my Jenkins pipeline to an external HTTPS resource that requires client certificate. Additionally, Jenkins is behind a corporate proxy that requires authentication. After quite a bit of struggle I managed to get a…
-1
votes
2 answers

NotSerializableException occuring where it shouldn't

I've been working with Java for a few months now and I'm still fairly new to it, so any help is appreciated. I've been working on a game for a while now (based off another game) and wanted to make a level editor. I'm having trouble saving the…
Ryan
  • 727
  • 2
  • 14
  • 31
-1
votes
2 answers

What makes this class non-Serializable?

Im serializing Student class that contains an instance of Statistics class, both classes implement Serializable but the stack trace says this one is not serializable. if you have any more questions let me know. filename.txt: Stud Qu1 Qu2 Qu3 Qu4…
coderguy22296
  • 61
  • 1
  • 7
-1
votes
1 answer

java.rmi.UnmarshalException in RMI call

Please note.. the question has been cleaned up after waisting lot of EJP's time. (Sincere apologies and deeply appreciate the help extended.) We have a client-server application. The communication is RMI. We got the following exception in the…
Nayan Sonthalia
  • 237
  • 1
  • 4
  • 22
-1
votes
2 answers

java.io.NotSerializableException: javax.swing.filechooser.WindowsFileSystemView

I am trying to send a JPanel object to the server1. While doing so I get the error - java.io.NotSerializableException: javax.swing.filechooser.WindowsFileSystemView This is the code I have written. private JPanel gui; public URL url = null; public…
-1
votes
2 answers

Serializable inner-class

I was trying to figure out why my code is throwing a "java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: core.FlightOrder$FlightTicket" exception. I have class declared as: public class FlightOrder implements…
-1
votes
2 answers

Sending a non-serializable object through a Socket

I'm trying to send a few Objects around through java.net.Socket and java.net.ServerSocket by using an ObjectOutputStream and ObjectInputStream but I've come across an issue with that. The objects I'm trying to send aren't serializable. I've tried…
TheNerdyCoder
  • 184
  • 1
  • 10
-2
votes
1 answer

NotSerializableException when sending an Object

I want to create an instance , put it on a container and send it. TransferContainer container = null; ... Class aClass = container.getByteCode(); o = aClass.newInstance(); ....// Some code ... container.setInstance(o); …
user567
  • 3,712
  • 9
  • 47
  • 80
1 2 3
8
9