Exceptions when posting on microblogs portlet in Weblogic 10.3.2

Description

Steps to reproduce:
1. Start up liferay
2. Hot deploy the microblogs-portlet
3. Add a page
4. Add microblogs portlet to page
5. Post a status message

You will get errors in the console. (See attachment) Also, you will notice that each time you post a new status only the newest post is shown.

Environment

Weblogic 10.3.2 + HSQL. Firefox 3.5.6. Portal 6.1.x GIT ID: 7d72f140fee5f5e4d5d09512f8f26d38ae67356f. Plugins 6.1.x GIT ID: 40347f1b30bb0ac376db22400d9bc255f355d017. Weblogic 10.3.2 + MySQL 5. Firefox 3.5.6. Portal 6.2.x GIT ID: 73c62ab7a1fc2d47f8e4ac58ee2f42b0c1eaee0f. Plugins 6.2.x GIT ID: 770beccba85c31f4a7fe3e30274222de86d87c7f.

Attachments

1

Activity

Show:

Paul Piao July 31, 2012 at 9:13 PM
Edited

PASSED Manual Testing following the steps in the description.

Reproduced on:
Weblogic 10.3.2 + MySQL 5. Portal 6.2.x GIT ID: 73c62ab7a1fc2d47f8e4ac58ee2f42b0c1eaee0f.
Plugins 6.2.x GIT ID: 770beccba85c31f4a7fe3e30274222de86d87c7f.

I can see the attachment error.

Fixed on:
Weblogic 10.3.2 + MySQL 5. Portal 6.1.x EE GIT ID: 1b34701133317b83ff8bf3193d8789da9506b9b8.
Plugins 6.1.x EE GIT ID: 5770317725ff18cadf72394cc1fe987ef28e0b9f.

Weblogic 10.3.2 + MySQL 5. Portal 6.2.x GIT ID: a1504ad0359b4095cb7dc02c0857500937487390.
Plugins 6.2.x GIT ID: fff32cc2f84df01c8d840040341be286e598ab8d.

I can not see the error message in console.

Igor Spasic July 27, 2012 at 8:28 AM

After discussing with BrianC, we took a different approach - instead of trying to make things serializable or to switch the weblogic behavior off, we wrap objects with dummy handler that holds wrapped object in a transient field. This is done on setAttribute() and on getAttribute() the original object is unwrapped.

As suggested by BrianC, there are two central places where all requests go through: MainServlet#protectRequest and #encryptRequest. While this is true for Tomcat; I find out we need to fix some more places on Weblogic (?!).

Note: this fix only solves HttpServletRequest.getAttribute(). Similar thing should be applied on session and servletContext once when we notice this issue.

Igor Spasic July 25, 2012 at 5:46 AM

The problem happens in the following line of microblogs-portlet\microblogs\view_microblogs_entries.jsp:

We put PortletURLImpl in the request as attribute and Weblogic serialize it on getAttribute(). For more details about this Weblogic behavior, please visit: http://www.liferay.com/community/wiki/-/wiki/Main/Weblogic+tips#section-Weblogic+tips-*.getAttribute%28%29+and+Serialization

I've tried to fix using following ideas:

  • enable optimistic-serialization property, both in weblogic.xml (was already set) and on domain

  • running Weblogic in PRODUCTION mode, since in the development mode the server may test attributes regardless the above setting

  • finally, I've tried to add missing Serialized interfaces where it was missing:

    • SharedSessionServletRequest

    • PortalContextImpl

    • PortletContextImpl

    • PortletRequestImpl

but this still didn't help. After above changes, weblogic.servlet.internal.WebAppServletContext is not serializable and we can not do anything about it (not Portals class).

Robert Srisam-ang July 19, 2012 at 2:35 PM

Running into this issue again so I am reopening this ticket:

Weblogic 10.3.2 + MySQL 5. Portal 6.1.x EE GIT ID: 276de09956ace31ac09ccc8736259b6f487a98f8.
Plugins 6.1.x EE GIT ID: 799f2eba42e7a1baa9ca63a19cccd569caa7caa3.

Paul Piao May 31, 2012 at 8:08 PM

PASSED Manual Testing following the steps in the description.

Reproduced on:
Weblogic 10.3.2 + MySQL 5. Firefox 3.5.6. Portal 6.2.x GIT ID: 73c62ab7a1fc2d47f8e4ac58ee2f42b0c1eaee0f.
Plugins 6.2.x GIT ID: 770beccba85c31f4a7fe3e30274222de86d87c7f.

I can see the attachment error.

Fixed on:
Weblogic 10.3.2 + MySQL 5. Portal 6.1.x EE GIT ID: 05c1af41aa32cc740b67c8cc937864abd5bb351b.
Plugins 6.1.x EE GIT ID: ba0be5a2255c79d20497ae632535168499e2edb2.

Weblogic 10.3.2 + MySQL 5. Portal 6.1.x CE GIT ID: 4ff1b724438fa61b000f24b51fb51309cad6e2a8.
Plugins 6.1.x CE GIT ID: 4aef4c6ab1befa7b9268d05d9a447845214509ae.

Weblogic 10.3.2 + MySQL 5. Portal 6.2.x GIT ID: a72fe03b6a054e2fc0f5ce30624cb5f424683e1d.
Plugins 6.2.x GIT ID: 7e0a06baba53f2b05d6de31d8201d3dd9053ae9f.

I can not see the error message in console.

Fixed

Details

Assignee

Reporter

Labels

Branch Version/s

6.1.x

Backported to Branch

Committed

Fix Priority

3

Application Servers

Oracle Weblogic Server 10.3

Git Pull Request

Bug Type

Regression Bug

Components

Priority

Zendesk Support

Created April 11, 2012 at 2:36 PM
Updated June 24, 2023 at 3:51 PM
Resolved July 28, 2012 at 9:53 AM
Loading...