Re: [JBoss-user] java.io.NotSerializableException need help

2001-07-30 Thread Hermann RANGAMANA

I add : it serializable even if it holds a reference to another instance
that is not serializable, if this instance's class has a no-arg contructor.

--hermann

- Original Message -
From: "Ole Husgaard" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 28, 2001 11:46 AM
Subject: Re: [JBoss-user] java.io.NotSerializableException need help


> Hi,
>
> An instance of a class implementing Serializable
> can still be non-serializable at runtime, if it
> holds a reference to another instance that is not
> serializable at runtime.
> See: http://java.sun.com/products/jdk/1.2/docs/guide/serialization/
>
>
> Best Regards,
>
> Ole Husgaard.
>
>
> yan fan wrote:
> >
> > Yes , it did.
> > --- Dmitri Colebatch <[EMAIL PROTECTED]> wrote:
> > > Does com.arcsight.vssreport.VssReportItem implement
> > > java.io.Serializable?  It needs to.
> > >
> > > cheesr
> > > dim
> > >
> > > On Thu, 26 Jul 2001, yan fan wrote:
> > >
> > > > I am runing jboss&tomcat , with servlet , BMP, and
> > > > when I try to get a ArrayList(which inside is the
> > > > VssReportItem object hold some properties) in BMP,
> > > I
> > > > get the exception :(please give me some hints, Thx
> > > a
> > > > lot)
> > > >
> > > > [VssReportB] java.io.NotSerializableException:
> > > > com.arcsight.vssreport.VssReportItem
> > >
> > >
> > > ___
> > > JBoss-user mailing list
> > > [EMAIL PROTECTED]
> > >
> > http://lists.sourceforge.net/lists/listinfo/jboss-user
> >
> > __
> > Do You Yahoo!?
> > Make international calls for as low as $.04/minute with Yahoo! Messenger
> > http://phonecard.yahoo.com/
> >
> > ___
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-user
>
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] java.io.NotSerializableException need help

2001-07-28 Thread Alex . Devine


No, this is not likely the problem. If VssReportItem was Serializable but
had a reference to a non-Serializable class, then the exception you would
get would print out the name of the non-Serializable class. What is more
likely is that VssReportItem extends from a super class that is
non-Serializable that does not have a default constructor. Suppose you have
the following classes:

class NotSerializable() {
public NotSerializable(String s) {
...
}
}

class IThinkImSerializable extends NotSerializable implements Serializable
{
...
}

As it turns out, class IThinkImSerializable is actually NOT serializable,
because its parent class doesn't implement Serializable AND it doesn't have
a no-argument constructor. Two ways to fix this would be to:
1. Make NotSerializable implement Serializable
1. Give NotSerializable a public no-argument constructor - you probably
want to do this.

The Serialization protocol states that the FIRST non-Serializable class in
the class hierarchy that leads to a Serializable class must have a
no-argument constructor.

Alex



|+-->
||  Ole Husgaard <[EMAIL PROTECTED]>|
||  Sent by:|
||  [EMAIL PROTECTED]|
||  eforge.net  |
||  |
||  |
||  07/28/01 04:46 AM   |
||  Please respond to jboss-user|
||  |
|+-->
  
>-|
  |
 |
  |   To: [EMAIL PROTECTED] 
 |
  |   cc:  
 |
  |   Subject: Re: [JBoss-user] java.io.NotSerializableException need help 
 |
  
>-|




Hi,

An instance of a class implementing Serializable
can still be non-serializable at runtime, if it
holds a reference to another instance that is not
serializable at runtime.
See: http://java.sun.com/products/jdk/1.2/docs/guide/serialization/


Best Regards,

Ole Husgaard.


yan fan wrote:
>
> Yes , it did.
> --- Dmitri Colebatch <[EMAIL PROTECTED]> wrote:
> > Does com.arcsight.vssreport.VssReportItem implement
> > java.io.Serializable?  It needs to.
> >
> > cheesr
> > dim
> >
> > On Thu, 26 Jul 2001, yan fan wrote:
> >
> > > I am runing jboss&tomcat , with servlet , BMP, and
> > > when I try to get a ArrayList(which inside is the
> > > VssReportItem object hold some properties) in BMP,
> > I
> > > get the exception :(please give me some hints, Thx
> > a
> > > lot)
> > >
> > > [VssReportB] java.io.NotSerializableException:
> > > com.arcsight.vssreport.VssReportItem
> >
> >
> > ___
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> >
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
> __
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
>
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user

___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user





___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] java.io.NotSerializableException need help

2001-07-28 Thread Ole Husgaard

Hi,

An instance of a class implementing Serializable
can still be non-serializable at runtime, if it
holds a reference to another instance that is not
serializable at runtime.
See: http://java.sun.com/products/jdk/1.2/docs/guide/serialization/


Best Regards,

Ole Husgaard.


yan fan wrote:
> 
> Yes , it did.
> --- Dmitri Colebatch <[EMAIL PROTECTED]> wrote:
> > Does com.arcsight.vssreport.VssReportItem implement
> > java.io.Serializable?  It needs to.
> >
> > cheesr
> > dim
> >
> > On Thu, 26 Jul 2001, yan fan wrote:
> >
> > > I am runing jboss&tomcat , with servlet , BMP, and
> > > when I try to get a ArrayList(which inside is the
> > > VssReportItem object hold some properties) in BMP,
> > I
> > > get the exception :(please give me some hints, Thx
> > a
> > > lot)
> > >
> > > [VssReportB] java.io.NotSerializableException:
> > > com.arcsight.vssreport.VssReportItem
> >
> >
> > ___
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> >
> http://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> __
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user

___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] java.io.NotSerializableException need help

2001-07-27 Thread yan fan

Yes , it did.
--- Dmitri Colebatch <[EMAIL PROTECTED]> wrote:
> Does com.arcsight.vssreport.VssReportItem implement
> java.io.Serializable?  It needs to.
> 
> cheesr
> dim
> 
> On Thu, 26 Jul 2001, yan fan wrote:
> 
> > I am runing jboss&tomcat , with servlet , BMP, and
> > when I try to get a ArrayList(which inside is the
> > VssReportItem object hold some properties) in BMP,
> I
> > get the exception :(please give me some hints, Thx
> a
> > lot)
> > 
> > [VssReportB] java.io.NotSerializableException:
> > com.arcsight.vssreport.VssReportItem
> 
> 
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
>
http://lists.sourceforge.net/lists/listinfo/jboss-user


__
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/

___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] java.io.NotSerializableException need help

2001-07-26 Thread Dmitri Colebatch

Does com.arcsight.vssreport.VssReportItem implement
java.io.Serializable?  It needs to.

cheesr
dim

On Thu, 26 Jul 2001, yan fan wrote:

> I am runing jboss&tomcat , with servlet , BMP, and
> when I try to get a ArrayList(which inside is the
> VssReportItem object hold some properties) in BMP, I
> get the exception :(please give me some hints, Thx a
> lot)
> 
> [VssReportB] java.io.NotSerializableException:
> com.arcsight.vssreport.VssReportItem


___
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] java.io.NotSerializableException need help

2001-07-26 Thread yan fan

I am runing jboss&tomcat , with servlet , BMP, and
when I try to get a ArrayList(which inside is the
VssReportItem object hold some properties) in BMP, I
get the exception :(please give me some hints, Thx a
lot)

[VssReportB] java.io.NotSerializableException:
com.arcsight.vssreport.VssReportItem
[VssReportB]at
java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:1148)
[VssReportB]at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:366)
[VssReportB]at
java.rmi.MarshalledObject.(MarshalledObject.java:95)

[VssReportB]at
org.jboss.ejb.CacheKey.(CacheKey.java:58)
[VssReportB]at
org.jboss.ejb.plugins.EntityInstanceCache.createCacheKey(EntityInstanceCache.java:47)
[VssReportB]at
org.jboss.ejb.plugins.BMPPersistenceManager.findEntities(BMPPersistenceManager.java:251)
[VssReportB]at
org.jboss.ejb.EntityContainer.find(EntityContainer.java:39
2)
[VssReportB]at
java.lang.reflect.Method.invoke(Native Method)
[VssReportB]at
org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:639)
[VssReportB]at
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:160)
[VssReportB]at
org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:87)
[VssReportB]at
org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:135)
[VssReportB]at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:263)
[VssReportB]at
org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86)
[VssReportB]at
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:164)
[VssReportB]at
org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106)
[VssReportB]at
org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:316)
[VssReportB]at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContainerInvoker.java:436)
[VssReportB]at
org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:212)
[VssReportB]at $Proxy6.findAllByTime(Unknown
Source)
[VssReportB]at
com.arcsight.vssreport.ejb.TrackproEJB.getAllVssReport(TrackproEJB.java:171)
[VssReportB]at
java.lang.reflect.Method.invoke(Native Method)
[VssReportB]at
org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:570)
[VssReportB]at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:190)
[VssReportB]at
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:209)
[VssReportB]at
org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133)
[VssReportB]at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:263)
[VssReportB]at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
[VssReportB]at
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
[VssReportB]at
org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:326)
[VssReportB]at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:482)
[VssReportB]at
org.jboss.ejb.plugins.jrmp.interfaces.StatefulSessionProxy.invoke(StatefulSessionProxy.java:150)
[VssReportB]at $Proxy5.getAllVssReport(Unknown
Source)
[VssReportB]at
com.arcsight.vssreport.web.VssServlet.doPost(VssServlet.java:94)
[VssReportB]at
javax.servlet.http.HttpServlet.service(HttpServlet.java:76
0)
[VssReportB]at
javax.servlet.http.HttpServlet.service(HttpServlet.java:85
3)
[VssReportB]at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
[VssReportB]at
org.apache.tomcat.core.Handler.service(Handler.java:287)
[VssReportB]at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
[VssReportB]at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
[VssReportB]at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
[VssReportB]at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
[VssReportB]at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
[VssReportB]at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
[VssReportB]at
java.lang.Thread.run(Thread.java:484)
[VssReportB] java.io.NotSerializableException:
com.arcsight.vssreport.VssRepo
rtItem
[VssReportB]at
java.io.ObjectOutputStream.outputObject(ObjectOutputStream
.java:1148)
[VssReportB]at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.
java:366)
[VssReportB]at
java.rmi.MarshalledObject.(MarshalledObject.java:95)

[VssReportB]at
org.jboss.ejb.CacheKey.(CacheKey.java:58)
[VssReportB]at
org.jboss.ejb.plugins.EntityInstanceCache.createCacheKey(EntityInstanceCache.java:47)
[Vss