Serialization deploy errors on Weblogic 10.3.2

Description

Steps to reproduce:
1. Deploy kaleo-web plugin

You will notice errors in the console. (See attachments) You will still be able to use the plugin, the only issue is the console errors. This also occurs with kaleo-form and kaleo designer.

<Jul 13, 2012 1:19:32 PM PDT> <Error> <HTTP> <BEA-101002> <[ServletContext@31382814[app:_appsdir_kaleo-web_dir module:kaleo-web path:/kaleo-web spec-version:2.5]] Could not deserialize the context attribute. java.io.NotSerializableException: org.apache.axis.configuration.FileProvider at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158) Truncated. see log file for complete stacktrace > <Jul 13, 2012 1:19:32 PM PDT> <Error> <HTTP> <BEA-101002> <[ServletContext@31382814[app:_appsdir_kaleo-web_dir module:kaleo-web path:/kaleo-web spec-version:2.5]] Could not deserialize the context attribute. java.io.NotSerializableException: org.apache.axis.configuration.FileProvider at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518) at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483) at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400) at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158) Truncated. see log file for complete stacktrace >

Environment

Weblogic 10.3 + MySQL 5. Portal 6.2.x GIT ID: 631cdfc336c2ef6af0d78e67f8a5e931bf2d8eb0. Plugins 6.2.x GIT ID: 767f0bac5bc4bc7c6ca183dbf603c3b20ac516c8. Weblogic 10.3.2 + MySQL 5. Portal 6.1.x EE GIT ID: e653a7a7c029aa594d8711d83f1e47eb0c31a688. Plugins 6.1.x EE GIT ID: 6b8863222d4a54f548442b3dee2a4fe5cdaf8f85. Weblogic 10.3 + MySQL 5. Portal 6.0.x EE GIT ID: 6a1d60229ef18cc269d07e28a87ecf41e304ef8e. Plugins 6.0.x EE GIT ID: 254348b7b5bacb9c3035b3d0d495076f875130cc.

Attachments

4
  • 19 Jul 2012, 04:48 AM
  • 19 Jul 2012, 04:48 AM
  • 18 Jul 2012, 01:32 PM
  • 12 Jul 2012, 02:25 PM

Activity

Show:

Robert Srisam-ang July 24, 2012 at 3:02 PM

PASSED Manual Testing following the steps in the description.

Reproduced on:
Weblogic 10.3 + MySQL 5. Portal 6.2.x GIT ID: 631cdfc336c2ef6af0d78e67f8a5e931bf2d8eb0.
Plugins 6.2.x GIT ID: 767f0bac5bc4bc7c6ca183dbf603c3b20ac516c8.

Serialization deploy errors.

Fixed on:
Weblogic 10.3 + MySQL 5. Portal 6.1.x CE GIT ID: 9848325ef53d78887e53c28b0fa41034154f817b.
Plugins 6.1.x CE GIT ID: c449966d78dbde3d7525d712a1d337a3a0ca88e2.
Weblogic 10.3 + MySQL 5. Portal 6.1.x EE GIT ID: df7ec3c88660e2687a295450d0f596c3e70687fa.
Plugins 6.1.x EE GIT ID: 9881d65087562debc602a9b3fdb717be98da21fe.
Weblogic 10.3 + MySQL 5. Portal 6.2.x GIT ID: 5b82427606ee161e20b348af34e36928a1a242c7.
Plugins 6.2.x GIT ID: 1e56b01fca1f124fb055e7cbc30419f39675debd.

No serialization deploy errors. Tested kaleo-web and knowledge base.

Michael Saechang July 24, 2012 at 10:45 AM

Committed on:
Portal 6.1.x CE GIT ID: af56b66d47c86d13b4c6c201b3298c20f1798b35.
Portal 6.2.x GIT ID: 0cf52dfbcdc942cd5d7289bfae98f6d4b3b23ff0.

Igor Spasic July 19, 2012 at 4:47 AM
Edited

Ok, I was able to fix the axis.jar (v1.4) only by changing two interfaces and making them Serializable:

  • org.apache.axis.EngineConfiguration

  • org.apache.axis.session.Session

When I use modified axis.jar, no exception is thrown.

I will attached compiled classes here and notify Brian C about this.

Igor Spasic July 19, 2012 at 2:21 AM
Edited

This is simply the behavior of Weblogic; see: http://www.liferay.com/community/wiki/-/wiki/Main/Weblogic+tips#section-Weblogic+tips-ServletContext.getAttribute%28%29+and+Serialization:

Objects that need to be retrieved through the ServletContext.getAttribute() method need to implement the Serializable interface. If they are not serializable, the exception java.io.NotSerializableException will be thrown.

Servlet specification 2.4 says the following, in SRV.7.7.2 Distributed Environment:

The container
must be able to handle all objects placed into instances of the HttpSession class
using the setAttribute or putValue methods appropriately. The following
restrictions are imposed to meet these conditions:
• The container must accept objects that implement the Serializable interface.
....
The distributed servlet container must support the mechanism necessary for
migrating objects that implement Serializable.
....

However, this all is explicitly specificed for sessions. Unfortunatelly, the specification does not says anything about ServletContext attributes. Note that we can not catch the exception as it is already catched (and reported) by weblogic.

Robert Srisam-ang July 18, 2012 at 1:32 PM
Edited

I came across the same errors while testing Social Office for the so-portlet and microblogs-portlet

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Labels

Branch Version/s

6.1.x

Backported to Branch

Committed

Fix Priority

3

Application Servers

Oracle Weblogic Server 10.3

Priority

Zendesk Support

Created July 12, 2012 at 12:50 PM
Updated June 24, 2023 at 3:54 PM
Resolved July 19, 2012 at 3:32 PM