dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #28268
Re: Facing problem while running DHIS 2.7
//-------------------------------------------------trace-------------------
* ERROR 2014-02-24 12:59:19,743 Context initialization failed (ContextLoader.java [localhost-startStop-1])
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.hisp.dhis.config.ConfigurationStore' defined in URL [jar:file:/C:/apache-tomcat-7.0.42/webapps/dhis/WEB-INF/lib/dhis-in-service-configuration-2.7.jar!/META-INF/dhis/beans.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in URL [jar:file:/C:/apache-tomcat-7.0.42/webapps/dhis/WEB-INF/lib/dhis-support-hibernate-2.7.jar!/META-INF/dhis/beans.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: could not instantiate RegionFactory [org.hibernate.cache.ehcache.EhCacheRegionFactor
y]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
//---------------------------------------------------------------------------------------
I have provided following configuration entries in external "hibernate.property" file
which is given below
hibernate.show_sql = false
hibernate.use_sql_comments = false
hibernate.dialect = org.hibernate.dialect.MySQLDialect
hibernate.connection.driver_class = com.mysql.jdbc.Driver
hibernate.connection.url = jdbc:mysql://localhost/dhis_meta_hp?useUnicode=true&characterEncoding=UTF-8
hibernate.connection.username = root
hibernate.connection.password = root
hibernate.connection.pool_size = 10
hibernate.hbm2ddl.auto = update
hibernate.connection.provider_class=org.hibernate.connection.C3P0ConnectionProvider
hibernate.connection.release_mode=after_transaction
hibernate.c3p0.max_size = 50
hibernate.c3p0.min_size = 1
hibernate.c3p0.timeout = 100
hibernate.c3p0.max_statements = 0
hibernate.c3p0.idle_test_period = 3000
hibernate.c3p0.acquire_increment = 1
hibernate.c3p0.max_statements_per_connection = 0
hibernate.c3p0.validate = false
hibernate.connection.release_mode = after_transaction
hibernate.connection.provider_class=org.hibernate.connection.C3P0ConnectionProvider
hibernate.connection.release_mode=after_transaction
hibernate.cache.region.factory_class = org.hibernate.cache.ehcache.EhCacheRegionFactory
hibernate.cache.use_second_level_cache = true
hibernate.cache.use_query_cache = true
Let me correct, if i am missing any configuration need to run DHIS 2.7
Regards
Brajesh Murari
On Monday, 24 February 2014 12:52 PM, Brajesh Murari <brajesh.murari@xxxxxxxxx> wrote:
Hello Devs,
When i am trying to run DHIS 2.7, it throws some exception given below
//------------------------------------------------------------------------------------------------------------------
* ERROR 2014-02-24 12:41:42,101 Context initialization failed (ContextLoader.java [localhost-startStop-1])
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.hisp.dhis.config.ConfigurationStore' defined in URL [jar:file:/C:/apache-tomcat-7.0.42/webapps/dhis/WEB-INF/lib
_level_cache | hibernate.cache.use_query_cache]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:384)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1113)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1671)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in URL [jar:file:/C:/apache-tomcat-7.0.42/webapps/dhis/WEB-INF/lib/dhis-support-
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
//--------------------------------------------------------------------------------------------------------------------------------
In External hibernate.property file i have put entries for following things given bewlo
hibernate.show_sql = false
hibernate.use_sql_comments = false
hibernate.dialect = org.hibernate.dialect.MySQLDialect
hibernate.connection.driver_class = com.mysql.jdbc.Driver
hibernate.connection.url = jdbc:mysql://localhost/dhis_meta_hp?useUnicode=true&characterEncoding=UTF-8
hibernate.connection.username = root
hibernate.connection.password = root
hibernate.connection.pool_size = 10
hibernate.hbm2ddl.auto = update
hibernate.connection.provider_class=org.hibernate.connection.C3P0ConnectionProvider
hibernate.connection.release_mode=after_transaction
hibernate.c3p0.max_size = 50
hibernate.c3p0.min_size = 1
hibernate.c3p0.timeout = 100
hibernate.c3p0.max_statements = 0
hibernate.c3p0.idle_test_period = 3000
hibernate.c3p0.acquire_increment = 1
hibernate.c3p0.max_statements_per_connection = 0
hibernate.c3p0.validate = false
hibernate.connection.release_mode = after_transaction
#hibernate.connection.provider_class=org.hibernate.connection.C3P0ConnectionProvider
#hibernate.connection.release_mode=after_transaction
#hibernate.cache.region.factory_class = org.hibernate.cache.ehcache.EhCacheRegionFactory
#hibernate.cache.use_second_level_cache = true
#hibernate.cache.use_query_cache = true
//-------------------------------------------------------------------------------------------------------------------
Please let me know how should i fix this issue
Brajesh Murari
_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp
References