Serialization of formfile uploaded files in Apache + Tomcat cluster sturts

Source: Internet
Author: User

I have been searching for this problem for a long time !!!!!!!!!!

The error is as follows:

Severe: Unable to serialize Delta request for sessionid [7c207deba5350582eff4321ad3089918]
Java. Io. notserializableexception: org. Apache. Struts. Upload. commonsmultipartrequesthandler $ commonsformfile
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. objecttoutputstream. writeordinaryobject (objectoutputstream. Java: 1290)
At java. Io. objectoutputstream. writeobject0 (objectoutputstream. Java: 1079)
At java. Io. objectoutputstream. writeobject (objectoutputstream. Java: 302)
At org. Apache. Catalina. Cluster. session. deltarequest $ attributeinfo. writeexternal (deltarequest. Java: 347)
At org. Apache. Catalina. Cluster. session. deltarequest. writeexternal (deltarequest. Java: 264)
At org. Apache. Catalina. Cluster. session. deltamanager. unloaddeltarequest (deltamanager. Java: 715)
At org. Apache. Catalina. Cluster. session. deltamanager. requestcompleted (deltamanager. Java: 1298)
At org. Apache. Catalina. Cluster. tcp. replicationvalve. Send (replicationvalve. Java: 549)
At org. Apache. Catalina. Cluster. tcp. replicationvalve. sendmessage (replicationvalve. Java: 536)
At org. Apache. Catalina. Cluster. tcp. replicationvalve. sendsessionreplicationmessage (replicationvalve. Java: 518)
At org. Apache. Catalina. Cluster. tcp. replicationvalve. sendreplicationmessage (replicationvalve. Java: 428)
At org. Apache. Catalina. Cluster. tcp. replicationvalve. Invoke (replicationvalve. Java: 362)
At org. Apache. Catalina. Valves. errorreportvalve. Invoke (errorreportvalve. Java: 117)
At org. Apache. Catalina. Core. standardenginevalve. Invoke (standardenginevalve. Java: 108)
At org. Apache. Catalina. connector. coyoteadapter. Service (coyoteadapter. Java: 151)
At org. Apache. JK. server. jkcoyotehandler. Invoke (jkcoyotehandler. Java: 200)
At org. Apache. JK. Common. handlerrequest. Invoke (handlerrequest. Java: 283)
At org. Apache. JK. Common. channelsocket. Invoke (channelsocket. Java: 773)
At org. Apache. JK. Common. channelsocket. processconnection (channelsocket. Java: 703)
At org. Apache. JK. Common. channelsocket $ socketconnection. Runit (channelsocket. Java: 895)
At org. Apache. tomcat. util. threads. threadpool $ controlrunnable. Run (threadpool. Java: 685)
At java. Lang. thread. Run (thread. Java: 595)

 

Solution:

PrivateTransientFormfile file = NULL;

Java keyword transient:
Java serialization provides a mechanism for persistence object instances. When a persistent object is stored, there may be a special object data member. We do not want to use the serialization mechanism to save it. To disable serialization on a domain of a specific object, you can add the keyword transient before this domain. Transient is a keyword of the Java language used to indicate that a domain is not part of the object's serialization. When an object is serialized, the value of the transient variable is not included in the serialized representation. However, non-transient variables are included.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.