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.

Similar Messages

  • Hashtable problem - java.io.NotSerializableException

    I'm having trouble writing a hashtable out to a file. I know that the writeObject() method in ObjectOutputStream requires whatever it writes to be serializable, so I made the PlayerScore class implement serializable.. Now it gives "Not serializable Exeption: java.io.NotSerializableException: PluginMain" where PluginMain is the class that contains the hashtable. If I have it Implement Serializable I get the same error with what I would guess is a super class of mine named BotCore.
    All the source is here: www.witcheshovel.com/WartsStuff/PluginMain.java
    Here are what I believe to be the offending portions of the code:
         private Hashtable<String, PlayerScore> scoreTable;
         private void saveScores() {
              try {
                   out.showMessage("Hash a a string: " + scoreTable.toString());
                   String scoreFile = getSetting("8. Score File");     
                   FileOutputStream fileOut = new FileOutputStream (scoreFile);
                   ObjectOutputStream objectOut = new ObjectOutputStream(fileOut);
                   Object scores = (Object)scoreTable;
                   //objectOut.writeObject(scores);
                   objectOut.writeObject(scoreTable);
                   objectOut.close();
                   fileOut.close();
              catch (NotSerializableException a) {out.showMessage("Not serializable Exeption: " + a);}
              catch (Exception e) {out.showMessage("Failed to save file with error:" + e);}
         public class PlayerScore implements Serializable {     //Class for keeping player scores
              String playerName;
              int longestStreak=0;
              int totalCorrect=0;
              public PlayerScore() {}
              public PlayerScore(String name) {
                   playerName = name;
              public void setTotalCorrect(int newCorrect) {
                   totalCorrect = newCorrect;
              public void incTotalCorrect() {
                   totalCorrect++;
              public void setLongestStreak(int streak) {
                   longestStreak=streak;
              public void incLongestStreak() {
                   longestStreak++;
              public String getName() {
                   return playerName;
              public int getStreak() {
                   return longestStreak;
              public int getTotalCorrect() {
                   return totalCorrect;
         }

    Does it look like this:
    class PluginMain
      class PlayerScore implements Serializable
    }If PlayerScore (or anything else you try to serialize) is an inner class it has a hidden reference to its containing class (i.e. PluginMain.this), so serializing it will try to serialize the containing class. You can make the nested class static, or place it outside the scope of the containing class. If it still needs a reference to the containing class put it in explicitly and make it transient, but you will have a problem at the receiving end.

  • Java.io.NotSerializableException in Query

    All,
    I am encountering a strange java.io.NotSerializable error on certain
    queries. I am using Kodo Std 2.2.6 (trial version) on RH7.1 with Postgres
    7.1 (inside a Struts 1.1 servlet running inside Tomcat 4.1).
    The error is the following: I am attempting to find "Resources" that have
    associated "File"s, where those files have "FileRole" == a particular
    FileRole object.
    The objects (simplified) are:
    public class Resource {
    File file;
    String driver;
    String driverId;
    public class File {
    FileRole fileRole;
    public class FileRole {
    String name;
    The query is:
    public List findByDriver(String driver, String driverId, FileRole fileRole)
    List li = null;
    try {
    String filter = "driver == driverString && driverId ==
    driverIdString && file.fileRole == theFileRole";
    Extent beanExtent =
    JDOManager.getInstance().getPersistenceManager().getExtent(Resource.class,
    false);
    Query q =
    JDOManager.getInstance().getPersistenceManager().newQuery(Resource.class,
    beanExtent, filter);
    q.declareImports("import lepton.core.file.File;" + "import
    lepton.core.file.FileRole");
    q.declareParameters("String driverString, String driverIdString,
    FileRole theFileRole);
    ArrayList queryArray = new ArrayList();
    queryArray.add(driver);
    queryArray.add(driverId);
    queryArray.add(fileRole);
    Collection results = (Collection) q.execute(queryArray);
    li = new ArrayList(results);
    } catch (Exception e) {
    throw new LeptonException(e);
    return li;
    The error is:
    javax.jdo.JDOException: lepton.core.file.FileRole
    NestedThrowables:
    java.io.NotSerializableException: lepton.core.file.FileRole
    at
    com.solarmetric.kodo.impl.jdbc.schema.dict.GenericDictionary.toSQL(GenericDi
    ctionary.java:169)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCExpressionFactory$Constant.(JDBCE
    xpressionFactory.java:465)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCExpressionFactory.getConstant(JDB
    CExpressionFactory.java:229)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCExpressionFactory.getParameter(JD
    BCExpressionFactory.java:249)
    at com.solarmetric.kodo.query.FilterParser.eval(FilterParser.java:563)
    at com.solarmetric.kodo.query.FilterParser.getValue(FilterParser.java:669)
    at com.solarmetric.kodo.query.FilterParser.eval(FilterParser.java:582)
    at
    com.solarmetric.kodo.query.FilterParser.getExpression(FilterParser.java:678)
    at com.solarmetric.kodo.query.FilterParser.eval(FilterParser.java:653)
    at
    com.solarmetric.kodo.query.FilterParser.getExpression(FilterParser.java:678)
    at com.solarmetric.kodo.query.FilterParser.eval(FilterParser.java:653)
    at
    com.solarmetric.kodo.query.FilterParser.getExpression(FilterParser.java:678)
    at com.solarmetric.kodo.query.FilterParser.eval(FilterParser.java:653)
    at
    com.solarmetric.kodo.query.FilterParser.getExpression(FilterParser.java:678)
    at com.solarmetric.kodo.query.FilterParser.evaluate(FilterParser.java:530)
    at com.solarmetric.kodo.query.QueryImpl.getExpression(QueryImpl.java:502)
    at com.solarmetric.kodo.query.QueryImpl.getExpression(QueryImpl.java:468)
    at
    com.solarmetric.kodo.impl.jdbc.runtime.JDBCQuery.getExpression(JDBCQuery.jav
    a:190)
    at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:342)
    at
    com.solarmetric.kodo.query.QueryImpl.executeWithArray(QueryImpl.java:529)
    at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:314)
    at lepton.knowledgebase.ResourceHome.findByDriver(ResourceHome.java:91)
    My jdo mappings (simplified) are:
    Resource:
    <jdo>
    <package name="lepton.knowledgebase">
    <class name="Resource" >
    <field name="driver">
    </field>
    <field name="driverId">
    </field>
    <field name="file">
    </field>
    </class>
    </package>
    </jdo>
    File:
    <jdo>
    <package name="lepton.core.file">
    <class name="File" >
    <field name="fileRole">
    </field>
    </class>
    </package>
    </jdo>
    FileRole:
    <jdo>
    <package name="lepton.core.file">
    <class name="FileRole" >
    <field name="name">
    <extension vendor-name="kodo"
    key="column-index"
    value="true" />
    </field>
    </class>
    </package>
    </jdo>
    Any help/suggestions would be greatly appreciated. I am seeing this error
    in one other query, with a similar (but slightly more involved) syntax.
    (The point of commonality is querying a somewhat distant--but
    related--portion of the object graph, in the form xx.xx.xx == yy).
    Thanks,
    David
    David Sachs
    Redpoint Ventures
    [email protected]

    Abe,
    Thanks again for your help. I discovered (much to my embarassment) that
    this was a case of a massively silly error on my part, and a somewhat
    misleading error message.
    The cause of the problem was my query--Kodo is working great.
    I had:
    public List findByDriver(String driver, String driverId, FileRole fileRole)
    q.declareParameters("String driverString, String driverIdString,
    FileRole theFileRole);
    ArrayList queryArray = new ArrayList();
    queryArray.add(driver);
    queryArray.add(driverId);
    queryArray.add(fileRole);
    Collection results = (Collection) q.execute(queryArray);
    This should be:
    q.declareParameters("String driverString, String driverIdString,
    FileRole theFileRole);
    Map queryMap = new HashMap();
    queryMap.add(driver);
    queryMap.add(driverId);
    queryMap.add(fileRole);
    Collection results = (Collection) q.executeWithMap(queryMap);
    It works perfectly, as does the other case in which I saw a
    java.io.NotSerializable error.
    Anyway, sorry to have wasted your time on this, but maybe there is some way
    to make the reported error slightly more specific. As an aside, I did try
    to track down whether a superfluous jdo/kodo.jar was lurking anywhere in
    Kodo's classpath, but I didn't find anything. Clearly (since this now
    works), the properly enhanced FileRole class is present, but the error
    message was didn't indicate that I was wildly misusing the q.executeXXX
    facility.
    Anyway, thanks very much for your assistance, and sorry to have led you
    astray chasing down a user error.
    David
    "Abe White" <[email protected]> wrote in message
    news:[email protected]...
    I wasn't able to find a class called"javax.jdo.spi.PersistenceCapable"--did
    you mean just "javax.jdo.PersistenceCapable?"Yeah, sorry. In JDO 1.0 they moved PersistenceCapable to the 'spi'subpackage;
    Kodo 2.2.6 (unlike 2.3, which is out now), uses an older version of the spec.
    >
    Assuming that you meant javax.jdo.PersistenceCapable, my class reportsthat
    it IS persistence capable.Well I've checked our code (the version that you're using), and itcouldn't
    really be more clear. It's basically:
    if (obj instanceof PersistenceCapable)
    ... 1 ...
    else
    ... 2 ...
    And your stack trace ends up in position 2. That means that to Kodo, that
    object is not persistence capable. This has to be a class loader issue.
    I assume your install script is run outside of the servlet? Or in a
    different web app? Tomcat does some funky things with class loaders; ifyou
    have multiple JDO jars floating around there might also technically be
    multiple PersistenceCapable classes, and the one Kodo sees is differentthan
    the one your application sees. Make sure both the kodo jars and the jdojars
    are only in a single location.
    This makes sense, since I have been able to create and make persistent
    instances of the FileRole class. (I can successfully create a bunch of
    FileRoles and persist them to my database as part of my install script,
    which would alos fail were FileRole not enhanced).
    Any ideas?
    Thanks very much,
    David
    "Abe White" <[email protected]> wrote in message
    news:[email protected]...
    David --
    Before you execute the query, can you please check to see that
    (fileRole instanceof javax.jdo.spi.PersistenceCapable) ?
    If a parameter isn't persistence-capable, we try to convert it to SQL;
    for complex types, this means serializing it. I have a feeling there
    is
    a class loader issue or something where an unenhanced version of your
    class is sneaking in. Let us know what you find out.

  • 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 when using POF over Extend

    I changed a class to use POF and it seems to work fine among TCMP cluster members but when apps connect with Extend I get an exception indicating that maybe either the extend proxy or client app is not correctly configured to use POF.
    (Wrapped) java.io.NotSerializableException: dj_quotes.DJ_Quote
            at com.tangosol.util.Base.ensureRuntimeException(Base.java:288)
            at com.tangosol.util.Base.ensureRuntimeException(Base.java:269)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.send(Peer.CDB:22)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.post(Peer.CDB:23)
            at com.tangosol.coherence.component.net.extend.Channel.post(Channel.CDB:25)
            at com.tangosol.coherence.component.net.extend.Channel.send(Channel.CDB:6)
            at com.tangosol.coherence.component.net.extend.Channel.receive(Channel.CDB:55)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer$DaemonPool$WrapperTask.run(Peer.CDB:9)
            at com.tangosol.coherence.component.util.DaemonPool$WrapperTask.run(DaemonPool.CDB:32)
            at com.tangosol.coherence.component.util.DaemonPool$Daemon.onNotify(DaemonPool.CDB:63)
            at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
            at java.lang.Thread.run(Thread.java:662)
    Caused by: java.io.NotSerializableException: dj_quotes.DJ_Quote
            at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
            at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
            at com.tangosol.util.ExternalizableHelper.writeSerializable(ExternalizableHelper.java:2252)
            at com.tangosol.util.ExternalizableHelper.writeObjectInternal(ExternalizableHelper.java:2696)
            at com.tangosol.util.ExternalizableHelper.serializeInternal(ExternalizableHelper.java:2600)
            at com.tangosol.util.ExternalizableHelper.toBinary(ExternalizableHelper.java:210)
            at com.tangosol.coherence.component.net.extend.proxy.serviceProxy.CacheServiceProxy$ConverterToBinary.convert(CacheServiceProxy.CDB:3)
            at com.tangosol.util.ConverterCollections$AbstractConverterEntry.getValue(ConverterCollections.java:3547)
            at com.tangosol.io.pof.PofBufferWriter.writeMap(PofBufferWriter.java:1977)
            at com.tangosol.coherence.component.net.extend.message.Response.writeExternal(Response.CDB:23)
            at com.tangosol.coherence.component.net.extend.message.response.PartialResponse.writeExternal(PartialResponse.CDB:1)
            at com.tangosol.coherence.component.net.extend.Codec.encode(Codec.CDB:23)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.encodeMessage(Peer.CDB:23)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.peer.acceptor.TcpAcceptor.encodeMessage(TcpAcceptor.CDB:8)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.send(Peer.CDB:16)
            ... 9 moreLooks like it failed while attempting default serialization, right?
    My extend proxy servers start with
    -Dtangosol.coherence.cacheconfig=cache-config-extend-proxy.xml
    here:
    <?xml version="1.0"?>
    <!DOCTYPE cache-config SYSTEM "cache-config.dtd">
    <cache-config>
         <!-- ***********  SCHEME MAPPINGS  ***********  -->
         <caching-scheme-mapping>
              <cache-mapping>
                   <cache-name>quotes.*</cache-name>
                   <scheme-name>quotes-scheme</scheme-name>
              </cache-mapping>   
         </caching-scheme-mapping>
         <!-- ******************************** -->
         <caching-schemes>
              <proxy-scheme>
          <service-name>ExtendTcpProxyService</service-name>
          <thread-count>8</thread-count>
          <acceptor-config>
            <tcp-acceptor>
              <local-address>
                <address system-property="tangosol.coherence.proxy.address">localhost</address>
                <port system-property="tangosol.coherence.proxy.port">9090</port>
              </local-address>
            </tcp-acceptor>
          </acceptor-config>
          <proxy-config>
                  <cache-service-proxy>
                    <lock-enabled>true</lock-enabled>
                  </cache-service-proxy>
                </proxy-config>
          <autostart>true</autostart>
        </proxy-scheme>
              <distributed-scheme>
                   <scheme-name>quotes-scheme</scheme-name>
                   <service-name>DistributedQuotesCacheService</service-name>
                   <serializer>
                        <class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>
                        <init-params>
              <init-param>
                <param-type>string</param-type>
                <param-value system-property="pof.config">z:/coherence/pof-config.xml</param-value>
              </init-param>
            </init-params>
                   </serializer>
                   <backing-map-scheme>
                        <local-scheme/>
                   </backing-map-scheme>
                   <autostart>true</autostart>
              </distributed-scheme>
    </caching-schemes>
    </cache-config>extend client apps start with
    -Dtangosol.coherence.cacheconfig=z:/coherence/cache-config-extend-client.xml
    here:
    <?xml version="1.0"?>
    <!DOCTYPE cache-config SYSTEM "cache-config.dtd">
    <cache-config>
         <!-- ***********  SCHEME MAPPINGS  ***********  -->
         <caching-scheme-mapping>
              <cache-mapping>
                   <cache-name>quotes.*</cache-name>
                   <scheme-name>extend-scheme</scheme-name>
              </cache-mapping>
         </caching-scheme-mapping>
         <!-- ******************************** -->
         <caching-schemes>
              <remote-cache-scheme>
                    <scheme-name>extend-scheme</scheme-name>
                    <service-name>ExtendTcpCacheService</service-name>
                    <initiator-config>
                    <tcp-initiator>
              <remote-addresses>
                 <socket-address>
                  <address>192.168.3.6</address>
                  <port>9090</port>
                </socket-address>
              </remote-addresses>
              <connect-timeout>12s</connect-timeout>
            </tcp-initiator>
            <outgoing-message-handler>
              <request-timeout>6s</request-timeout>
            </outgoing-message-handler>
          </initiator-config>
        </remote-cache-scheme>
              <!-- ALSO TRIED THIS IN PLACE OF extend-scheme -->
                    <remote-cache-scheme>
          <scheme-name>extend-scheme-pof</scheme-name>
          <service-name>ExtendPofTcpCacheService</service-name>
                   <serializer>
                        <class-name>com.tangosol.io.pof.ConfigurablePofContext</class-name>
                        <init-params>
              <init-param>
                <param-type>string</param-type>
                <param-value system-property="pof.config">z:/coherence/pof-config.xml</param-value>
              </init-param>
            </init-params>
                   </serializer>
          <initiator-config>
            <tcp-initiator>
              <remote-addresses>
                <!-- mothra -->
                 <socket-address>
                  <address>192.168.3.6</address>
                  <port>9090</port>
                </socket-address>
              </remote-addresses>
              <connect-timeout>12s</connect-timeout>
            </tcp-initiator>
            <outgoing-message-handler>
              <request-timeout>6s</request-timeout>
            </outgoing-message-handler>
          </initiator-config>
        </remote-cache-scheme>
    </caching-schemes>
    </cache-config>pof-config.xml should be fine...
    <!DOCTYPE pof-config SYSTEM "pof-config.dtd">
    <pof-config>
      <user-type-list>
        <include>coherence-pof-config.xml</include>
        <user-type>
          <type-id>10001</type-id>
          <class-name>dj_quotes.DJ_Quote</class-name>
        </user-type>
      </user-type-list>
    </pof-config>Any ideas what I missed?
    Thanks,
    Andrew

    Looks like I spoke too soon. Moving the <serializer> to the correct location in the Extend client XML config did fix the problem I was seeing but it created a new problem. It appears the Extend client wants to use POF for everything including non-POF services like the one handling the Serializable (non-POF) object oms.Order. That's what I gather from this exception
    Exception in thread "AWT-EventQueue-0" (Wrapped) java.io.IOException: unknown user type: oms.Order
            at com.tangosol.util.Base.ensureRuntimeException(Base.java:288)
            at com.tangosol.util.Base.ensureRuntimeException(Base.java:269)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.send(Peer.CDB:22)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.post(Peer.CDB:23)
            at com.tangosol.coherence.component.net.extend.Channel.post(Channel.CDB:25)
            at com.tangosol.coherence.component.net.extend.Channel.request(Channel.CDB:18)
            at com.tangosol.coherence.component.net.extend.Channel.request(Channel.CDB:1)
            at com.tangosol.coherence.component.net.extend.RemoteNamedCache$BinaryCache.putAll(RemoteNamedCache.CDB:10)
            at com.tangosol.util.ConverterCollections$ConverterMap.putAll(ConverterCollections.java:1702)
            at com.tangosol.coherence.component.net.extend.RemoteNamedCache.putAll(RemoteNamedCache.CDB:1)
            at com.tangosol.coherence.component.util.SafeNamedCache.putAll(SafeNamedCache.CDB:1)
            at oms.Order.sendMultiple(Order.java:357)
            at order_entry_window.OrderEntryPanel$SubmitListener.sendOrder(OrderEntryPanel.java:1307)
            at order_entry_window.OrderEntryPanel$SubmitListener.actionPerformed(OrderEntryPanel.java:1321)
            at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
            at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
            at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
            at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
            at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
            at java.awt.Component.processMouseEvent(Component.java:6504)
            at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
            at java.awt.Component.processEvent(Component.java:6269)
            at java.awt.Container.processEvent(Container.java:2229)
            at java.awt.Component.dispatchEventImpl(Component.java:4860)
            at java.awt.Container.dispatchEventImpl(Container.java:2287)
            at java.awt.Component.dispatchEvent(Component.java:4686)
            at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
            at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
            at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
            at java.awt.Container.dispatchEventImpl(Container.java:2273)
            at java.awt.Window.dispatchEventImpl(Window.java:2713)
            at java.awt.Component.dispatchEvent(Component.java:4686)
            at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707)
            at java.awt.EventQueue.access$000(EventQueue.java:101)
            at java.awt.EventQueue$3.run(EventQueue.java:666)
            at java.awt.EventQueue$3.run(EventQueue.java:664)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
            at java.awt.EventQueue$4.run(EventQueue.java:680)
            at java.awt.EventQueue$4.run(EventQueue.java:678)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
            at java.awt.EventQueue.dispatchEvent(EventQueue.java:677)
            at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
            at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
            at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
            at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
            at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
    Caused by: java.io.IOException: unknown user type: oms.Order
            at com.tangosol.io.pof.ConfigurablePofContext.serialize(ConfigurablePofContext.java:341)
            at com.tangosol.util.ExternalizableHelper.serializeInternal(ExternalizableHelper.java:2596)
            at com.tangosol.util.ExternalizableHelper.toBinary(ExternalizableHelper.java:210)
            at com.tangosol.coherence.component.net.extend.RemoteNamedCache$ConverterToBinary.convert(RemoteNamedCache.CDB:4)
            at com.tangosol.util.ConverterCollections$AbstractConverterEntry.getValue(ConverterCollections.java:3547)
            at com.tangosol.io.pof.PofBufferWriter.writeMap(PofBufferWriter.java:1977)
            at com.tangosol.coherence.component.net.extend.messageFactory.NamedCacheFactory$PutAllRequest.writeExternal(NamedCacheFactory.CDB:3)
            at com.tangosol.coherence.component.net.extend.Codec.encode(Codec.CDB:23)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.encodeMessage(Peer.CDB:23)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Peer.send(Peer.CDB:16)
            ... 47 more
    Caused by: java.lang.IllegalArgumentException: unknown user type: oms.Order
            at com.tangosol.io.pof.ConfigurablePofContext.getUserTypeIdentifier(ConfigurablePofContext.java:420)
            at com.tangosol.io.pof.ConfigurablePofContext.getUserTypeIdentifier(ConfigurablePofContext.java:409)
            at com.tangosol.io.pof.PofBufferWriter.writeUserType(PofBufferWriter.java:1660)
            at com.tangosol.io.pof.PofBufferWriter.writeObject(PofBufferWriter.java:1622)
            at com.tangosol.io.pof.ConfigurablePofContext.serialize(ConfigurablePofContext.java:335)
            ... 56 moreSo I posted a follow-up question here:
    Can an extend client use both POF and java.io.Serializable?
    Thanks,
    Andrew

  • Drag and Drop and java.io.NotSerializableException

    I have been implementing some code to essentially allow me to drag and drop from one JTree to another. The requirement was to be able to drag multiple nodes at one time and drop them on the other JTree in the order selected.
    I was getting a java.io.NotSerializableException when I was in the drop code in the destination jTree and could not figure out what was going on. Basically, I was wrapping all the objects that i wanted to transfer in a custom ArrayList subclass that implemented transferable. The NotSerializableException was was indicating that the object in the JList was not serializable.
    If you are getting a NotSerializableException and you have defined a custom DataFlavor like so:
    public static DataFlavor DATATYPE_TRANSFER =
            new DataFlavor(
               TransferableImplementor.class,  //  make sure that this is the class that implements transferable
                "Datatype Information");make sure that the .class is indeed the class that implements the transferable interface (and not some other random .class). You can be led down a wild goose chase on trying to make sure every object in your Transferable implementor class is serializable, when the problem lays in the DataFlavor instantiation.
    Nik

    If you haven't already read these, here are a couple of good sources for DND tree implementation details.
    http://www.javaworld.com/javaworld/javatips/jw-javatip97.html
    http://www.javaworld.com/javaworld/javatips/jw-javatip114.html

  • Getting java.io.NotSerializableException: sun.management.MemoryPoolImpl

    Hi,
    While trying to get JVM Memory pool information of a remote computer ,am getting java.io.NotSerializableException. I used following method
    ManagementFactory.getMemoryPollMXBean().
    Please help me to solve these exception.
    java.io.NotSerializableException: sun.management.MemoryPoolImpl
    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.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:597)
    at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
    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 com.path.systemmanager.tunnelGate.TunnelServlet.doPost(TunnelServlet.java:38)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
    at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    Thanks,
    Sreejith

    I agree, it looks frustrating. Obviously the serialization process has found the non-serializable object during the traversal of the object graph, but its difficult to know where this is.
    Your class looks a bit "serialization-heavy", if you don't mind me saying. I avoid serializing anything to do with swing components and stick to collections and my own classes. Do you need to serialize these? If not, mark them transient. You can do this for all of them and then reintroduce into the serialized form one at a time to see which one causes the problem (just for curiosity).
    When the object is deserialized you will have to make the necessary arrangements to set up any members that you marked transient, as these will be null. You can do this is readObject, but on this subject, why are you writing out the points member explicitly? It will be written out anyway since there is nothing special about it.
    I don't know how familiar you are with the serialization package but its a sharp instrument that needs respect. I would advise reading the specification, if you haven't already done so.

  • 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: 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.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: sun.java2d.SunGraphics2D

    Gentlemen,
    I cannot find the reason for the following error message and it is driving me mad ... :-)
    java.io.NotSerializableException: sun.java2d.SunGraphics2D
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1330)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1302)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1330)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1302)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1245)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
    at gui.PreProcessor.b_save_actionPerformed(PreProcessor.java:964)
    ..... abbreviated
    I can figure out the reason being that something inside the _Spline class is not serializable but I've checked everything and it seems fine. All custom classes implements Serializable.
    Is there anyone who can give me a hint on what to look for? Is the sun.java2d.SunGraphics2D connected to any Swing component?
    Your reply highly appreciated.
    /Jonas Forssell, Sweden
    Here follows the class which for some reason cannot be serialized.
    package j3d;
    import java.awt.*;
    import java.io.*;
    import java.util.Vector;
    import javax.swing.tree.*;
    import javax.swing.*;
    import java.awt.event.*;
    import javax.swing.table.*;
    import gui.*;
    * Creates a nurbcurve in the shape of a Pline
    * @author   Jonas Forssell, Yuriy Mikhaylovskiy
    public class _Spline extends _NurbCurve implements _Object, Serializable{
      private Vector points = new Vector();
      private JTable table;
      private DefaultTableModel tableModel;
      private JButton jButton1, jButton2, jButton3;
      private JComboBox jComboBox1;
      static String[] hdr = {"Points"};
      private String[] curvetype = {"Polyline","Quadratic","Cubical"};
       * Creates a new Pline. The parameters are:
       * @param points[]               Starting point (distance to center point sets radius)
       * @param color                    Color of the arc
       * @param element_type          element type to be used for the FE-mesh
       * @param element_material     element material to be used for the FE-mesh
       * @param element_diameter     diameter of the element in the mesh
      public _Spline(boolean add) {
        super(add);
        order = 1;
      protected void writeObject(ObjectOutputStream out)  throws IOException{
          super.writeObject(out);
          out.writeObject(points);
        protected void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException{
          super.readObject(in);
          points = (Vector)in.readObject();
      public void reset(){
          _Point p;
          int kl;
          // Inititalize
          // Generate the control points
          controlPoints = new _CtrlPoint[points.size()];
          for (int i=0; i<points.size(); i++) {
              p = (_Point)points.elementAt(i);
              controlPoints[i] = new _CtrlPoint(p.x, p.y, p.z,1.0f,Color.GRAY);
          // Generate the knots
          kl = controlPoints.length+order+1;
          knots = new float[kl];
          for (int i=0; i<=order; i++) {
              knots[i] = 0.0f;
              knots[kl-1-i] = 1.0f;
          for (int i=1; i < controlPoints.length-order; i++) {
              knots[order+i] = (float)(i)/(float)(controlPoints.length-order);
        // Generate geometry & mesh 
        super.reset();
      public String toString(){ return "Spline ID=" + Id;}
      public MutableTreeNode get_TreeNode(){
        DefaultMutableTreeNode node = new DefaultMutableTreeNode(this);
        // Add unique data for the _Arc
        for (int i=0; i<points.size(); i++)
            node.add(((_Point)points.elementAt(i)).get_TreeNode());
        // Add mesh data from _NurbCurve
        node.add(super.get_TreeNode());
        return node;
      public JPanel getEditPanel(Canvas3D j3d, PreProcessor pp){
          this.J3D = j3d;
          this.PreP = pp;
          JPanel jPanel0 = new JPanel();
          JPanel jPanel1 = new JPanel();
          JPanel jPanel2 = new JPanel();
          JPanel jPanel3 = new JPanel();
          jComboBox1 = new JComboBox(curvetype);
          jButton1 = new JButton(add == true?"Add":"Update");
          jButton2 = new JButton("Add Point");
          jButton3 = new JButton("Delete");
          String[] tmp = new String[1];
          tableModel = new DefaultTableModel(hdr,0);
          table = new JTable(tableModel);
          for(int i=0; i<points.size(); i++) {
              tmp[0] = ((_Point)points.elementAt(i)).toString();
              tableModel.addRow(tmp);
          JPanel p = new JPanel(new BorderLayout());
          JPanel p1 = new JPanel(new BorderLayout());
          JScrollPane sp = new JScrollPane();
          sp.setPreferredSize(new Dimension(180, 200));
          // Add all geometry data
          jPanel0.setLayout(new BoxLayout(jPanel0, BoxLayout.Y_AXIS));
          jPanel0.add(sp);
               sp.getViewport().add(table, null);
          jPanel0.add(jPanel1);
               jPanel1.setLayout(new GridLayout(1,2));
          jPanel1.add(jButton2, null);
               jButton2.addActionListener(new java.awt.event.ActionListener() {
              public void actionPerformed(ActionEvent e) {
                jButton2_actionPerformed(e);
          jPanel1.add(jButton3, null);
               jButton3.addActionListener(new java.awt.event.ActionListener() {
                   public void actionPerformed(ActionEvent e) {
                       jButton3_actionPerformed(e);
          jPanel0.add(jPanel3);
               jPanel3.setLayout(new GridLayout(1,2));
               jPanel3.add(new JLabel("Curve Type"));
               jPanel3.add(jComboBox1);
                    jComboBox1.setSelectedIndex(order-1);
          // Add all mesh data
          jPanel0.add(super.getEditPanel(j3d,pp));
          // Finally, the update button
          jPanel0.add(jPanel2);
            jPanel2.add(jButton1);
          jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(ActionEvent e) {
                jButton1_actionPerformed(e);
          jPanel0.validate();
          return jPanel0;
      void jButton1_actionPerformed(ActionEvent e) {
          _Spline tmp = this;
          if(points.size() == 0) return;
          order = jComboBox1.getSelectedIndex()+1;
          tmp.update(e);
          tmp.reset();
          if(add == true) {
              try {
                tmp = (_Spline)this.clone();
                J3D.add3D(tmp);
              } catch (CloneNotSupportedException e1) {
                  e1.printStackTrace();
              tmp.add = false;
          J3D.tree_reset();
          J3D.view_reset();
          J3D.repaint();
      void jButton2_actionPerformed(ActionEvent e) {
          String[] tmp = new String[1];
          Object[] obj = J3D.getSelectedObjects3D();
          for (int i=0; i<obj.length; i++)
          if(obj[i] !=null && obj[i] instanceof _Point){
            points.add((_Point)obj);
    tmp[0] = obj[i].toString();
    tableModel.addRow(tmp);
    void jButton3_actionPerformed(ActionEvent e) {
    int index = -1;
    Object[] obj = J3D.getSelectedObjects3D();
    for (int i=0; i<obj.length; i++)
    if(obj[i]!=null && obj[i] instanceof _Point){
    index = points.indexOf(obj[i]);
    if (index >=0) {
    points.removeElementAt(index);
    tableModel.removeRow(index);

    I agree, it looks frustrating. Obviously the serialization process has found the non-serializable object during the traversal of the object graph, but its difficult to know where this is.
    Your class looks a bit "serialization-heavy", if you don't mind me saying. I avoid serializing anything to do with swing components and stick to collections and my own classes. Do you need to serialize these? If not, mark them transient. You can do this for all of them and then reintroduce into the serialized form one at a time to see which one causes the problem (just for curiosity).
    When the object is deserialized you will have to make the necessary arrangements to set up any members that you marked transient, as these will be null. You can do this is readObject, but on this subject, why are you writing out the points member explicitly? It will be written out anyway since there is nothing special about it.
    I don't know how familiar you are with the serialization package but its a sharp instrument that needs respect. I would advise reading the specification, if you haven't already done so.

  • 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.

  • Java.io.NotSerializableException: com.sun.xml.tree.XmlDocument

    Hi,
    I got this error when my servlet is trying to parse a xml document:
    RuntimeRemoteException( java.io.WriteAbortedException: Writing aborted by exception; java.io.NotSerializableException: com.sun.xml.tree.XmlDocument )
    And my application runs ok when Tomcat is used as servlet container, but it runs into problem when iPlanet is used.
    Any idea?
    Thanks in advance!

    Thanks for your reply.
    The EJBs in the application are all stateless beans. The error happens at the servlet side, not the EJB side. When the servlet tries to parse the returned XML document using xalan 1.0, the error happened. However, I can not reproduce the error when I use Tomcat as servlet container.
    here is how I coded:
    XSLTProcessor processor = XSLTProcessorFactory.getProcessor(new org.apache.xalan.xpath.xdom.XercesLiaison());
    XSLTInputSource xmlSource = new XSLTInputSource(doc);
    XSLTInputSource xslSheet = new XSLTInputSource("file:"+xslFile);
    Writer out = new StringWriter();
    XSLTResultTarget xmlResult= new XSLTResultTarget(out);
    processor.process(xmlSource,xslSheet,xmlResult);

  • Java.io.NotSerializableException: org.jdesktop.layout.GroupLayout

    Hi All,
    I have a JTree which has re-arrangable nodes. On selection of every node I populate a JTable. Data in JTable is specific to every node. I can add, update and delete rows in JTable. I need to maintain the latest state of the JTable specific to every node. As a result I maintain the TableModel specific to every node in the UserObject related to the node.
    When I set the reference of a model in the UserObject of the tree node and then try to re-arrange the tree nodes I get the following error message:
    java.io.NotSerializableException: org.jdesktop.layout.GroupLayout
    Please help me to solve this problem.
    Thanks in advance.

    shreenivasa wrote:
    swing-layout-1.0.jar added this jar file. Are there any other jar files needs to be in classpath?That's the correct Jar to add, I take it you got in from the Netbeans install directory?
    I would guess the problem is your Manifest file, you have probably exported this from
    Netbeans but don't have the Jar on your classpath or it cant be found in the place you
    specified in your Manifest
    GroupLayout was added to J2SE 6 as a standard class so this might be better to change to this
    than your current approach if your clients use this Java version. It's one less jar to bundle with your app.

  • 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);
          

Maybe you are looking for

  • DV6-2173cl keyboard does not work in a few occasions (flash, unity, etc)

    I've had this problem recently for a while now on my over-a-year-old DV6-2173CL (WA782UA#ABA) laptop where some plugins, like Flash or Unity web player, won't recognize keys that I'm pressing on my keyboard. The keyboard works fine in all other occas

  • Question about Receipt files found in ~\Library\Receipts

    Hi there, I recently bought a Mac Pro and now installing all my software for music production. Although I'm new to Snow Leopard, I've been using Tiger for the last five years, so I do know a little bit about Macs. My problem is that for some reason t

  • Element 9 replacement

    wil purchase and ownload of elements 12 anhd premiere 12 copy old info from elements nine files into new product.?

  • A long it's take in the "waiting for iphone"

    my iphone went off and can't turn on, i plug it to the computer, and is in iphone recovery mode, and "waiting for iphone", what I can do, is being in that mode like 20 minutes

  • To give value ranges in web interface builder in a BPS application

    Hi all, I want to give value range for an info-object in web interface builder when selecting a value range variable , but the web application is displaying only the 'from' field and I am not able to get the place to give 'to' for a complete range. I