Java.io.NotSerializableException: java.util.Hashtable$KeySet

Hi,
i have a
    private Hashtable<IDInterface, String> globalPeerFarmMap_=new Hashtable<IDInterface,String>();    in one class and it can be serialized OK.
In another class, however i have a     private Hashtable<IDInterface, PeerBasic> thesePeers_=new Hashtable<IDInterface, PeerBasic>();     and a java.io.NotSerializableException is thrown - on the KeySet it seems.
However, ID (which implements IDInterface) is serializable (and all its fields are serializable) and it works in the first case.
Any ideas? Didn't want to be confusing, but if simplistic i will post some code.
Thanks

Found it. The compiler didn't provice much info. Somewhere inside PeerBasic, i call keySet on a Hashtable. I don't understand why this cause a problem.

Similar Messages

  • Help needed to solve "java.io.NotSerializableException: java.util.Vector$1"

    hi to all,
    i am using a session less bean A to querry a Entity Bean B , which inturns calls another EntityBean C ,
    finally a ' find' method is invoked on the EntityBean C, In this a vector is created which holds 3 different vectors at different indexes, now the problem i am facing is that when Enity Bean B is returning the final vector to the A , it's firing out a errors that :-
    TRANSACTION COULD NOT BE COMPLETED: RemoteException occurred in server thread;
    ested exception is:
    java.rmi.RemoteException: null; nested exception is:
    java.rmi.ServerException: RemoteException occurred in server thread; ne
    ted exception is:
    java.rmi.RemoteException: null; nested exception is:
    java.io.NotSerializableException: java.util.Vector$1
    java.rmi.ServerException: RemoteException occurred in server thread; nested exc
    ption is:
    java.rmi.RemoteException: null; nested exception is:
    java.rmi.ServerException: RemoteException occurred in server thread; ne
    ted exception is:
    java.rmi.RemoteException: null; nested exception is:
    java.io.NotSerializableException: java.util.Vector$1
    java.rmi.RemoteException: null; nested exception is:
    java.rmi.ServerException: RemoteException occurred in server thread; ne
    ted exception is:
    java.rmi.RemoteException: null; nested exception is:
    java.io.NotSerializableException: java.util.Vector$1
    java.rmi.ServerException: RemoteException occurred in server thread; nested exc
    ption is:
    java.rmi.RemoteException: null; nested exception is:
    java.io.NotSerializableException: java.util.Vector$1
    java.rmi.RemoteException: null; nested exception is:
    java.io.NotSerializableException: java.util.Vector$1
    java.io.NotSerializableException: java.util.Vector$1
    <<no stack trace available>>
    ur any help would be highly appricated to solve out this prob.
    If i try to iterate through this vector it's gives IOR:0232003x343242344asdsd................................................blabla....................
    thanxs in adavance
    Deepak

    Hi I think you are using the method elements() in a remote method.
    This method can't be Serializable!! Because it returns an Interface. Interfaces are never Serializable.
    Regards,
    Peter

  • Java.io.NotSerializableException: java.util.RandomAccessSubList

    Hi,
    I'm testing a software but I receive this error message:
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
            java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: java.util.RandomAccessSubList
            at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:173)
            at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:178)
            at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132)
            at $Proxy7.getDataPackage(Unknown Source)
            at gaia.dpct.cu3.avu.gsr.server.GsrSourceIdServerRmiImpl.getDataPackage(GsrSourceIdServerRmiImpl.java:73)
            at gaia.dpct.cu3.avu.gsr.reader.GsrSystemRowReaderStrategy.loadData(GsrSystemRowReaderStrategy.java:52)
            at gaia.dpct.pfs.infraimpl.PFSGenericPersistenceManager.loadData(PFSGenericPersistenceManager.java:455)
            at gaia.dpct.pfs.infraimpl.PFSPersistenceManagerAdpaterImpl.loadData(PFSPersistenceManagerAdpaterImpl.java:318)
            at gaia.cu1.tools.infraimpl.GenericDataTrain.run(GenericDataTrain.java:546)
            at gaia.dpct.pfs.infraimpl.PFSDataTrainAdapterImpl.run(PFSDataTrainAdapterImpl.java:166)
            at gaia.dpct.pfs.nodes.TrainManager$TrainExecution.run(TrainManager.java:735)
            at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
            at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
            at java.util.concurrent.FutureTask.run(FutureTask.java:138)
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
            at java.lang.Thread.run(Thread.java:619)
    Caused by: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: java.util.RandomAccessSubList
            at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1333)
            at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
            at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
            at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
            at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
            at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
            at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:306)
            at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:155)
            ... 16 more
    Caused by: java.io.NotSerializableException: java.util.RandomAccessSubList
            at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
            at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
            at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
            at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
            at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
            at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
            at sun.rmi.server.UnicastRef.marshalValue(UnicastRef.java:274)
            at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:315)
            at sun.rmi.transport.Transport$1.run(Transport.java:159)
            at java.security.AccessController.doPrivileged(Native Method)
            at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
            at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
            at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
            at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
            ... 3 moreI checked all the code but the objects I use are instantiated from Serializable classes.
    I read something about "java.util.RandomAccessSubList" but what is this? I use List and Map.
    Are there problem with the List and the Map I use?
    Could someone help me?
    Thanks, bye bye.

    You have a List member whose value is derived from List.subList(), which is implemented by the class named in the exception, which isn't serializable. Change it to
    subList = new LinkedList<T>(list.subList());where T is whatever it should be.
    You should do this anyway, as the subList is merely a view of the original list, so if it was serializable it would take the entire original list with it.

  • Java.io.NotSerializableException: java.util.Vector$1

    I am using Java 2 in the API it says that the Vector implements Serializable but I am getting an exception java.io.NotSerializableException: java.util.Vector$1 I don't know why please help.
    Thank you
    palanisr

    Although Vectors are Serializable that doesn't mean that the contents of a Vector are necessarily Serializable. What are the contents of your Vector? Are they objects of a Serializable class? If not that is your problem. The attached sample code demonstrates the problem of serializing a Vector that contains non-serializable data. If you make the Employee class Serializable the code works.
    import java.util.*;
    import java.io.*;
    public class Serialize
    public static void main(String args[])
      ObjectOutputStream oos = null;
      FileOutputStream fos = null;
      Vector v = new Vector();
      v.add(new Employee("Smith","John"));
      v.add(new Employee("Jones","Albert"));
      try
       fos = new FileOutputStream("vector.ser");
       oos = new ObjectOutputStream(fos);
       oos.writeObject(v);
      catch(FileNotFoundException fnfe)
       fnfe.printStackTrace();
      catch(IOException ioe)
       ioe.printStackTrace();
      finally
       try
        if (oos != null)
         oos.close();
       catch(IOException ioe)
       try
        if (fos != null)
         fos.close();
       catch(IOException ioe)
    class Employee //implements Serializable
    private String lastName;
    private String firstName;
    public Employee(String lastName, String firstName)
      this.lastName = lastName;
      this.firstName = firstName;
    }

  • Java.io.NotSerializableException: java.awt.BasicStroke - really confusing

    I have a class Box which has two member Size and Location, both Serializable.
    Then I have several classes (e.g. Node) which extend Box.
    None of all the classes (Box, Size, Location and all extensions of Box e.g. Node) use BasicStroke. I commented out the import of BasicStroke in all classes that are Serializable, so it cannot be used anywhere.
    The problem is I use drag and drop, and when Box is also Serializable I get the following error when trying to drop:
    java.io.NotSerializableException: java.awt.BasicStroke
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:391)
         at java.util.Vector.writeObject(Vector.java:1018)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
         at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
         at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
         at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
         at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
         at sun.awt.datatransfer.TransferableProxy.getTransferData(TransferableProxy.java:66)
         at java.awt.dnd.DropTargetContext$TransferableProxy.getTransferData(DropTargetContext.java:359)
         at kfotobook.kgui.KPageViewer.getFlavorData(KPageViewer.java:767)
         at kfotobook.kgui.KPageViewer.getFlavorData(KPageViewer.java:750)
         at kfotobook.kgui.KPageViewer.drop(KPageViewer.java:791)
         at java.awt.dnd.DropTarget.drop(DropTarget.java:430)
         at sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(SunDropTargetContextPeer.java:500)
         at sun.awt.dnd.SunDropTargetContextPeer.access$800(SunDropTargetContextPeer.java:53)
         at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEvent(SunDropTargetContextPeer.java:812)
         at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(SunDropTargetContextPeer.java:736)
         at sun.awt.dnd.SunDropTargetEvent.dispatch(SunDropTargetEvent.java:29)
         at java.awt.Component.dispatchEventImpl(Component.java:3826)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processDropTargetEvent(Container.java:3963)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3817)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1774)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    I do not know how to better describe the error, because I have no clue why BasicStrokes is tried to serialize at all. I am really confused, but perhaps somebody has seen something similar and can give a hint.
    Message was edited by:
    kudi

    Thanks for the hint. Actually I must say once more that I was too tired that I have overseen a memeber field because of bad code layout :-( I better went to sleep...
    But there is still something confusing, that is also the reason why I did not search for the fields in the right class.
    So I have a class Box and a class Node which extends Box. Node is the one which contains the evil AWT references. When I declare only Node as Serializable, it works. But when I also declare the super class Box as Serializable the error occured.
    In my opinion a Serializable sub class with a super class which does not implement Serializable does not make sence, but as an accident I did it. What is the semantic in such a case? (At least I know it could not serialize the sub class as expected...)
    Message was edited by:
    kudi

  • Java.io.NotSerializableException: java.awt.AWTEventMulticaster

    I have an Applet. When I try to use the "print" feature on IE to print out the applet. I'm getting this Exception. java.io.NotSerializableException: java.awt.AWTEventMulticaster
    What should I do?
    Andy

    please help!!

  • Java.io.NotSerializableException in WL6

    All,
              I have a servlet calling a user/group manager stateless session bean.
              The same code works well in WL5.1.0.
              Recently I migrated to WL6 and found there is a serialization problem.
              Rebuild the EJB jar with WL6 ejb
              compiler did not solve the problem. Here is the detail:
              In the remote interface I have a method called assignGroups().
              public interface InfUserGroupManager extends EJBObject {
              public void assignGroups(InfIIPSession session, InfDBObjectPK userPk,
              Collection groupIds)
              throws RemoteException, InfInsufficientPrivilegeException;
              In a servlet I have code like this:
              InfUserGroupManager mgr = ....; // Gets a reference to InfUserGroupManager
              stateless session bean.
              HashMap groups = .....; // Both keys and values are java.lang.Integer
              objects.
              Collection assignedGroups = groups.values();
              mgr.assignGroups(iipSession, userPk, assignedGroups);
              java.util.HashMap and java.lang.Integer are both serializable. However, when
              trying to invoke the
              assignGroups() method on the InfUserGroupManager object will raise
              exception.
              javax.servlet.ServletException: failed to marshal
              public abstract void
              com.informatica.security.manager.InfUserGroupManager.assignGroups
              (com.informatica.session.InfIIPSession,com.informatica.repository.InfDBObjec
              tPK,java.util.Collection)
              throws
              java.rmi.RemoteException,com.informatica.util.InfInsufficientPrivilegeExcept
              ion;
              nested exception is:
              java.io.NotSerializableException: java.util.HashMap$2
              at
              com.informatica.viewer.portal.servlets.commands.InfUserCmd.assignGroups(InfU
              serCmd.java:168)
              at
              com.informatica.viewer.portal.servlets.commands.InfUserCmd.saveModel(InfUser
              Cmd.java:132)
              at
              com.informatica.servlet.command.InfAbstractMultiFormCommand.execute(InfAbstr
              actMultiFormCommand.java:100)
              at
              com.informatica.servlet.InfCommandServlet.processRequest(InfCommandServlet.j
              ava:89)
              at
              com.informatica.servlet.InfCommandServlet.doPost(InfCommandServlet.java:67)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
              at
              weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
              :208)
              at
              weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
              ntext.java:1127)
              at
              weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
              :1529)
              at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              

    We are getting this same error. Was any resolution found?
    "Steve Rolls" <[email protected]> wrote in message
    news:[email protected]..
    When binding non-serializable objects into the JNDI tree with WL6 + SP1,
    a java.io.NotSerializableException is thrown. This is in a non-cluster
    environment and the context's replicate bindings flag is set to false.
    Here is the WL portion of the exception's stack trace
    at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
    at java.util.Hashtable.writeObject(Hashtable.java:757)
    at java.lang.reflect.Method.invoke(Native Method)
    atjava.io.ObjectOutputStream.invokeObjectWriter(ObjectOutputStream.java:1878)
    at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1210)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
    atweblogic.rmi.internal.CBVOutputStream.writeObjectInternal(CBVOutputStream.ja
    va:220)
    atweblogic.rmi.internal.CBVOutputStream.writeObject(CBVOutputStream.java:213)
    atweblogic.rmi.internal.CBVOutputStream.writeObject(CBVOutputStream.java:190)
    at weblogic.rmi.internal.ObjectIO.writeObject(ObjectIO.java:19)
    atweblogic.rmi.internal.BasicRemoteRef.marshalArgs(BasicRemoteRef.java:121)
    atweblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
    :246)
    atweblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java
    :225)
    atweblogic.jndi.internal.ServerNamingNode_WLStub.bind(ServerNamingNode_WLStub.
    java:436)
    at weblogic.jndi.internal.WLContextImpl.bind(WLContextImpl.java:337)
    at javax.naming.InitialContext.bind(InitialContext.java:358)
    Is there some new setting in WL6 that controls this bevavior or is this abug?
    >
    thanks,
    Steve

  • Thread unserialized exception: NotSerializableException: java.lang.Thread

    hello experts,
    i have this exception coming; seems to be coming from some thread but i removed all the threads from my code, i thought its because of some object which is still unserialized, i am not sure whether this is because of one unserialized object or its because of more reasons, please have a look:
    Exception in client main: java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
         java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: java.lang.Thread
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
         java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: java.lang.Thread
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:173)
         at BallServerImpl_Stub.getAllBallProxies(Unknown Source)
         at CopyOfManyMovingBalls.<init>(CopyOfManyMovingBalls.java:80)
         at CopyOfManyMovingBalls$2.run(CopyOfManyMovingBalls.java:294)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Caused by: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException: java.lang.Thread
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1333)
         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
         at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
         at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:306)
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:155)
         ... 11 more
    this is coming  when i m accessing this method:
    class BallServerImpl extends UnicastRemoteObject
    implements BallServer
    * @return an enumeration of all Balls as proxy objects
    public Ball[] getAllBallProxies() throws java.rmi.RemoteException
         Ball[] locations1 = new Ball[hash.size()];
    java.util.Enumeration iter = hash.elements();
    int idx = 0;
    while (iter.hasMoreElements())
         BallImpl impl = (BallImpl)iter.nextElement();
    locations1[idx++] = new BallProxy(impl);
    return locations1;
    why this function is running fine when i m calling this from client unlike getAllBallProxies() nevertheless both are returning the same thing:
    * @return an enumeration of all Balls as remote references
    public Ball[] getAllBalls()
         Ball[] locations = new Ball[hash.size()];
    java.util.Enumeration iter = hash.elements();
    int idx = 0;
    while (iter.hasMoreElements())
    locations[idx++] = (Ball)iter.nextElement();
    return locations;
    the proxy Class:
    * The Proxybouncing ball.
    public class BallProxy implements Serializable,Ball {
    * The Real bouncing ball.
    public class BallImpl extends UnicastRemoteObject implements IBallRemote,Serializable
    *load of thanks as this is "SHOW STOPPER",
    jibbylala*
    Edited by: 805185 on Oct 25, 2010 8:33 PM
    Edited by: 805185 on Oct 25, 2010 8:39 PM
    Edited by: 805185 on Oct 25, 2010 9:21 PM
    Edited by: 805185 on Oct 25, 2010 9:25 PM
    Edited by: 805185 on Oct 25, 2010 9:27 PM
    Edited by: 805185 on Oct 25, 2010 9:46 PM

    that there was some thread there in BallProxy but i removed all from them and now testingIf you don't post the code people ask to see, you may never get a useful answer here.
    P.S i didn't know that threads are not SerializedThe Thread class is not Serializable. Precision please.
    Now i m updating the code, i needed the confirmationConfirmation of what?
    and now trying to avoid them.Them?
    But what if i need them.Them?
    Please make the effort to express yourself clearly. You've already been told you're not making much sense and you haven't done anything about it.
    how can we make serialized?The concept of serializing a Thread makes no sense whatsoever. You don't want to do it. You don't need to do it. You can't do it. It wouldn't work if you could do it.
    Somewhere or other you have a class member that is a reference to a Thread. Remove it or make it transient. If you post the code somebody may help you. If you don't, nobody can possibly do that.

  • Java.io.NotSerializableException

    I am running iplanet ias 6.0 sp3 with web server 6.0 sp1. I
    successfully deployed an ear file that contains the war and the jar to
    the APPS dir. The session ejbs and the entity ejbs are packed into the
    jar file which are deployed with the ear.
    I have two piece of testing code. One is a standalone java program.
    The other one is a jsp page together with the jsp bean which are packed
    into the war file in the ear. The jsp bean code and the standalone
    program are doing the same thing. They call a session ejb which calls an
    entity bean.
    I have made 2 experiments
    1> Start server, run the standalone test, got the correct result.
    Then run the jsp from the browser, got the correct result.
    2> Start server, run the jsp from the browser, fail to get the
    result. run the standalone test, fail to get the result
    The paten is very consistent. The code and the error msg for test 2 are
    attached. Could any one tell me what might cause the problem in the
    second test and how to resolve the it ?
    Thank in advance
    Xiao
    When the test fails, I got the following error msg from the console.
    [10/Nov/2001 12:08:08:3] info: --------------------------------------
    [10/Nov/2001 12:08:11:0] error: EBFP-serialize: error during
    serialization of me
    thod, exception = java.io.NotSerializableException: java.util.Vector$1
    java.io.NotSerializableException: java.util.Vector$1
    at
    java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:845)
    at
    java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:342)
    at
    java.io.ObjectOutputStream.outputArray(ObjectOutputStream.java:811)
    at
    java.io.ObjectOutputStream.checkSubstitutableSpecialClasses(ObjectOut
    putStream.java:432)
    at
    java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:337)
    at
    java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:
    1567)
    at
    java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java
    :453)
    at
    java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:911)
    at
    java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:342)
    at com.kivasoft.ebfp.FPSerializable.serialize(Unknown Source)
    at com.kivasoft.thread.ThreadBasic.run(Native Method)
    at java.lang.Thread.run(Thread.java:479)
    [10/Nov/2001 12:08:11:0] warning: EB-invalidate_delegate: instance
    com.plateausy
    [email protected] threw
    an unche
    cked or system exception, ex = ElmsUncheckedException:
    getHolidayProfileHolidays()
    Nested stack traces:
    java.rmi.ServerException: RemoteException occurred in server thread;
    nested exce
    ption is:
    java.rmi.ConnectIOException: <mapped>
    java.rmi.ConnectIOException: <mapped>
    <<no stack trace available>>
    [10/Nov/2001 12:08:11:0] error: Exception Stack Trace:
    ElmsUncheckedException:
    getHolidayProfileHolidays()
    Nested stack traces:
    java.rmi.ServerException: RemoteException occurred in server thread;
    nested exce
    ption is:
    java.rmi.ConnectIOException: <mapped>
    java.rmi.ConnectIOException: <mapped>
    <<no stack trace available>>
    at
    com.plateausystems.elms.bo.holidayprofile.ejb.HolidayProfileManagerBe
    an.getHolidayProfileHolidays(Unknown Source)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    com.plateausystems.elms.bo.holidayprofile.ejb.ejb_skel_com_plateausys
    tems_elms_bo_holidayprofile_ejb_HolidayProfileManagerBean.getHolidayProfileHolid
    ays(ejb_skel_com_plateausystems_elms_bo_holidayprofile_ejb_HolidayProfileManager
    Bean.java:207)
    at
    com.plateausystems.elms.bo.holidayprofile.ejb.ejb_kcp_skel_HolidayPro
    fileManager.getHolidayProfileHolidays__seq_com_plateausystems_elms_bo_holidaypro
    __13918743(ejb_kcp_skel_HolidayProfileManager.java:326)
    at com.kivasoft.thread.ThreadBasic.run(Native Method)
    at java.lang.Thread.run(Thread.java:479)
    ERROR [Thread-37] (?:?) - <HolidayProfileManagerJB:getHolidayVOs>Can't
    get Holid
    ayVOs by holiday profile id.java.rmi.ServerException: RemoteException
    occurred i
    n server thread; nested exception is:
    javax.transaction.TransactionRolledbackException
    *************************************************************end of
    error msg
    The attached is session and entity bean code segment.
    In the entity bean:
    public Enumeration ejbFindByHolidayProfileID(String id) {
    Vector list = new Vector();
    try {
    Connection connection = DBUtil.getConnection();
    try {
    PreparedStatement s =
    connection.prepareStatement(sqlFindByHolidayProfileID);
    try {
    s.setString(1, id);
    ResultSet rs = s.executeQuery();
    try {
    while (rs.next()) {
    HolidayProfileHolidayPK pk = new
    HolidayProfileHolidayPK();
    pk.holidayProfileID = rs.getString("hol_prfl_id");
    pk.holidayID = rs.getString("hol_id");
    list.add(pk);
    } finally {
    rs.close();
    } finally {
    s.close();
    } finally {
    connection.close();
    } catch (Exception e) {
    throw new EJBException(e);
    return list.elements();
    In the session bean:
    public HolidayProfileHolidayVO[] getHolidayProfileHolidays(String
    holidayProfileID) throws ElmsFinderException
    HolidayProfileHolidayVO[] vos = null;
    ArrayList alst = new ArrayList();
    HolidayProfileHolidayHome hphHome =
    this.getHolidayProfileHolidayHome();
    try {
    java.util.Enumeration enum =
    hphHome.findByHolidayProfileID(holidayProfileID);
    while (enum.hasMoreElements()) {
    Object obj = enum.nextElement();
    HolidayProfileHoliday bean =
    (HolidayProfileHoliday)javax.rmi.PortableRemoteObject.narrow(obj,
    HolidayProfileHoliday.class);
    alst.add(bean.getVO());
    } catch (FinderException e) {
    // throw as new ElmsCheckedException subclass
    throw new ElmsFinderException("getHolidayProfileHolidays(id):
    Could not find HolidayProfileHolidays.", e);
    } catch (RemoteException e) {
    // throw as new ElmsUncheckedException
    throw new ElmsUncheckedException(
    "getHolidayProfileHolidays()", e);
    } catch (RuntimeException e) {
    throw new ElmsUncheckedException(e);
    if (alst.size()>0) vos =
    (HolidayProfileHolidayVO[])alst.toArray(new HolidayProfileHolidayVO[1]);
    return vos;
    }

    Xiao,
    We have the same problem.
    The reason why your stand alone works, but your browser based doesn't,
    is because the iPlanet Application server requires that all EJBs, all
    objects held in any EJB, all objects held in attributes in an
    HttpSession, and all objects held in those objects MUST implement
    java.io.Serializable.
    The unfortunate reason why iPlanet does this is because iPlanet does not
    preserve the state of objects in memory across hits to the server.
    iPlanet serializes each and every object mentioned above when the HTML
    is returned to the client, and then un-serializes all the objects again
    when it receives another hit from the client. This is true even in the
    case of no-dsync sticky load balancing.
    This is ridiculous. We use sticky load balancing and we have many
    objects stored in HttpSession attributes which we do not want to be
    serialized every hit to the server, in the interest of speed. It takes
    too long to serialize all the objects, and it would take way too long to
    save them in a database every hit.
    David Shade
    xluo888 wrote:
    >
    I am running iplanet ias 6.0 sp3 with web server 6.0 sp1. I
    successfully deployed an ear file that contains the war and the jar to
    the APPS dir. The session ejbs and the entity ejbs are packed into the
    jar file which are deployed with the ear.
    I have two piece of testing code. One is a standalone java program.
    The other one is a jsp page together with the jsp bean which are packed
    into the war file in the ear. The jsp bean code and the standalone
    program are doing the same thing. They call a session ejb which calls an
    entity bean.
    I have made 2 experiments
    1> Start server, run the standalone test, got the correct result.
    Then run the jsp from the browser, got the correct result.
    2> Start server, run the jsp from the browser, fail to get the
    result. run the standalone test, fail to get the result
    The paten is very consistent. The code and the error msg for test 2 are
    attached. Could any one tell me what might cause the problem in the
    second test and how to resolve the it ?
    Thank in advance
    Xiao
    When the test fails, I got the following error msg from the console.
    [10/Nov/2001 12:08:08:3] info: --------------------------------------
    [10/Nov/2001 12:08:11:0] error: EBFP-serialize: error during
    serialization of me
    thod, exception = java.io.NotSerializableException: java.util.Vector$1
    java.io.NotSerializableException: java.util.Vector$1
    at
    java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:845)
    at
    java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:342)
    at
    java.io.ObjectOutputStream.outputArray(ObjectOutputStream.java:811)
    at
    java.io.ObjectOutputStream.checkSubstitutableSpecialClasses(ObjectOut
    putStream.java:432)
    at
    java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:337)
    at
    java.io.ObjectOutputStream.outputClassFields(ObjectOutputStream.java:
    1567)
    at
    java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java
    :453)
    at
    java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:911)
    at
    java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:342)
    at com.kivasoft.ebfp.FPSerializable.serialize(Unknown Source)
    at com.kivasoft.thread.ThreadBasic.run(Native Method)
    at java.lang.Thread.run(Thread.java:479)
    [10/Nov/2001 12:08:11:0] warning: EB-invalidate_delegate: instance
    com.plateausy
    [email protected] threw
    an unche
    cked or system exception, ex = ElmsUncheckedException:
    getHolidayProfileHolidays()
    Nested stack traces:
    java.rmi.ServerException: RemoteException occurred in server thread;
    nested exce
    ption is:
    java.rmi.ConnectIOException: <mapped>
    java.rmi.ConnectIOException: <mapped>
    <<no stack trace available>>
    [10/Nov/2001 12:08:11:0] error: Exception Stack Trace:
    ElmsUncheckedException:
    getHolidayProfileHolidays()
    Nested stack traces:
    java.rmi.ServerException: RemoteException occurred in server thread;
    nested exce
    ption is:
    java.rmi.ConnectIOException: <mapped>
    java.rmi.ConnectIOException: <mapped>
    <<no stack trace available>>
    at
    com.plateausystems.elms.bo.holidayprofile.ejb.HolidayProfileManagerBe
    an.getHolidayProfileHolidays(Unknown Source)
    at java.lang.reflect.Method.invoke(Native Method)
    at
    com.plateausystems.elms.bo.holidayprofile.ejb.ejb_skel_com_plateausys
    tems_elms_bo_holidayprofile_ejb_HolidayProfileManagerBean.getHolidayProfileHolid
    ays(ejb_skel_com_plateausystems_elms_bo_holidayprofile_ejb_HolidayProfileManager
    Bean.java:207)
    at
    com.plateausystems.elms.bo.holidayprofile.ejb.ejb_kcp_skel_HolidayPro
    fileManager.getHolidayProfileHolidays__seq_com_plateausystems_elms_bo_holidaypro
    __13918743(ejb_kcp_skel_HolidayProfileManager.java:326)
    at com.kivasoft.thread.ThreadBasic.run(Native Method)
    at java.lang.Thread.run(Thread.java:479)
    ERROR [Thread-37] (?:?) - <HolidayProfileManagerJB:getHolidayVOs>Can't
    get Holid
    ayVOs by holiday profile id.java.rmi.ServerException: RemoteException
    occurred i
    n server thread; nested exception is:
    javax.transaction.TransactionRolledbackException
    *************************************************************end of
    error msg
    The attached is session and entity bean code segment.
    In the entity bean:
    public Enumeration ejbFindByHolidayProfileID(String id) {
    Vector list = new Vector();
    try {
    Connection connection = DBUtil.getConnection();
    try {
    PreparedStatement s =
    connection.prepareStatement(sqlFindByHolidayProfileID);
    try {
    s.setString(1, id);
    ResultSet rs = s.executeQuery();
    try {
    while (rs.next()) {
    HolidayProfileHolidayPK pk = new
    HolidayProfileHolidayPK();
    pk.holidayProfileID = rs.getString("hol_prfl_id");
    pk.holidayID = rs.getString("hol_id");
    list.add(pk);
    } finally {
    rs.close();
    } finally {
    s.close();
    } finally {
    connection.close();
    } catch (Exception e) {
    throw new EJBException(e);
    return list.elements();
    In the session bean:
    public HolidayProfileHolidayVO[] getHolidayProfileHolidays(String
    holidayProfileID) throws ElmsFinderException
    HolidayProfileHolidayVO[] vos = null;
    ArrayList alst = new ArrayList();
    HolidayProfileHolidayHome hphHome =
    this.getHolidayProfileHolidayHome();
    try {
    java.util.Enumeration enum =
    hphHome.findByHolidayProfileID(holidayProfileID);
    while (enum.hasMoreElements()) {
    Object obj = enum.nextElement();
    HolidayProfileHoliday bean =
    (HolidayProfileHoliday)javax.rmi.PortableRemoteObject.narrow(obj,
    HolidayProfileHoliday.class);
    alst.add(bean.getVO());
    } catch (FinderException e) {
    // throw as new ElmsCheckedException subclass
    throw new ElmsFinderException("getHolidayProfileHolidays(id):
    Could not find HolidayProfileHolidays.", e);
    } catch (RemoteException e) {
    // throw as new ElmsUncheckedException
    throw new ElmsUncheckedException(
    "getHolidayProfileHolidays()", e);
    } catch (RuntimeException e) {
    throw new ElmsUncheckedException(e);
    if (alst.size()>0) vos =
    (HolidayProfileHolidayVO[])alst.toArray(new HolidayProfileHolidayVO[1]);
    return vos;

  • Java.io.NotSerializableException Problem

    I am getting the following exception when trying to serialize a Stack of objects.
    java.io.NotSerializableException: java.lang.reflect.Method
    The objects that I am trying to serialize already implements serializable.
    What could be the problem?

    The problem is that java.lang.Method is not serializable and some class somewhere has a non-static non-transient reference to a Method.

  • Java.io.NotSerializableException when overwrite the JTable data into .txt file

    hi everyone
    this is my first time to get help from sun forums
    i had java.io.NotSerializableException: java.lang.reflect.Constructor error when overwrite the JTable data into .txt file.
    At the beginning, the code will be generate successfully and the jtable will be showing out with the data that been save in the studio1.txt previously,
    but after i edit the data at the JTable, and when i trying to click the save button, the error had been showing out and i cannot succeed to save the JTable with the latest data.
    After this error, the code can't be run again and i had to copy the studio1.txt again to let the code run 1 more time.
    I hope i can get any solution at here and this will be very useful for me.
    the following is my code...some of it i create it with the GUI netbean
    but i dunno how to attach my .txt file with this forum
    did anyone need the .txt file?
    this is the code that suspect maybe some error here
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    String filename = "studio1.txt";
              try {
                  FileOutputStream fos = new FileOutputStream(new File(filename));
                  ObjectOutputStream oos = new ObjectOutputStream(fos);
                   oos.writeObject(jTable2);
                   oos.close();
              catch(IOException e) {
                   System.out.println("Problem creating table file: " + e);
                   return;
              System.out.println("JTable correctly saved to file " + filename);
    }the full code will be at the next msg

    this is the part 1 of the code
    this is the full code...i had /*....*/ some of it to make it easier for reading
    package gui;
    import javax.swing.*;
    import java.io.*;
    public class timetables extends javax.swing.JFrame {
        public timetables() {
            initComponents();
        @SuppressWarnings("unchecked")
        private void initComponents() {
            jDialog1 = new javax.swing.JDialog();
            buttonGroup1 = new javax.swing.ButtonGroup();
            buttonGroup2 = new javax.swing.ButtonGroup();
            buttonGroup3 = new javax.swing.ButtonGroup();
            buttonGroup4 = new javax.swing.ButtonGroup();
            jTextField1 = new javax.swing.JTextField();
            jLayeredPane1 = new javax.swing.JLayeredPane();
            jLabel6 = new javax.swing.JLabel();
            jTabbedPane1 = new javax.swing.JTabbedPane();
            jScrollPane3 = new javax.swing.JScrollPane();
            jTable2 = new javax.swing.JTable();
            jScrollPane4 = new javax.swing.JScrollPane();
            jTable3 = new javax.swing.JTable();
            jButton1 = new javax.swing.JButton();
            jButton2 = new javax.swing.JButton();
    /*       org.jdesktop.layout.GroupLayout jDialog1Layout = new org.jdesktop.layout.GroupLayout(jDialog1.getContentPane());
            jDialog1.getContentPane().setLayout(jDialog1Layout);
            jDialog1Layout.setHorizontalGroup(
                jDialog1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(0, 400, Short.MAX_VALUE)
            jDialog1Layout.setVerticalGroup(
                jDialog1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(0, 300, Short.MAX_VALUE)
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            jLayeredPane1.add(jLabel6, javax.swing.JLayeredPane.DEFAULT_LAYER);
            String filename1 = "studio1.txt";
            try {
                   ObjectInputStream ois = new ObjectInputStream(new FileInputStream(filename1));
                   jTable2 = (JTable) ois.readObject();
                   System.out.println("reading for " + filename1);
              catch(Exception e) {
                   System.out.println("Problem reading back table from file: " + filename1);
                   return;
            try {
                   ObjectInputStream ois = new ObjectInputStream(new FileInputStream(filename1));
                   jTable3 = (JTable) ois.readObject();
                   System.out.println("reading for " + filename1);
              catch(Exception e) {
                   System.out.println("Problem reading back table from file: " + filename1);
                   return;
            jTable2.setRowHeight(20);
            jTable3.setRowHeight(20);
            jScrollPane3.setViewportView(jTable2);
            jScrollPane4.setViewportView(jTable3);
            jTable2.getColumnModel().getColumn(4).setResizable(false);
            jTable3.getColumnModel().getColumn(4).setResizable(false);
            jTabbedPane1.addTab("STUDIO 1", jScrollPane3);
            jTabbedPane1.addTab("STUDIO 2", jScrollPane4);
            jTextField1.setText("again n again");
            jLabel6.setText("jLabel5");
            jLabel6.setBounds(0, 0, -1, -1);
            jButton2.setText("jButton2");
            jButton1.setText("jButton1");
            jButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton1ActionPerformed(evt);
          

  • Java.io.NotSerializableException when overwrite the JTable data into .txt

    hi everyone
    i had java.io.NotSerializableException: java.lang.reflect.Constructor error when overwrite the JTable data into .txt file.
    At the beginning, the code will be generate successfully and the jtable
    will be showing out with the data that been save in the studio1.txt
    previously,
    but after i edit the data at the JTable, and when i trying to click the
    save button, the error had been showing out and i cannot succeed to
    save the JTable with the latest data.
    After this error, the code can't be run again and i had to copy the studio1.txt again to let the code run 1 more time.
    I hope i can get any solution at here and this will be very useful for me.
    but i dunno how to attach my .txt file with this forum
    did anyone need the .txt file?
    the following is my suspect code
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    String filename1 = "studio1.txt";
              try {
                  FileOutputStream fos = new FileOutputStream(new File(filename1));
                  ObjectOutputStream oos = new ObjectOutputStream(fos);
                   oos.writeObject(jTable2.getModel());
                   oos.flush();
                   oos.close();
                   fos.close();
              catch(IOException e) {
                   System.out.println("Problem creating table file: " + e);
                            e.printStackTrace();
                   return;
              System.out.println("JTable correctly saved to file " + filename1);
    }this is the reading code
    String filename1="studio1.txt";
            try {
                   ObjectInputStream ois = new ObjectInputStream(new FileInputStream(filename1));
                   TableModel model = (TableModel)ois.readObject();
                    jTable3.setModel(model);
                   System.out.println("reading for " + filename1);
              catch(Exception e) {
                   System.out.println("Problem reading back table from file: " + filename1);
                   return;
              }Edited by: Taufulou on Jan 8, 2009 11:43 PM
    Edited by: Taufulou on Jan 8, 2009 11:44 PM
    Edited by: Taufulou on Jan 8, 2009 11:45 PM

    is this the code u mean?
    i had put this code inside it but the problem still remain the same
    if (jTable2.isEditing()) {
                jTable2.getCellEditor().stopCellEditing();
            }i had found a new thing that when i just double click the cell without change any data inside the table
    and click the button "Save". the same exception which is
    java.io.NotSerializableException: java.lang.reflect.Constructor
    will come out again.

  • Java.io.NotSerializableException: com.tangosol.util.internal.ConcurrentCoun

    Hi,
    I am working on a small prototyep project trying to understand how coherence works.
    I have a object that creates an instance of entry processor and invokes the cache. I get following error. Entry processor is serializable - the app can write an instance of EP into a file.
    Using same setup if I merely call put() it works fine for me.
    Any idea what coherence is doing here ?
    Thanks
    ~s
    ===
    (Wrapped) com.tangosol.util.internal.ConcurrentCounter) java.io.NotSerializableException: com.tangosol.util.internal.ConcurrentCounter
    at java.io.ObjectOutputStream.writeObject0(Unknown Source)
    at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
    at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
    at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
    at java.io.ObjectOutputStream.writeObject0(Unknown Source)
    at java.io.ObjectOutputStream.writeObject(Unknown Source)
    at java.util.Hashtable.writeObject(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
    at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
    at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
    at java.io.ObjectOutputStream.writeObject0(Unknown Source)
    at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
    at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source)
    at com.tangosol.coherence.Component.writeObject(Component.CDB:1)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
    at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
    at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
    at java.io.ObjectOutputStream.writeObject0(Unknown Source)
    at java.io.ObjectOutputStream.writeObject(Unknown Source)
    at java.util.Hashtable.writeObject(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
    at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
    at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
    at java.io.ObjectOutputStream.writeObject0(Unknown Source)
    at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
    at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source)
    at com.tangosol.coherence.Component.writeObject(Component.CDB:1)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
    at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
    at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
    at java.io.ObjectOutputStream.writeObject0(Unknown Source)
    at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
    at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source)
    at com.tangosol.coherence.Component.writeObject(Component.CDB:1)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)
    at java.io.ObjectOutputStream.writeSerialData(Unknown Source)
    at java.io.ObjectOutputStream.writeOrdinaryObject(Unknown Source)
    at java.io.ObjectOutputStream.writeObject0(Unknown Source)
    at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
    at java.io.ObjectOutputStream.defaultWriteObject(Unknown Source)
    at com.tangosol.coherence.Component.writeObject(Component.CDB:1)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at java.io.ObjectStreamClass.invokeWriteObject(Unknown Source)

    The problem is fixed.
    In my EP, process() was returning "entry" instead of modified object. Comparing my code with some other samples helped me.
    So it is all down to my mistake.
    Thanks
    ~s

  • Mapping java.util.hashtable

    Hello all
    I have a requirement of mapping java.util.hashtable to Oracle9i database. I read on the application developers guide that this type can not be mapped through the Workbench GUI and you need to write code for it.
    I followed the example code as below
    DirectMapMapping directMapMapping = new DirectMapMapping();
    directMapMapping.setAttributeName("..");
    directMapMapping.setReferenceTableName("..");
    directMapMapping.setReferenceKeyFieldName("..");
    directMapMapping.setDirectKeyFieldName("..");
    directMapMapping.setDirectFieldName("..");
    directMapMapping.setKeyClass(String.class);
    directMapMapping.setValueClass(Integer.class);
    descriptor.addMapping(directMapMapping);
    The insertion to the database went very well but while retriving the data from the database i am getting the following error.
    Exception Description: Trying to set value [[DatabaseRow(
         DUMMYTABLE.KEYVALUE => 100
         KEYNAME => 1), DatabaseRow(
         DUMMYTABLE.KEYVALUE => 200
         KEYNAME => 2)]] for instance variable [dummyTable] of type [java.util.Hashtable] in the object. The specified object is not an instance of the class or interface declaring the underlying field, or an unwrapping conversion has failed.
    If any one has any idea, please let me know.
    Thanks in Advance

    Which version/patch is this running? I don't know of any specific bugs to this, but there have been a couple of minor seemingly-unrelated fixes to DirectMapMapping, but sometimes they're more related than you think.
    The exception is saying the types aren't matching up. You are 100% sure the attribute you're mapping to is a java.util.Hashtable? It shouldn't be necessary, but you might want to call directMapMapping.useMapClass(java.util.Hashtable.class);
    - Don

  • NullpointerException in java.util.Hashtable.access$100 ???

    Hi folks.
    I am trying to reconstruct a Hashtable using my own way of serialization/deserialization via Java Reflection. It works fine with most classes, but a reconstructed hashtable is seriously screwed up. After reconstruction, it is passed as an argument to a class that uses the putAll-Method, which causes a NullpointerException.
    The root in the stack trace is java.util.Hashtable.access$100 at line 90 in java.util.Hashtable. Unfortunately, if you check the source of hashtable, you will only find the class header on this line.
    Is it correct, that javac creates access-methods for inner classes? What are they used for?
    Any idea what could cause this?

    The exception happens whenever I try methods like toString, putAll or hashCode on the hashtable. The code of the deserialization is just a bit to complex to post here.
    I have been able to track the problem down to the internal creation of creation of an iterator by the hashtable.
    Here is the stack trace:
    Exception in thread "main" java.lang.NullPointerException
    at java.util.Hashtable.access$100(Hashtable.java:90)
    at java.util.Hashtable$EntrySet.iterator(Hashtable.java:592)
    at java.util.Collections$SynchronizedCollection.iterator(Collections.java:1096)
    at java.util.Hashtable.hashCode(Hashtable.java:728)
    at java.util.Hashtable.get(Hashtable.java:315)
    at mypackage.serializer.XMLSerializer.buildXML(XMLSerializer.java:205)
    at mypackage.serializer.XMLSerializer.buildXML(XMLSerializer.java:178)
    at mypackage.serializer.XMLSerializer.main(XMLSerializer.java:66)

Maybe you are looking for

  • How do I get my security questions if I forgot them?

    If I forgot my security questions, could I send the answers to my email? Or how would I get them? I forgot the answers.

  • Prints shifting to the right

    My Photosmart C309a printer has just begun shifting the print to the right by 1/2 to 1" when printing Word, Publisher and PDF files in landscape. Any suggestions as to what might be causing the problem?

  • Purpose of =ALL

    Hi, Could someone please tell me the purpose of SQL operator ALL (>= ALL, =ALL, <> ALL). Thanks, Akila.

  • Can't see my calender on my iphone

    It just started yesterday but my iphone 5 has no calender information in it at all.  I have resynchronized it with my outlook calender but I still can't see any of my calender information on my iphone.  I'm running iOS 7.1.1

  • Cannot get into additional client(not golden client)

    We have the golden client 200 and an additional client 600.  In production seems that everyone who has access to unlock and change passwords has forgotten and locked their accounts including myself.  This is because most of us rarely go into this cli