Hi

You can try and declare it as transient in your form/action

Hermod

-----Opprinnelig melding-----
Fra: Gareth Evans [mailto:[EMAIL PROTECTED]
Sendt: 8. september 2005 10:54
Til: Struts Users Mailing List
Emne: Re: Exception after File Upload.


Because when you shutdown tomcat, it tries to serial all objects within
the session scope.  The 
class you are referring to
'org.apache.commons.fileupload.DeferredFileOutputStream' does not 
implement 'java.io.Serializable' and therefore tomcat throws this
exception when trying to serialize it.

Whilst I don't know what the class
'org.apache.catalina.session.StandardManager' does, presumably is 
performs a check to see if an object stored within the session is
serializable before trying to 
write it disk, or it might remove non-serializable object from the
session scope on shutdown.

Regards,

Gareth

Anuradha S.Athreya wrote:

> I have a web application running on Tomcat 5.0.
> 
> One of the features is this appln enables file upload. After an
upload, If I
> stop and restart the server , I get this particular expception.
> SEVERE: IOException while loading persisted sessions:
> java.io.WriteAbortedException: writing aborted; java.io.
> NotSerializableException:
> org.apache.commons.fileupload.DeferredFileOutputStream
> java.io.WriteAbortedException: writing aborted;
> java.io.NotSerializableException: org.apache.commons.fileuploa
> d.DeferredFileOutputStream
>         at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1278)
>         at
>
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
>         at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
>         at
>
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646
)
>         at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
>         at
>
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
>         at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
>         at
>
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646
)
>         at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
>         at
>
java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)
>         at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)
>         at
>
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646
)
>         at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
>         at
java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
>         at
>
org.apache.catalina.session.StandardSession.readObject(StandardSession.j
ava:
> 1401)
>         at
>
org.apache.catalina.session.StandardSession.readObjectData(StandardSessi
on.j
> ava:895)
>         at
>
org.apache.catalina.session.StandardManager.doLoad(StandardManager.java:
463)
>         at
>
org.apache.catalina.session.StandardManager.load(StandardManager.java:39
0)
>         at
>
org.apache.catalina.session.StandardManager.start(StandardManager.java:7
03)
>         at
>
org.apache.catalina.core.ContainerBase.setManager(ContainerBase.java:542
)
>         at
>
org.apache.catalina.startup.ContextConfig.managerConfig(ContextConfig.ja
va:3
> 49)
>         at
>
org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:654)
>         at
>
org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.j
ava:
> 253)
>         at
>
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu
ppor
> t.java:166)
>         at
>
org.apache.catalina.core.StandardContext.start(StandardContext.java:4224
)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1125)
>         at
> org.apache.catalina.core.StandardHost.start(StandardHost.java:832)
>         at
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1125)
>         at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:518)
>         at
>
org.apache.catalina.core.StandardService.start(StandardService.java:519)
>         at
>
org.apache.catalina.core.StandardServer.start(StandardServer.java:2345)
>         at
org.apache.catalina.startup.Catalina.start(Catalina.java:598)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39
> )
>         at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl
> .java:25)
>         at java.lang.reflect.Method.invoke(Method.java:324)
>         at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:297)
>         at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:398)
> Caused by: java.io.NotSerializableException:
> org.apache.commons.fileupload.DeferredFileOutputStream
>         at
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
>         at
>
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:13
32)
>         at
>
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
>         at
>
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1
247)
> 
> As a solution that I found , I added this to the server.xml of Tomcat.
> <Manager className="org.apache.catalina.session.StandardManager"
> pathname=""/>
> 
> Can someone tell me what could be the root of this problem.
> 
> 
> 
> 

-- 
Gareth Evans

MSoft eSolutions Limited
Technology Centre
Inward Way
Rossmore Business Park
Ellesmere Port
Cheshire
CH65 3EN

-- 
Tel:    +44 (0)870 0100 704
Fax:    +44 (0)870 9010 705
E-Mail: [EMAIL PROTECTED]
Web:    www.msoft.co.uk

----------------------------------------------
Terms:
Please note that any prices quoted within this e-mail are subject to
VAT.
All program details and code described in this e-mail are subject to
copyright © of MSoft eSolutions Limited and remain the intellectual
property of MSoft eSolutions Limited.
Any proposal or pricing information contained within this e-mail are
subject to MSoft eSolutions' Terms and Conditions
----------------------------------------------
Disclaimer:
This message is intended only for use of the addressee. If this message
was sent to you in error, please notify the sender and delete this
message. MSoft eSolutions Limited cannot accept responsibility for
viruses,
so please scan attachments. Views expressed in this message do not
necessarily reflect those of MSoft eSolutions Limited who will not
necessarily be bound by its contents.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

This email with attachments is solely for the use of the individual or
entity to whom it is addressed. Please also be aware that the DnB NOR Group
cannot accept any payment orders or other legally binding correspondence with
customers as a part of an email. 

This email message has been virus checked by the virus programs used
in the DnB NOR Group.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to