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
2
votes
1 answer

NotSerializableException with BasicDataSource in JNDI

I am setting up a standalone JNDI and loading a Datasource to the JNDI. DataSource I use is: org.apache.commons.dbcp.BasicDataSource The JNDI is set up as follows String detectorHost = InetAddress.getLocalHost().getHostName(); …
2
votes
1 answer

java.io.NotSerializableException - org.omnifaces.taghandler.Converter

I have an application using Primefaces 3.5 with Omnifaces 1.5 on Jboss 6, using myfaces 2.1.5 on trying to use the o:converter I am getting the follow…
Sujoy
  • 8,041
  • 3
  • 30
  • 36
2
votes
1 answer

Why did not I get NotSerializableException?

class NotSerializable {} class MyClass implements Serializable { private NotSerializable field; // class NotSerializable does not implement Serializable!! } public class Runner { public static void main(String[] args) { MyClass ob =…
Alex
  • 1,147
  • 1
  • 9
  • 17
2
votes
1 answer

Encounter NotSerializableException error when using Spring MVC NamedParameterJdbcTemplate

I'm using Spring MVC NamedParameterJdbcTemplate, when i call "userService.addAndSendAccountActivationEmail(user, request)" from controller, i got error. But if i don't use named parameter(like: private static final String ADD = "insert into…
gozizibj
  • 285
  • 1
  • 5
  • 23
2
votes
2 answers

RMI JavaFX 2 - NotSerializableException error

I'm trying to send objects using Java RMI in a JavaFX 2 project, but when the following code runs it returns a NotSerializableException. My Admin class is Serializable and so is the super class. However it seems the exception is pointing towards…
Reece Goddard
  • 23
  • 1
  • 3
2
votes
1 answer

ObjectOutput throws java.io.NotSerializableException

This is the class that's about to be serialized into a byte array. public class DummyClass implements Serializable { private static transient final long serialVersionUID = -8483859843874771619L; public String y; public…
1
vote
0 answers

How to save an object arrayList which have Pair value in file android

I want to save an arraylist of connections which have Pairs value in file but it showing NotSerializableException. I also implemented the serializable interface . i thought it occur from Pair class. If you have any solution for save these array of…
1
vote
1 answer

How can i fix this java.io.NotSerializableException: error in java?

I'm quite new to java and unsure how to fix this java.io.NotSerializableException error. I'm trying to use an add button on the GUI to add an object to an array list Then write that object to a file so I am able to read it back. Here is the code…
Shan
  • 11
  • 5
1
vote
0 answers

I'm doing a student management project in Java and get Serializable Exception errors

I am doing a basic student management app which runs in console with just 2 functions: Add student and show student list. But I get errors in Serializable Exception though I implements Serialization. My classes as below. Class Student import…
1
vote
0 answers

spark broadcast variable not serializable exception

I want to use an Rtree like https://github.com/davidmoten/rtree2 as a spark broadcast variable. However, java.io.NotSerializableException: com.github.davidmoten.rtree2.RTree it is not supported. Is there a workaround?…
Georg Heiler
  • 16,916
  • 36
  • 162
  • 292
1
vote
1 answer

Lazydatamodel NotSerializableException sublist

I implemented LazyDataModel using primefaces tutorial and facing the problem. If I return list.sublist(...) - everything works fine, but I get Exception: java.io.NotSerializableException: java.util.ArrayList$SubList. I found out that List…
1
vote
1 answer

Not able to solve Jenkins NotSerializableException error

import hudson.model.*; import hudson.AbortException; import jenkins.model.Jenkins; @NonCPS def allNodes = jenkins.model.Jenkins.instance.nodes def triggerJob = false for (String node: allNodes) { if ( node.getComputer().isOnline() &&…
1
vote
3 answers

Java NotSerializableException with custom DataPackage

Im currently working on a simple server - client structure for future projects. I decided it would be the best to create my own data-package with custom header-information such as local/public ip, a time stamp etc. The following is the class i came…
1
vote
1 answer

NotSerializableException with an object in scala hadoop

object NearestNeighbors { def runNearestNeighbors(data: RDD[Array[(LabeledPoint,Int,Int)]], kNN: Int, sampleData: Array[(LabeledPoint,Int,Int)]): Array[(String,Array[((Int,Int),Double)])] = { val…
1
vote
0 answers

Parcelable encountered IOException when providing custom listener through setArguments to Fragment

I have parent fragment that can open 3 different fragments, each of the 3 fragments can update same field in the parent fragment. So i create super simple listener : public interface RatingUpdatedListener extends Serializable{ //allow to set…
satis
  • 105
  • 2
  • 14
1 2
3
8 9