[Building Sakai] Profile2 1.5 org.apache.wicket.WicketRuntimeException in 2.9

David Horwitz david.horwitz at uct.ac.za
Fri Nov 30 06:09:24 PST 2012


On 5.1 at least you need the update for existing values, the default 
will only affect new records


D
On 11/30/2012 04:06 PM, Sam Ottenhoff wrote:
> Daivd H,
>
> Are you sure?  I ran a test and the default was populated.  MySQL 5.5.
>
> I believe you are correct re Oracle.  This sounds to me like a 
> possible bug with Oracle conversion script.
>
> David W, Did you run the conversion script *before* starting up Sakai 
> 2.9 for the first time?
>
> --Sam
>
>
> On Fri, Nov 30, 2012 at 8:50 AM, David Horwitz 
> <david.horwitz at uct.ac.za <mailto:david.horwitz at uct.ac.za>> wrote:
>
>     In Mysql that would set the default but not populate existing
>     fields you would need:
>
>     update PROFILE_PREFERENCES_T set USE_GRAVATAR = false where
>     USE_GRAVATAR is null;
>
>     D
>
>     On 11/30/2012 03:48 PM, Sam Ottenhoff wrote:
>>     What database are you using?
>>
>>     Didn't this line from MySQL set the defaults correctly?
>>
>>     alter table PROFILE_PREFERENCES_T add USE_GRAVATAR bit not null
>>     DEFAULT false;
>>
>>
>>
>>     On Fri, Nov 30, 2012 at 8:27 AM, David Wafula <davidwaf at gmail.com
>>     <mailto:davidwaf at gmail.com>> wrote:
>>
>>         Turns out column USE_GRAVATAR  in PROFILE_PREFERENCES_T  had
>>         NULL entries after conversion, hence the error.
>>
>>
>>         On Fri, Nov 30, 2012 at 3:18 PM, David Wafula
>>         <davidwaf at gmail.com <mailto:davidwaf at gmail.com>> wrote:
>>
>>             Hi,
>>
>>             So i upgraded a 2.8 instance to 2.9 (Really i just upgraded a 2.8 DB to 2.9..then did a fresh 2.9 install over it). I am getting the following in Profile2 (1.5.0), would appreciate where to look. But, another clean install of 2.9 of same code doesnt throw this error, it runs fine.
>>
>>             org.sakaiproject.portal.api.PortalHandlerException: org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor public org.sakaiproject.profile2.tool.Dispatcher()
>>                  at org.sakaiproject.portal.charon.SkinnableCharonPortal.doGet(SkinnableCharonPortal.java:881)
>>             caused by: org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor public org.sakaiproject.profile2.tool.Dispatcher()
>>                  at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:97)
>>             caused by: java.lang.reflect.InvocationTargetException
>>                  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>>             caused by: org.springframework.orm.hibernate3.HibernateSystemException: Null value was assigned to a property of primitive type setter of org.sakaiproject.profile2.model.ProfilePreferences.useGravatar; nested exception is org.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of org.sakaiproject.profile2.model.ProfilePreferences.useGravatar
>>                  at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
>>             caused by: org.hibernate.PropertyAccessException: Null value was assigned to a property of primitive type setter of org.sakaiproject.profile2.model.ProfilePreferences.useGravatar
>>                  at org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:329)
>>             caused by: java.lang.IllegalArgumentException
>>                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>                  at java.lang.reflect.Method.invoke(Method.java:601)
>>                  at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:42)
>>                  at org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:329)
>>                  at org.hibernate.tuple.entity.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:232)
>>                  at org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:3557)
>>                  at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:133)
>>                  at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:854)
>>                  at org.hibernate.loader.Loader.doQuery(Loader.java:729)
>>                  at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
>>                  at org.hibernate.loader.Loader.doList(Loader.java:2217)
>>                  at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2108)
>>                  at org.hibernate.loader.Loader.list(Loader.java:2103)
>>                  at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
>>                  at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:340)
>>                  at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
>>                  at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1122)
>>                  at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
>>                  at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:811)
>>                  at org.sakaiproject.profile2.dao.impl.ProfileDaoImpl$25.doInHibernate(ProfileDaoImpl.java:738)
>>                  at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:419)
>>                  at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:339)
>>                  at org.sakaiproject.profile2.dao.impl.ProfileDaoImpl.getPreferencesRecordForUser(ProfileDaoImpl.java:742)
>>
>>
>>             -- 
>>             David Wafula
>>
>>
>>
>>
>>         -- 
>>         David Wafula
>>
>>         _______________________________________________
>>         sakai-dev mailing list
>>         sakai-dev at collab.sakaiproject.org
>>         <mailto:sakai-dev at collab.sakaiproject.org>
>>         http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>
>>         TO UNSUBSCRIBE: send email to
>>         sakai-dev-unsubscribe at collab.sakaiproject.org
>>         <mailto:sakai-dev-unsubscribe at collab.sakaiproject.org> with a
>>         subject of "unsubscribe"
>>
>>
>>
>>
>>     _______________________________________________
>>     sakai-dev mailing list
>>     sakai-dev at collab.sakaiproject.org  <mailto:sakai-dev at collab.sakaiproject.org>
>>     http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>>
>>     TO UNSUBSCRIBE: send email tosakai-dev-unsubscribe at collab.sakaiproject.org  <mailto:sakai-dev-unsubscribe at collab.sakaiproject.org>  with a subject of "unsubscribe"
>
>
>     _______________________________________________
>     sakai-dev mailing list
>     sakai-dev at collab.sakaiproject.org
>     <mailto:sakai-dev at collab.sakaiproject.org>
>     http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
>     TO UNSUBSCRIBE: send email to
>     sakai-dev-unsubscribe at collab.sakaiproject.org
>     <mailto:sakai-dev-unsubscribe at collab.sakaiproject.org> with a
>     subject of "unsubscribe"
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20121130/33dcefcb/attachment.html 


More information about the sakai-dev mailing list