Why does the store() method in my JSR-168 portlet fail?

Updated: February 23, 2007
Why does the store() method in my JSR-168 portlet fail?

Academus 2.0 (and opensource uPortals before 03 November 2004 such as uPortal 2.3.x and 2.4.0) ships with an older version of the Pluto .jar (Java archive, a library file used in a Java web application) with limitations to its support for the PortletPreferences store() method. Not all JSR-168 portlets make use of this method, but some (increasingly many) do. Those portlets will fail in Academus 2.0 instances with the following appearing in the log files (likely portal.log but exactly where your Academus is logging depends on configuration).


Nested Exception is java.lang.AbstractMethodError:
org.jasig.portal.container.om.common.PreferenceSetImpl.add(Ljava/lang/String;Ljava/util/Collection;)Lorg/apache/pluto/om/common/Preference;
       at
org.apache.pluto.core.impl.PortletPreferencesImpl.store(PortletPreferencesImpl.java:329)

       at
yourpackage.YourPortlet.processAction(YourPortlet.java:82)
.....

It is the experience of at least one Academus 2.0 customer that replacing the pluto-1.0.1.jar that ships with Academus with either pluto-1.0.1-rc1.jar or pluto-1.0.1-rc2.jar will resolve this issue. We thank her for bringing this issue and its workaround to Unicon's attention.

This workaround has not been tested or QAed by the Academus development team. We regret that we are unable to provide unlimited support for modifications to the Academus platform itself, and so instances of Academus 2.0 with this change applied that then experience problems that may be related to having applied this change may be asked to roll back the change and validate that the problem occurs without the change. Applying this workaround to your Academus instance entails accepting some of the risk of a change that has not been formally tested in Academus.

When you upgrade versions of Pluto, whether by updating Pluto library versions in-place in Academus 2.0, upgrading to Academus 2.1, or migrating to uPortal, you may need to update your portlet.xml configuration in keeping with the more stringent enforcement of portlet.xml standards in later Pluto versions.

Academus 2.1 ships built on the latest available uPortal, uPortal 2.5.3, which included pluto-1.0.1-rc2.jar. The potential workaround described in this article is therefore not necessary on Academus 2.1. Customers seeking the improved portlet support afforded by upgrading to this later version of Pluto are encouraged to upgrade to Academus 2.1 when it is available rather than locally modifying their Academus instance if they are risk-averse and desire to remain on the supported platform. On the other hand, some customers may wish to take on this risk of running a modestly modified Academus to gain this updated library in advance of upgrading to Academus 2.1.

The version of the pluto .jar that ships with uPortal 2.5.3 is available for download from the JA-SIG uPortal opensource project.