[Portfolio] osp_presentation.isCollab is NULL after a 2.7 upgrade

Sean Keesler sean.keesler at threecanoes.com
Mon Jun 21 19:59:26 PDT 2010


I upgraded a test instance of Sakai from 2.6 to 2.7. New sites and
sites with no portfolios worked fine.
When I went to the "Portfolio" tool in a site with existing portfolios
in them I got an error:

org.sakaiproject.portal.api.PortalHandlerException:
org.sakaiproject.tool.api.ToolException: Request processing failed;
nested exception is
org.springframework.orm.hibernate3.HibernateSystemException: Null
value was assigned to a property of primitive type setter of
org.theospi.portfolio.presentation.model.Presentation.isCollab; nested
exception is org.hibernate.PropertyAccessException: Null value was
assigned to a property of primitive type setter of
org.theospi.portfolio.presentation.model.Presentation.isCollab

It looks like the conversion scripts originally set the new isCollab
column to "0" as a default.
https://source.sakaiproject.org/svn/reference/tags/sakai-2.7.0-b08/docs/conversion/sakai_2_7_0_mysql_conversion.sql
ALTER TABLE osp_presentation ADD isCollab tinyint NOT NULL DEFAULT '0';

...but later (rc1 in response to SAK-18506) the script was changed to
assign no default value.
https://source.sakaiproject.org/svn/reference/tags/sakai-2.7.0-rc01/docs/conversion/sakai_2_7_0_mysql_conversion.sql
ALTER TABLE osp_presentation ADD isCollab bit;

Easy fix for anyone upgrading:
update osp_presentation set isCollab=0 where isCollab IS NULL;

I see Anthony White asked before he changed the conversion scripts
during the flurry of activity before the release:
http://collab.sakaiproject.org/pipermail/portfolio/2010-May/000609.html

Beth responded, but I think we sort of missed this one. Hopefully this
post is easily found by googlers.
Perhaps we can switch it back to assign a default for a 2.7.1 release
and on the 2.7.x branch.



Sean Keesler
130 Academy Street
Manlius, NY 13104
315-682-0830
sean.keesler at threecanoes.com


More information about the portfolio mailing list