Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-40137

exception starting up external sitestats with sitestats.externalDb.auto.ddl=validate or false

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: RESOLVED
    • Priority: Minor
    • Resolution: Non-Issue
    • Affects Version/s: 12.1
    • Fix Version/s: None
    • Component/s: Sitestats
    • Labels:
      None
    • Test Plan:
      Hide

      Please add a Test Plan here.

      Show
      Please add a Test Plan here.

      Description

      Steps

      • configure sakai.properties to use an external database for sitestats
      • set the property sitestats.externalDb.auto.ddl=validate or false
        • # Used when sitestats.db is set to external to auto.ddl (create) the database
          # DEFAULT: update (recommended) or validate to not run any updates
          sitestats.externalDb.auto.ddl=validate
          
      • start up tomcat

      The problem happens with these values

      sitestats.externalDb.auto.ddl=validate
      sitestats.externalDb.auto.ddl=false
      

      The problem does NOT happen if you use the default value 'update' or leave it commented out

      #sitestats.externalDb.auto.ddl=validate
      sitestats.externalDb.auto.ddl=update
      sitestats.externalDb.auto.ddl=true
      

      an error will appear in the tomcat logs

      13-Jun-2018 17:01:43.268 ERROR [sakai-12.1-dev-uh.localhost-startStop-1] org.sakaiproject.component.impl.SpringCompMgr.init Error creating bean with name 'org.sakaiproject.entitybroker.impl.entityprovider.EntityProviderAutoRegistrar' defined in file [/usr/local/apache-tomcat-8.5.31-for-sakai-12.1-dev-uh/components/entitybroker-pack/WEB-INF/components.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.sakaiproject.sitestats.api.report.ReportDefEntityProvider' defined in file [/usr/local/apache-tomcat-8.5.31-for-sakai-12.1-dev-uh/components/sitestats-impl/WEB-INF/components.xml]: Cannot resolve reference to bean 'org.sakaiproject.sitestats.api.report.ReportManager' while setting bean property 'reportManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.sakaiproject.sitestats.api.report.ReportManager' defined in file [/usr/local/apache-tomcat-8.5.31-for-sakai-12.1-dev-uh/components/sitestats-impl/WEB-INF/components.xml]: Cannot resolve reference to bean 'org.sakaiproject.sitestats.SiteStatsTransactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.sakaiproject.sitestats.SiteStatsTransactionManager' defined in org.sakaiproject.sitestats.impl.SiteStatsPersistenceConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.transaction.PlatformTransactionManager]: Factory method 'getSiteStatsTransactionManager' threw exception; nested exception is org.hibernate.HibernateException: Wrong column type in sakai_sitestats_12_1_dev_uh.sst_preferences for column PREFS. Found: text, expected: longtext
      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.sakaiproject.entitybroker.impl.entityprovider.EntityProviderAutoRegistrar' defined in file [/usr/local/apache-tomcat-8.5.31-for-sakai-12.1-dev-uh/components/entitybroker-pack/WEB-INF/components.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.sakaiproject.sitestats.api.report.ReportDefEntityProvider' defined in file [/usr/local/apache-tomcat-8.5.31-for-sakai-12.1-dev-uh/components/sitestats-impl/WEB-INF/components.xml]: Cannot resolve reference to bean 'org.sakaiproject.sitestats.api.report.ReportManager' while setting bean property 'reportManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.sakaiproject.sitestats.api.report.ReportManager' defined in file [/usr/local/apache-tomcat-8.5.31-for-sakai-12.1-dev-uh/components/sitestats-impl/WEB-INF/components.xml]: Cannot resolve reference to bean 'org.sakaiproject.sitestats.SiteStatsTransactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.sakaiproject.sitestats.SiteStatsTransactionManager' defined in org.sakaiproject.sitestats.impl.SiteStatsPersistenceConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.transaction.PlatformTransactionManager]: Factory method 'getSiteStatsTransactionManager' threw exception; nested exception is org.hibernate.HibernateException: Wrong column type in sakai_sitestats_12_1_dev_uh.sst_preferences for column PREFS. Found: text, expected: longtext
      Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.sakaiproject.sitestats.api.StatsManager' defined in file [/usr/local/apache-tomcat-8.5.31-for-sakai-12.1-dev-uh/components/sitestats-impl/WEB-INF/components.xml]: Cannot resolve reference to bean 'org.sakaiproject.sitestats.SiteStatsTransactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'org.sakaiproject.sitestats.SiteStatsTransactionManager': Requested bean is currently in creation: Is there an unresolvable circular reference?
      Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.sakaiproject.sitestats.api.StatsUpdateManager' defined in file [/usr/local/apache-tomcat-8.5.31-for-sakai-12.1-dev-uh/components/sitestats-impl/WEB-INF/components.xml]: Cannot resolve reference to bean 'org.sakaiproject.sitestats.SiteStatsTransactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'org.sakaiproject.sitestats.SiteStatsTransactionManager': Requested bean is currently in creation: Is there an unresolvable circular reference?
      Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.sakaiproject.sitestats.api.DBHelper' defined in file [/usr/local/apache-tomcat-8.5.31-for-sakai-12.1-dev-uh/components/sitestats-impl/WEB-INF/components.xml]: Cannot resolve reference to bean 'org.sakaiproject.sitestats.SiteStatsTransactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'org.sakaiproject.sitestats.SiteStatsTransactionManager': Requested bean is currently in creation: Is there an unresolvable circular reference?
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:564)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
      	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
      	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
      	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
      	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
      	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
      	at org.sakaiproject.component.impl.SpringCompMgr.init(SpringCompMgr.java:164)
      	at org.sakaiproject.component.cover.ComponentManager.getInstance(ComponentManager.java:115)
      	at org.sakaiproject.component.impl.SakaiContextLoader.loadParentContext(SakaiContextLoader.java:106)
      	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:322)
      	at org.sakaiproject.component.impl.SakaiContextLoader.initWebApplicationContext(SakaiContextLoader.java:71)
      	at org.sakaiproject.util.SakaiContextLoaderListener.contextInitialized(SakaiContextLoaderListener.java:47)
      	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4792)
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5256)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
      	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:985)
      	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.sakaiproject.sitestats.api.report.ReportDefEntityProvider' defined in file [/usr/local/apache-tomcat-8.5.31-for-sakai-12.1-dev-uh/components/sitestats-impl/WEB-INF/components.xml]: Cannot resolve reference to bean 'org.sakaiproject.sitestats.api.report.ReportManager' while setting bean property 'reportManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.sakaiproject.sitestats.api.report.ReportManager' defined in file [/usr/local/apache-tomcat-8.5.31-for-sakai-12.1-dev-uh/components/sitestats-impl/WEB-INF/components.xml]: Cannot resolve reference to bean 'org.sakaiproject.sitestats.SiteStatsTransactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.sakaiproject.sitestats.SiteStatsTransactionManager' defined in org.sakaiproject.sitestats.impl.SiteStatsPersistenceConfig: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.transaction.PlatformTransactionManager]: Factory method 'getSiteStatsTransactionManager' threw exception; nested exception is org.hibernate.HibernateException: Wrong column type in sakai_sitestats_12_1_dev_uh.sst_preferences for column PREFS. Found: text, expected: longtext
      	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)
      	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1531)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1276)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
      	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
      	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
      	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
      	at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1080)
      	at org.sakaiproject.entitybroker.util.spring.EntityProviderAutoRegistrar.setApplicationContext(EntityProviderAutoRegistrar.java:71)
      	at org.springframework.context.support.ApplicationContextAwareProcessor.invokeAwareInterfaces(ApplicationContextAwareProcessor.java:121)
      	at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:97)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:409)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1620)
      	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
      	... 27 more
      
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                austinUH Austin
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code