Sakai help system uses hibernate in a dangerous way
GENERAL
TESTING
GENERAL
TESTING
Description
The new help system creates it's own hibernate session factory (which is probably not a great idea) and also depends on creating a new CacheManager and cache for holding L2 results BUT shares the other 2 hibernate caches with the rest of Sakai.
Probably the best solution here is to not create a separate hibernate SessionManager but the stopgap solution is to just use the existing cacheProvider (org.sakaiproject.springframework.orm.hibernate.SakaiCacheProvider) rather than recreating a new one.
components/sakai-comp-help/WEB-INF/components.xml]: Cannot resolve reference to bean 'helpSessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'helpSessionFactory' defined in file /opt/tomcat-trunk/components/sakai-comp-help/WEB-INF/components.xml: Cannot create inner bean 'org.sakaiproject.springframework.orm.hibernate.SakaiCacheProvider#749cd006' of type [org.sakaiproject.springframework.orm.hibernate.SakaiCacheProvider] while setting bean property 'cacheProvider'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.sakaiproject.springframework.orm.hibernate.SakaiCacheProvider#749cd006' defined in file /opt/tomcat-trunk/components/sakai-comp-help/WEB-INF/components.xml: Cannot resolve reference to bean 'org.sakaiproject.springframework.orm.hibernate.L2Cache' while setting bean property 'defaultCache'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org.sakaiproject.springframework.orm.hibernate.L2Cache' is defined
The new help system creates it's own hibernate session factory (which is probably not a great idea) and also depends on creating a new CacheManager and cache for holding L2 results BUT shares the other 2 hibernate caches with the rest of Sakai.
Probably the best solution here is to not create a separate hibernate SessionManager but the stopgap solution is to just use the existing cacheProvider (org.sakaiproject.springframework.orm.hibernate.SakaiCacheProvider) rather than recreating a new one.
components/sakai-comp-help/WEB-INF/components.xml]: Cannot resolve reference to bean 'helpSessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'helpSessionFactory' defined in file /opt/tomcat-trunk/components/sakai-comp-help/WEB-INF/components.xml: Cannot create inner bean 'org.sakaiproject.springframework.orm.hibernate.SakaiCacheProvider#749cd006' of type [org.sakaiproject.springframework.orm.hibernate.SakaiCacheProvider] while setting bean property 'cacheProvider'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.sakaiproject.springframework.orm.hibernate.SakaiCacheProvider#749cd006' defined in file /opt/tomcat-trunk/components/sakai-comp-help/WEB-INF/components.xml: Cannot resolve reference to bean 'org.sakaiproject.springframework.orm.hibernate.L2Cache' while setting bean property 'defaultCache'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org.sakaiproject.springframework.orm.hibernate.L2Cache' is defined