Object send using Serializable problem

My broblem here is that client send an object throw a socket and make some update in the server and send the object back to client but it seem that there is a problem in the following code :
in = new ObjectInputStream(clientSocket.getInputStream());
out = new ObjectOutputStream(clientSocket.getOutputStream());
in the clientTCP class and in connection class .. this problem that it seem that the server doesn't get the object send by the Client .. can any one help me ..
This is the code for the object to be send:
public class Msgmsg{
private String type;
private String cur1;
private String cur2;
private double value;
Msgmsg(String type,String cur1,String cur2,double value){
this.type=type;
this.cur1=cur1;
this.cur2=cur2;
this.value=value;
void setType (String type){this.type = type;}
void setCur1 (String cur1){this.cur1=cur1;}
void setCur2 (String cur2){this.cur2=cur2;}
void setValue(double value){this.value=value;}
String getType (){return type;}
String getCur1 (){return cur1;}
String getCur2 (){return cur2;}
double getValue(){return value;}
This is the code for TCPServer
import java.net.*;
import java.io.*;
public class TCPServer implements Serializable{
public static void main (String args[]){
try{
int serverPort =8080;
ServerSocket listenSocket = new ServerSocket(serverPort);
while(true){
Socket clientSocket = listenSocket.accept();
Connection c = new Connection(clientSocket);
catch (IOException e){System.out.println("listen: "+e.getMessage());}
This is the connection class
import java.net.*;
import java.io.*;
class Connection extends Thread{
ObjectInputStream in;
ObjectOutputStream out;
Socket clientSocket;
public Connection (Socket aClientSocket){
try{
clientSocket = aClientSocket;
in = new ObjectInputStream(clientSocket.getInputStream());
out = new ObjectOutputStream(clientSocket.getOutputStream());
this.start();
catch (IOException e){System.out.println("Connection: "+e.getMessage());}
public void run(){
try{
Msgmsg message =(Msgmsg) in.readObject();
if (message.getType().equals("Request")){
message.setType("Reply");
if (message.getCur1().equals("Dollar")&&
message.getCur1().equals("Dinar")){
message.setCur1("Dinar");
message.setCur2("Dollar");
double changeValue = message.getValue();
changeValue = changeValue * 71 / 100;
message.setValue(changeValue);
else
if (message.getCur1().equals("Dinar")&&
message.getCur1().equals("Dollar")){
message.setCur1("Dinar");
message.setCur2("Dollar");
double changeValue = message.getValue();
changeValue = changeValue * 100 / 71;
message.setValue(changeValue);
else {
message.setCur1("Undefined Currency");
message.setCur2("Undefined Currency");
message.setValue(0);
else{
message.setType("Undefined Message");
message.setCur1("Error Message");
message.setCur2("Error Message");
message.setValue(0);
out.writeObject(message);
out.flush();
catch(EOFException e){System.out.println("EOF: "+e.getMessage());}
catch(IOException e){System.out.println("IO "+e.getMessage());}
catch(ClassNotFoundException e){System.out.println("Class: "+e.getMessage());}
finally {
try{
clientSocket.close();
catch(IOException e){/*close failed*/}
This is the code for TCPClient
import java.net.*;
import java.io.*;
public class TCPClient implements Serializable{
public static void main (String args[]){
Msgmsg message;
Socket s = null;
ObjectInputStream in;
ObjectOutputStream out;
try{
message = new Msgmsg("Request","Dinar","Dollar",50.5);
int serverPort = 8080;
s = new Socket("localhost",serverPort);
in = new ObjectInputStream(s.getInputStream());
out = new ObjectOutputStream (s.getOutputStream());
out.writeObject(message);
out.flush();
message = (Msgmsg)in.readObject();
System.out.println("Recieved1: "+message.getType());
System.out.println("Recieved2: "+message.getCur1());
System.out.println("Recieved3: "+message.getCur2());
System.out.println("Recieved4: "+message.getValue());
catch(UnknownHostException e){System.out.println("Sock: "+e.getMessage());}
catch(EOFException e){System.out.println("EOF: "+e.getMessage());}
catch(IOException e){System.out.println("IO: "+e.getMessage());}
catch(ClassNotFoundException e){System.out.println("Class: "+e.getMessage());}
finally {
if (s!=null)
try{
s.close();
}catch (IOException e){System.out.println("Close: "+e.getMessage());}
Thanks for ur time

You need to create ObjectOutputStream first and
flush() it before creating the ObjectInputStreamwhat the difference I work these clases like another clases I have but the problem here is difference .. coz Imake tracing but it couldn't reach the following code:
in = new ObjectInputStream(s.getInputStream);
out = new ObjectOutputStream(s.getOutputStream);

Similar Messages

  • Testing Object Equality using Serialization

    Hey everyone! I was wondering if somebody could help me figure out how to compare two objects using serialization.
    I have two objects that I'm trying to compare. Both of these objects extend a common "Model" class that has a method getSerialized() that returns a serialized form of an instance, shown below:
              // Serialize the object to an array
             ByteArrayOutputStream baos = new ByteArrayOutputStream(1000);
             ObjectOutputStream oos;
              try {
                   oos = new ObjectOutputStream(baos);
                  oos.writeObject(this);
                  oos.close();
              } catch (IOException e) {
                   e.printStackTrace();
             //Deserialize array into a String array
             return baos.toByteArray();This Model class also has an equals(Model obj) method that allows for the current model object to be compared to a model object that is passed in:
            //Store both models' serialized forms into byte arrays
            byte [] thisClass = this.getSerialized();
            byte [] otherClass = obj.getSerialized();This is where things get a little funny. The byte arrays don't equal - one array is a byte larger than the other. If a byte-by-byte comparison is done, the arrays are equal for the first 15-20% and then not equal for the rest. If I deserialize the byte arrays back into Models and do a toString() on those models, I find that they are equal.
    I have a feeling there's something about the serialization process that I don't fully comprehend. Is there a way to properly implement object comparison using serialization?
    Thanks in advance!

    When you serialize an object, you also serialize the entire tree of references based on that object (except for transient variables). That tree is the complicated business you described there. Serialization stores all the objects in the tree, along with data that explains which objects refer to which other objects. Furthermore if the tree is actually a graph, and there are multiple ways to get to an object, it still only stores each object once. I don't see any reason to believe that all that relationship data would be encoded identically for a pair of trees that you deemed to be equal. And your experiment shows that indeed it isn't.

  • Retreiving more than one object from an object stream using serialization.

    I have written a number of object into a file using the object Output stream. Each object was added separately with a button event. Now when I retrieve it only one object is being displayed. the others are not displayed The code for retrieval and inserting is given below. Please do help me.
    code for inserting is as follows
    Vehicle veh1 and vehicle class implements serializable
    veh1.vehNum=tf1.getText();
              veh1.vehMake=tf2.getText();
              veh1.vehModel=tf3.getText();
              veh1.driveClass=tf4.getText();
              veh1.vehCapacity=tf5.getText();          
              FileOutputStream out = new FileOutputStream("vehicle.txt",true);
              ObjectOutputStream s = new ObjectOutputStream(out);
              s.writeObject(veh1);
    retrieval
    FileInputStream out = new FileInputStream("vehicle.txt");
              String str1,str2;
              str1=str2=" ";
              Vehicle veh=new Vehicle();
              ObjectInputStream s = new ObjectInputStream(out);
              try
              Vehicle veh1=(Vehicle)s.readObject();
              s.close();
              int i=0;
              str1=veh1.vehNum;
              str2+=str1+"\t";
              str1=veh1.vehMake;
              str2+=str1+"\t";
              str1=veh1.vehModel;
              str2+=str1+"\t";
              str1=veh1.driveClass;
              str2+=str1+"\t";
              str1=veh1.vehCapacity;
              str2+=str1+"\t\n";
              ta1.append(str2);
              catch(Exception e)
              e.printStackTrace();
    Pleas give me the code for moving through the object until it reaches the end of file

    You can read objects from the stream one by one. So, what you need is an endless loop like this:
    // Suppose you have an ObjectInputStream called objIn
    // So here is the loop which reads objects from the stream:
    Object inObj;
    while (1) {
        try {
            inObj=objIn.readObject();
            // Do something with the object we got
            parse_the_object(inObj);
        } catch (EOFException ex) {
            // The EOFException will be thrown when
            // we reached the end of the file, so here we break out
            // of our lovely infinite cycle
            break;
        } catch (Exception ex) {
            ex.printStackTrace();
            // Here you may decide what to do...
            // Probably the processing will end here, too. For now,
            // we moving on, hoping there is still something to read
    objIn.close();
    // ...

  • Lost Object[] data after serialization

    Hi all,
    I posted this problem already in the servlet forum, but now I found out that it's more a serialization problem. I hope you guys can help me!!!!
    I have a problem sending a serialized object from a java application to a servlet (inside Tomcat).
    I'm using Commons HttpClient's PostMethod to get a connection to the servlet over https. The encryption should be done automatically within HttpClient and Tomcat.
    The object container I'm sending contains a few Strings and an Object[] that is filled with Strings.
    The container i'm sending implements Serializable.
    The connection is working fine, and the object has no serialization problems but the incoming request at server-side is kind of broken.... The single Strings are the same I've set on client-side, but the Object[] is null. I tried it with directly sending the ArrayList but with the same result.
    The size of the incoming data stream is the same as it was on client side.
    The funny thing is that sending data back from server to client works perfectly fine. My Object[] goes through without any problems!
    Here is the client code I'm using:
    PostMethod method = new PostMethod(mServerUrl);
    MyContainer container = new MyContainer("Message2Server",new Object[]{"ArrayElement1"});
    ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
    ObjectOutputStream serializer = new ObjectOutputStream(byteStream);
    serializer.writeObject(container);
    serializer.flush( );
    serializer.close();
    method.setRequestHeader("Content-Type","binary/x-java-serialized");
    ByteArrayRequestEntity output = new ByteArrayRequestEntity(byteStream.toByteArray());
    method.setRequestEntity(output);
    mClient.executeMethod(method);...and here is the servlet code:
    InputStream is = request.getInputStream();
    ObjectInputStream ois = new ObjectInputStream(is);
    MyContainer out = (MyContainer) ois.readObject();
    out.getString1(); //<-- is OK!
    out.getString2(); //<-- is OK!
    out.getObjectArray(); //<-- is null!!!!!!
    out.setObjectArray(new Object[]{"Message for the Client!!!"});
    response.setContentType("binary/x-java-serialized");
    // get output stream and send it back
    OutputStream os = response.getOutputStream();
    ObjectOutputStream oos = new ObjectOutputStream(os);
    oos.writeObject(out);
    oos.flush();
    oos.close();Does anybody see a solution????
    I think it just could be two things:
    - Serialization fails for any reason?!
    - The Servlet InputStream fails?
    Thanx for any help!
    CU Jan

    This looks very useful to me. Can you tell us what
    the typo was?Considering he/she hasn't posted for 4 months, I'd doubt it.

  • A problem using serialization and/or not overwritten variables

    I have a problem while writing objects in ObjectOutputStream :
    Here is a simplified version of the program :
    class InDData implements serializable
         private Vector shapeVector = new Vector ();
         public InDData (Vector shapeV)
              this.shapeVector = shapeV;
         public int getShapeVectorSize ()
              return (this.shapeVector.size());
    class InDShape implements serializable
         private Vector points = new Vector();
    // client side
    ObjectOutputStream p = new ObjectOutputStream(new BufferedOutputStream (connection.getOutputStream()));
    InDData objectData = (InDData) vectorObjectsToBeSentThroughNetwork.remove(0);
    System.out.println(objectData.getShapeVectorSize(); //print 1
    p.writeObject(objectData);
    p.flush();
    //server side
    ObjectInputStream in = new ObjectInputStream(new BufferedInputStream (connection.getInputStream()));
    Object oTemp = in.readObject();
    if (oTemp instanceof InDData)
         InDData objectData2 = (InDData) oTemp;
         System.out.println(objectData2.getShapeVectorSize(); //print 2
    Some explanations before the main dish :)
    I am writing a client that allows you to draw a figure and send it to the network. The drawing is composed of shapes and each shape (class InDShape) is composed of points. For the drawing to be sent to the network, i add the shapeVector (== drawing) to the class named InDData (this class allows me to add some more information about the client and the object sent, not shown here) and then i write the object InDData created in the ObjectOutputStream.
    Before writing InDData to the ObjectOutputStream, i test to see if it has a good shapeVector by drawing the shapeVector at the screen. This always shows the same copy as the last drawn panel.
    We suppose that the drawing is sent to the network after each drawn shape
    (mousePressed -> mousseDragged -> mousseReleased)
    (<------------------------------- shape ------------------------------->)
    now the problem ;)
    When i start drawing, the first shape is sent through the network without any problem.
    As soon as i add a second shape to the drawing (shapeVector.size() == 2) things get weird.
    The drawing sent to the network is made only of the first shape, nothing more.
         output of program after the 2nd shape was drawn
         client print 1 : size is 2
         server print 2 : size is 1
    Alright seems like the shapeVector is truncated...
    Now i tried something else to see if the it's only the Vector which is truncated or anything else.
    After adding a second shape to the drawing, i delete the first shape of it:
         reprenstation of the shapeVector:
         ([shape1])
         ([shape1][shape2]) // added the 2nd shape
         ([shape2]) // deleted the first shape
         ([shape2][shape3]) // added a third shape. Vector sent to the network via InDData
         output of program with the vector shown above
         client print 1 : size is 2
         server print 2 : size is 1
    Additionnaly you might expect me to say that first element of shapeVector inside both class InDData (client and server) are the same, but unfortunately they are not.
    The shapeVector received by the server via InDData is the same as when i drew the first shape :((
    Here is the problem (!) :(
    I think that i have a variable that is not overwritten somewhere but i don't know because:
    objectData is overwritten each time a message is sent to the server and has the correct values inside.
    objectData2 is overwritten each time a message is received from clients.
    Sorry for the huge post, but i believe that explanations are necessary ;)
    I am using the 1.4.2 jvm (not tested on others) with Xcode (apple powerbook g4 12").
    Thank you all :)

    Update :)
    In my way of making my program "simple" i forgot an important point in the client side :
    // client side
    ObjectOutputStream p = new ObjectOutputStream(new BufferedOutputStream (connection.getOutputStream()));
    while (connectionNotEnded)
         synchronized (waitingVector)
              try
                   waitingVector.wait();     // the only purpose of the Vector is to make the thread wait until it is interrupted to send InDData
              catch (InterruptedException ie)
                   System.out.println("Thread interrupted");
         InDData objectData = (InDData) vectorObjectsToBeSentThroughNetwork.remove(0);
         System.out.println(objectData.getShapeVectorSize(); //print 1
         p.writeObject(objectData);
         p.flush();
    I need it to explain the solution of my problem.
    when I am creating a client, a thread is created with the above code. It creates the ObjectOutputStream and then wait patiently until said to proceed (Thread.interrupted()).
    I do not close the ObjectOutputStream during the program running time.
    So whenever I am writing an object to the stream, the stream "sees" if the object was created before. I suppose that the ObjectOutputStream has a kind of memory for past written objects.
    So when i send the first InDData, the ObjectOutputStream's memory is "empty", thus the correct sending (and serialization) of InDData.
    But whenever I try to write another object of the same type InDData containing approximately the same data (shapeVector), the ObjectOutputStream calls its "memory" and tries to find it in the past written objects. And finds it in my case ! That's why whatever i put in the shapeVector, it ends by being the first shapeVector sent through the network. (I assume that the recall memory process lacks of "precision" in identifying the memory's object or that the process to give a unique serial to the written object in the ObjectOutputStream "memory" is limited).
    I tried the different ObjectOutputStream writing methods :
    instead of p.writeObject(objectData) i put p.writeUnshared(objectData).
    But as it is said in the docs : " While writing an object via writeUnshared does not in itself guarantee a unique reference to the object when it is deserialized, it allows a single object to be defined multiple times in a stream, so that multiple calls to readUnshared by the receiver will not conflict. Note that the rules described above only apply to the base-level object written with writeUnshared, and not to any transitively referenced sub-objects in the object graph to be serialized."
    And that is exactly my case !
    So i had to take it to the next level :)
    instead of trying to make each written object unique, i simply reset the stream each time it is flushed. That allows me to keep the stream opened and as fresh as new ;) I think the cost of resetting the stream is higher than writeUnshared but lower than closing and creating a new stream each time otherwise it would not have been implemented ;)
    Here is the final code for the client side, the server side remains unchanged :
    // client side
    ObjectOutputStream p = new ObjectOutputStream(new BufferedOutputStream (connection.getOutputStream()));
    while (connectionNotEnded)
         synchronized (waitingVector)
              try
                   waitingVector.wait();     // the only purpose of the Vector is to make the thread wait until it is interrupted to send InDData
              catch (InterruptedException ie)
                   System.out.println("Thread interrupted");
         InDData objectData = (InDData) vectorObjectsToBeSentThroughNetwork.remove(0);
         System.out.println(objectData.getShapeVectorSize(); //print 1
         p.writeObject(objectData);
         p.flush();
         p.reset();
    And that solves my problem :)

  • I just installed Adobe InDesign CC 2014 and now I can't scale objects/type using Command+Shift Key. Has anyone else had this problem and if so, any solution?

    I just installed Adobe InDesign CC 2014 and now I can't scale objects/type using Command+Shift Key. Has anyone else had this problem and if so, any solution?

    There is a conflict with third party software or your system keyboard shortcuts. Lately, there have been many postings about conflicts with Chrome extensions so check there first.
    It's not a new problem. I wrote about it on InDesignSecrets.com in 2006:
    The Missing Keystrokes Mystery | InDesignSecrets

  • Texting problem: Please re-send using a valid 10-digit number

    I've been having problems texting ever since I've upgraded to the latest firmware. When I try to text a person from my contacts, I get a text right back from 1 (121)611-611 : Error Invalid Number. Please re-send using a valid 10 digit mobile number or valid short code.
    I KNOW my contacts have 10 digits. I've double and triple checked that. The only way I can text is by going into the text window, open a new text, enter the 10 digit number and then write the message. It goes through fine. It even converts the 10 digit number to my contacts name when I do it like that and it sends.
    I also have this issue when I reply to texts! I try to reply but it doesn't go through.
    Has anyone experienced this and/or know how to fix this? I've tried a Restore, but it keeps happening.

    I'm not sure about your issues with Safari and such.
    On GSM-based phones, like the iPhone, you can store and use phone numbers in the international format. eg. +12025551212, +61411123456. That's with the + sign. The network should realise it is in the international format and handle it without a problem. Storing numbers this way allows people to travel to other countries and still make calls to people from the address book and not worry about the local international access code.
    Usually SMS messages are received with this form. Try sending an SMS using a number in this form.

  • Simple Serialization Problem

    I'm creating a server/client text based game where a user is sent text and serialized information from their personal character class. However, I don't know what type of Reader/Writer I should use to accept both serialized byte code and strings. Is there a way I can use BufferedReader for strings and temporarily pause the input stream to send it a serialized class using ObjectInputStream?
    --dorky
    Edited by: dorkydude666 on Mar 25, 2009 8:39 AM

    As far as I know, there is no write String method for ObjectOutputStream. There's writeChars and writeObject. writeChars changes "Hello" to "H e l l o" and writeObject would be annoying to use when sending plain integers. However, I have got a small prototype working where I just cast the object to String and parseInt for the value. Now I'm getting problems sending my serializable objects over the socket. It sends and receives without error, but it's only sending the first instance of the class. It's confusing, so here's my debugging output:
    Server:
    user:1 name:dorkydude hp:100
    user:1 name:dorkydude hp:80
    Client:
    user:1 name:dorkydude hp:100
    user:1 name:dorkydude hp:100
    The server is updating the class, but not sending the updated version. The updated class is sent as the last line of code in my program so it's not a matter of sending it too early. :\
    --dorky                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Help Needed: Serialization Problem

    I've got a problem with serialization, which is better illustrated with an example (slightly modified version of example in Tech Tips, February 29, 2000, Serialization in the Real World. The problem is that comparing serialized static final fields doesn't return correct result. Any help on how to fix this problem would be greatly appreciated. Thanks in advance. Here is the code:
    ====================
    import java.io.*;
    class Gender implements Serializable {
    String val;
    private Gender(String v) {
    val = v;
    public static final Gender male = new Gender("male");
    public static final Gender female = new Gender("female");
    public String toString() {
    return val;
    public class Person implements Serializable {
    public String firstName;
    public String lastName;
    private String password;
    transient Thread worker;
    public Gender gender;
    public Person(String firstName,
    String lastName,
    String password,
    Gender gender) {
    this.firstName = firstName;
    this.lastName = lastName;
    this.password = password;
    this.gender = gender;
    public boolean isMale() {
    return gender == Gender.male;
    public boolean isFemale() {
    return gender == Gender.female;
    public String toString() {
    return new String(firstName + " " + lastName);
    public static void main(String [] args) {
    Person p = new Person("Fred", "Wesley", "cantguessthis", Gender.male);
    //-NOTE: there ia no problem with this check
    if (p.isMale()) {
    System.out.println("a male: " + p);
    } else if (p.isFemale()) {
    System.out.println("a female: " + p);
    } else System.out.println("strange");
    class WritePerson {
    public static void main(String [] args) {
    Person p = new Person("Fred", "Wesley", "cantguessthis", Gender.male);
    ObjectOutputStream oos = null;
    try {
    oos = new ObjectOutputStream(
    new FileOutputStream(
    "Person.ser"));
    oos.writeObject(p);
    catch (Exception e) {
    e.printStackTrace();
    finally {
    if (oos != null) {
    try {oos.flush();}
    catch (IOException ioe) {}
    try {oos.close();}
    catch (IOException ioe) {}
    class ReadPerson {
    public static void main(String [] args) {
    ObjectInputStream ois = null;
    try {
    ois = new ObjectInputStream(
    new FileInputStream(
    "Person.ser"));
    Person p = (Person)ois.readObject();
    //-NOTE: this is the problem: the check returns false
    if (p.isMale()) {
    System.out.println("a male: " + p);
    } else if (p.isFemale()) {
    System.out.println("a female " + p);
    } else System.out.println("strange");
    catch (Exception e) {
    e.printStackTrace();
    finally {
    if (ois != null) {
    try {ois.close();}
    catch (IOException ioe) {}
    }

    The Gender class implements a type-safe enumeration, but its implementation needs to be improved to ensure that re-creating a Gender object via deserialization doesn't create new objects but uses the existing objects. See this article for details on how that's done:
    http://developer.java.sun.com/developer/Books/shiftintojava/page1.html

  • All session objects should be serializable to replicate error.

    Hi All,
    Having 'EmployeeBean' and it is having below properties with getters and setters methods
    private long emp_id;
    private String emp_name;
    private java.sql.Timestamp date_of_join;
    private boolean isActive;
    private int dept_no;
    Adding multiple employees(creating multiple EmployeeBean) into an ArrayList and storing this ArrayList into a Session object. This is working fine but when I move this code to production(cluster environment) it is throwing below error
    <Aug 23, 2011 2:15:40 PM EDT> <Error> <Cluster> <BEA-000126> <All session objects should be serializable to replicate. Check the objects in your session. Failed to replicate non-serializable object.
    java.rmi.MarshalException: failed to marshal update(Lweblogic.cluster.replication.ROID;ILjava.io.Serializable;Ljava.lang.Object;); nested exception is:
         java.io.NotSerializableException: my.company.beans.EmployeeBean
         at weblogic.rjvm.BasicOutboundRequest.marshalArgs(BasicOutboundRequest.java:90)
         at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:221)
         at weblogic.cluster.replication.ReplicationManager_1032_WLStub.update(Unknown Source)
         at sun.reflect.GeneratedMethodAccessor163.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         Truncated. see log file for complete stacktrace
    Caused By: java.io.NotSerializableException: my.company.beans.EmployeeBean
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
         at java.util.ArrayList.writeObject(ArrayList.java:570)
         at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         Truncated. see log file for complete stacktrace
    Can someone please let me know, why I'm getting this error? The EmployeeBean should implement serializable? Is there any problems/cons to implement serializable?
    Having other bean(LoginBean) and I'm keeping this bean into session and it doesn't implement serializable, not getting any error for this bean(LoginBean). Only difference is LoginBean is not added to ArrayList.
    Why it is throwing error for EmployeeBean and not for LoginBean??
    Thanks in advance.
    Regards,
    Sharath.

    The EmployeeBean should implement serializable? - Yep Is there any problems/cons to implement serializable? - No
    Just add java.io.Serializable to the EmployeeBean, for example,
    public class EmployeeBean implements Serializable {
    }For LoginBean you have probably, configured to be in the session, by using faces-config.xml.
    In the case of EmployeeBean (or the object graph it is part of) have you used HttpSession.setAttribute(...)?
    Note that setAtttibute(...) is the trigger for an application server to replicate the object.
    In this case all objects in the object graph have to be serializable.
    Typically, objects should be Serializable when they are part of the session and you are using a clustered environment.

  • Serialization problem with FlashPlayer 10.1

    Hi,
    here is a message that I have post in the AS3 section (http://forums.adobe.com/message/2938096), but someone gave the hint that this section should be more appropriate.
    A call in remote method, using amf/BlazeDS, is failing for the following reason :
    "The expected argument types are  (int, myPackage.MyClassVO[])  but the supplied types were (java.lang.Double, java.lang.Object[]) and converted to (java.lang.Integer, null).
    Cannot convert typeflex.messaging.io.amf.ASObject with remote type specified as 'null' toan instance of class myPackage.MyClassVO"
    So the serialization is failing.
    MyClassVO have only int variables, so nothing fancy.
    The point is that it works perfectly with previous versions of Flash, except 10.1
    So the definitions of the VOs are not the problem.
    Does any change have been done in the new flash player, with the serialization ? Does someone have also experience serialization problems with this new flash player ?
    Thanks for any help.
    M.
    Environment : Windows 32bits (but happens on Mac OS as well)
    Flash version : WIN 10,1,53,64
    Browser : Firefox, Opera, IE... they all have the problem

    Hi,
    by digging more and more, it appears that the problem is really on flash side.
    This error appears on java side :
    "Cannot convert type flex.messaging.io.amf.ASObject with remote type specified as 'null' to an instance of class myPackage.MyClassVO
    flex.messaging.io.amf.translator.decoder.DecoderFactory.invalidType(DecoderFact ory.java:369)"
    So after a look on the function invalidType in DecoderFactory, it apprears that
    object.getClass().getName();
    returns "flex.messaging.io.amf.ASObject" instead of "myPackage.MyClassVO"
    So Java don't recieve the correct type MyClassVO, but ASObject.
    And that only in FlashPlayer 10.1, but not FlashPayer 9 or FlashPlayer 10, where Java recieve the correct type, MyClassVO.
    Any help will be gladly appreciated, I'm running out of idea !
    Thanks !
    M.

  • Mail stuck "cannot send using server"....

    but the real issue is that the list of addressees is so long that I cannot see the buttons at the bottom, so I cannot click them to dismiss the error and try something else. Only way out of Mail is to force quit (menus are unresponsive) and if I relaunch Mail the email comes up again after a short time with the same error and again no way to dismiss it.
    Once I get back to Mail without the error I'll be able to send using the correct SMTP server, but I can't get past this point.
    Thank you in advance for your help.
    Mac OS X 10.5.8, iMac Core Duo

    hey, i think i know the problem.
    i use my mail sometimes to send to long lists of emails for my company.  (better solution is use a mailing list service like constant contact or mail chimp if you do this on a regular basis).
    anyway, some smtp's limit the number of people you can send to at a time.  i don't know what this number is, and i notice that it's different depending on which server i'm using (like hotmail i think let's me send to more)
    in any case, the best thing to do is copy the whole list of addressee's to text edit or whatever, and break it up into smaller batches so that you are not sending to more than 50-100 people at a time (you have to experiment).
    it's annoying that it doesn't tell you what the problem is, but it happened to me before and this was the solution.
    let me know if this was your problem or not.

  • Runtime error 429, activeX component cant create object while using netbet pro on windows 7 & 8.1 HELP!!!

    runtime error 429, activeX component cant create object while using netbet pro
    does anyone know what I could do to fix this problem??? netbet pro was't available for a while then it's back but has yet to run

    What's netbet pro?
    I'd recommend asking questions about third party applications in the vendor's forum, not a Microsoft forum meant for admin scripting.
    EDIT: Ah, some gambling website...
    Don't retire TechNet! -
    (Don't give up yet - 12,950+ strong and growing)

  • Keep getting an error message when trying to send some texts to valid numbers, "Error Invalid Number. Please re-send using a valid 10 digit mobile number or valid short code.

    Does anyone know why I keep getting an error  message, "Error invalid number. Please re-send using a valid 10 digit mobile number or valid short code.  The numbers I'm texting to, are valid numbers.

    Did you ever get resolution to this problem?
    My coworker has the identical issue, including the number (+1 (1)(216)116-11) in the error reply.

  • Sender Channel Connection problem

    Hi ,
    I am getting the following error in the Adapter monitoring under RWB.
    <b> Error: ConnectException: Connection refused: connect
    - 2007-05-04 09:41:42 CEST: Processing started</b>
    This happen all out of a sudden. I changed nothing in the Sender CC.
    I also added a "\" towards the end of the directory access path in the sender CC.
    What do you think is the problem ??

    HI,
    Are you using FTP as sender?
    This problem is either caused by incorrect firewall / packet filter settings or an incorrect configuration of the FTP server. Also make sure that you have correctly specified the host name / IP address and port of the FTP server.
    Changing the connection type from 'active' to 'passive' (or vice versa) might additionally help to work around the incorrect firewall configuration
    see SAP Note No:821267
    Regards
    Chilla

Maybe you are looking for

  • Error when trying to reopen a page in Jdev after making changes

    Message BME-99003: An error occurred, so processing could not continue. Cause The application has tried to de-reference an invalid pointer. This exception should have been dealt with programmatically. The current activity may fail and the system may

  • Hyperlink to a non-pdf file

    I have a number of pdf files as pages in an ASP.NET website.<br />I want to include hyperlinks to other pages that are not pdf files.<br />I get the message "Could not open the file <file name>" which means that acrobat tries to open the file and not

  • ARCHIV_CREATE_DIALOG_META FM not working from apllication server?

    Hi everyone, So, earlier I upload photos from my desktop and it worked. But now I have to upload photos from application server, so but ARCHIV_CREATE_DIALOG_META didn't upload the JPG file. file = ' /server/Photos/HRDEV/picture.jpg' . CALL FUNCTION '

  • The Recommended pages for updating software for my mac are no longer maintained by Apple. Any thoughts?

    Although in my System information it lists my Mac as running OS X 10.9.5, it was not the case. My system was running browsers in an older version. When I asked for support, I was pointed to Recommended Articles about updating and installing software

  • Shutdown time controlled

    Hello guys, so far I shutdown my machine via shutdown -h +time when I want to terminate it time controlled. But often there are still some programs running like firefox. Is there any program-friendly method to shutdown? shutdown -h kills all apps ins