Summary: A Bug surfaced in Category Portlet Selector when storing defaults, the selector threw an NPE during store to persistent preferences. Discovered that the selector was still coded against 2.1.3 apis, and needed to be updated. Then discovered the PortletDefinitionImpl never keeps a copy of the Preferences collection, but always delegates to the Preferences Provider to retrieve preferences, and then wrappers the result from the provider with every accessor call. The selector was often dereferencing the prefs collection. This should not be a problem in a normal transactional environment... For now, the problem can be avoided by only dereferencing once, making manipulations to the held Preferences, and then 'committing' with a new storeDefaults api which takes a second Preferences handle. Also got bogged down in an OJB debugging session that turned out to be a simple typo in the OJB mapping file (username is not a primary key).