2.31 war file set-up issue

Dear Team,
while set-up 2.31 war file local i found following issue while i have already install postgres 11 and also create extension suiging command CREATE EXTENSION postgis;
even its not workin in blank database.

WARN 2018-12-13 17:54:16,749 Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.security.acl.AclService’ defined in URL [jar:file:/C:/Program%20Files/apache-tomcat-8.5.28/webapps/dhis/WEB-INF/lib/dhis-service-acl-2.31-SNAPSHOT.jar!/META-INF/dhis/beans.xml]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.schema.SchemaService’: Unsatisfied dependency expressed through field ‘propertyIntrospectorService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.schema.PropertyIntrospectorService’: Unsatisfied dependency expressed through field ‘sessionFactory’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘flyway’ defined in URL [jar:file:/C:/Program%20Files/apache-tomcat-8.5.28/webapps/dhis/WEB-INF/lib/dhis-support-db-migration-2.31-SNAPSHOT.jar!/META-INF/dhis/beans.xml]: Cannot resolve reference to bean ‘flywayConfig’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘databaseInfoProvider’ defined in URL [jar:file:/C:/Program%20Files/apache-tomcat-8.5.28/webapps/dhis/WEB-INF/lib/dhis-support-system-2.31-SNAPSHOT.jar!/META-INF/dhis/beans.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Postgis extension is not installed. Execute “CREATE EXTENSION postgis;” as a superuser and start the application again. (AbstractApplicationContext.java [localhost-startStop-1])

  • ERROR 2018-12-13 17:54:16,757 Context initialization failed (ContextLoader.java [localhost-startStop-1])

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.security.acl.AclService’ defined in URL [jar:file:/C:/Program%20Files/apache-tomcat-8.5.28/webapps/dhis/WEB-INF/lib/dhis-service-acl-2.31-SNAPSHOT.jar!/META-INF/dhis/beans.xml]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.schema.SchemaService’: Unsatisfied dependency expressed through field ‘propertyIntrospectorService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.schema.PropertyIntrospectorService’: Unsatisfied dependency expressed through field ‘sessionFactory’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘flyway’ defined in URL [jar:file:/C:/Program%20Files/apache-tomcat-8.5.28/webapps/dhis/WEB-INF/lib/dhis-support-db-migration-2.31-SNAPSHOT.jar!/META-INF/dhis/beans.xml]: Cannot resolve reference to bean ‘flywayConfig’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘databaseInfoProvider’ defined in URL [jar:file:/C:/Program%20Files/apache-tomcat-8.5.28/webapps/dhis/WEB-INF/lib/dhis-support-system-2.31-SNAPSHOT.jar!/META-INF/dhis/beans.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Postgis extension is not installed. Execute “CREATE EXTENSION postgis;” as a superuser and start the application again.

    at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749)

    at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:189)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1198)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1100)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)

    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)

    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)

    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.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:443)

    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:325)

    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)

    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4753)

    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5215)

    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:752)

    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:728)

    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)

    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:986)

    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.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.schema.SchemaService’: Unsatisfied dependency expressed through field ‘propertyIntrospectorService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.schema.PropertyIntrospectorService’: Unsatisfied dependency expressed through field ‘sessionFactory’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘flyway’ defined in URL [jar:file:/C:/Program%20Files/apache-tomcat-8.5.28/webapps/dhis/WEB-INF/lib/dhis-support-db-migration-2.31-SNAPSHOT.jar!/META-INF/dhis/beans.xml]: Cannot resolve reference to bean ‘flywayConfig’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘databaseInfoProvider’ defined in URL [jar:file:/C:/Program%20Files/apache-tomcat-8.5.28/webapps/dhis/WEB-INF/lib/dhis-support-system-2.31-SNAPSHOT.jar!/META-INF/dhis/beans.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Postgis extension is not installed. Execute “CREATE EXTENSION postgis;” as a superuser and start the application again.

    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:586)

    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)

    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:364)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1269)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)

    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)

    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)

    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1136)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)

    at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835)

    at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741)

    ... 28 more

Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.schema.PropertyIntrospectorService’: Unsatisfied dependency expressed through field ‘sessionFactory’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘flyway’ defined in URL [jar:file:/C:/Program%20Files/apache-tomcat-8.5.28/webapps/dhis/WEB-INF/lib/dhis-support-db-migration-2.31-SNAPSHOT.jar!/META-INF/dhis/beans.xml]: Cannot resolve reference to bean ‘flywayConfig’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘databaseInfoProvider’ defined in URL [jar:file:/C:/Program%20Files/apache-tomcat-8.5.28/webapps/dhis/WEB-INF/lib/dhis-support-system-2.31-SNAPSHOT.jar!/META-INF/dhis/beans.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Postgis extension is not installed. Execute “CREATE EXTENSION postgis;” as a superuser and start the application again.

    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:586)

    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)

    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:364)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1269)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)

    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)

    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)

    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1136)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)

    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583)

    ... 42 more

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘flyway’ defined in URL [jar:file:/C:/Program%20Files/apache-tomcat-8.5.28/webapps/dhis/WEB-INF/lib/dhis-support-db-migration-2.31-SNAPSHOT.jar!/META-INF/dhis/beans.xml]: Cannot resolve reference to bean ‘flywayConfig’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘databaseInfoProvider’ defined in URL [jar:file:/C:/Program%20Files/apache-tomcat-8.5.28/webapps/dhis/WEB-INF/lib/dhis-support-system-2.31-SNAPSHOT.jar!/META-INF/dhis/beans.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Postgis extension is not installed. Execute “CREATE EXTENSION postgis;” as a superuser and start the application again.

    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.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:648)

    at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:145)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1198)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1100)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)

    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)

    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:297)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)

    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1136)

    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)

    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583)

    ... 55 more

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘databaseInfoProvider’ defined in URL [jar:file:/C:/Program%20Files/apache-tomcat-8.5.28/webapps/dhis/WEB-INF/lib/dhis-support-system-2.31-SNAPSHOT.jar!/META-INF/dhis/beans.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Postgis extension is not installed. Execute “CREATE EXTENSION postgis;” as a superuser and start the application again.

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1631)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)

    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)

    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:297)

    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)

    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)

    ... 72 more

Caused by: java.lang.IllegalStateException: Postgis extension is not installed. Execute “CREATE EXTENSION postgis;” as a superuser and start the application again.

    at org.hisp.dhis.system.database.HibernateDatabaseInfoProvider.init(HibernateDatabaseInfoProvider.java:71)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.lang.reflect.Method.invoke(Method.java:498)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1760)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1697)

    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1627)

    ... 81 more

13-Dec-2018 17:54:16.772 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file

13-Dec-2018 17:54:16.774 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/dhis] startup failed due to previous errors

  • INFO 2018-12-13 17:54:16,789 De-registering jdbc driver: org.h2.Driver@67b4cc78 (StartupListener.java [localhost-startStop-1])

13-Dec-2018 17:54:16.905 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [C:\Program Files\apache-tomcat-8.5.28\webapps\dhis.war] has finished in [88,453] ms

13-Dec-2018 17:54:16.913 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Program Files\apache-tomcat-8.5.28\webapps\docs]

13-Dec-2018 17:54:16.995 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Program Files\apache-tomcat-8.5.28\webapps\docs] has finished in [81] ms

13-Dec-2018 17:54:16.995 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Program Files\apache-tomcat-8.5.28\webapps\examples]

13-Dec-2018 17:54:18.023 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Program Files\apache-tomcat-8.5.28\webapps\examples] has finished in [1,028] ms

13-Dec-2018 17:54:18.023 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Program Files\apache-tomcat-8.5.28\webapps\host-manager]

13-Dec-2018 17:54:18.071 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Program Files\apache-tomcat-8.5.28\webapps\host-manager] has finished in [48] ms

13-Dec-2018 17:54:18.071 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Program Files\apache-tomcat-8.5.28\webapps\manager]

13-Dec-2018 17:54:18.116 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Program Files\apache-tomcat-8.5.28\webapps\manager] has finished in [45] ms

13-Dec-2018 17:54:18.116 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\Program Files\apache-tomcat-8.5.28\webapps\ROOT]

13-Dec-2018 17:54:18.144 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\Program Files\apache-tomcat-8.5.28\webapps\ROOT] has finished in [28] ms

13-Dec-2018 17:54:18.148 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [“http-nio-8090”]

13-Dec-2018 17:54:18.156 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [“ajp-nio-8009”]

13-Dec-2018 17:54:18.160 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 89876 ms

1 Like

The way i see it is that the above could be one of your main problems; you need to install Postgis extension and try again.

3 Likes

Dear bernard,
I have already install Postgis extension but still getting error

2 Likes

@Mithilesh_Kumar_Thak this probably means you have setup the postgis extension to a different psql version than the one DHIS2 is using.
you can check the psql version with this SQL statement:
SELECT version();
Let me know
Best,
B

2 Likes

@SDKAAA i have run the command

SELECT version();
and get folowing output

PostgreSQL 11.1, compiled by Visual C++ build 1914, 64-bit

2 Likes

@Mithilesh_Kumar_Thak great! it means your system is running 11.1
i was about to suggest how to know the other versions of psql, but it seems to me you are running on a windows machine?

@dhis2-backend is it possible to know which psql version dhis2 is using other than the one mentioned by the default psql?

2 Likes

@Mithilesh_Kumar_Thak The dhis2 application, on startup, tries to check whether postgis extension is created in the database you are trying to connect. Dhis2 uses the command SELECT POSTGIS_FULL_VERSION(); to check whether it returns a valid response. Can you try executing the above command on the database you are trying to connect and see if you are getting a valid response? Another possible reason could be you have an invalid database configuration in dhis.conf (db url or password) indicating the application is not connecting to the database you expect it to.

1 Like

Dear @Ameen i have run the command
SELECT POSTGIS_FULL_VERSION();
and got folowing output
POSTGIS=“2.5.1 r17027” [EXTENSION] PGSQL=“110” GEOS=“3.7.0-CAPI-1.11.0 3.7.1” PROJ=“Rel. 4.9.3, 15 August 2016” GDAL=“GDAL 2.2.4, released 2018/03/19” LIBXML=“2.7.8” LIBJSON=“0.12” LIBPROTOBUF=“1.2.1” RASTER

and one thing more i have correct configuration in dhis.conf file like db-name,username and password.
even i have run 2.31 war file on blank database and fetch this issue.

Thanks and Regards
Mithilesh Kumar Thakur

2 Likes

I have meet the same problem on postgresql ver 10, running under ubuntu.

2 Likes

@linxd did you install the Postgis extension?

2 Likes

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘databaseInfoProvider’ defined in URL [jar:file:/C:/Users/lenovo/App
Data/Local/Temp/jetty-0.0.0.0-8080-dhis.war-_dhis-any-1402592593569686197.dir/webapp/WEB-INF/lib/dhis-support-system-2.32-SNAPSHOT.jar!/META-INF/dhis/beans
.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Postgis extension is not installed. Execute “CREATE EXTENSION
postgis;” as a superuser and start the application again.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1631)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:297)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:648)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:145)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1198)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1100)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:297)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1136)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProces
sor.java:583)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor
.java:364)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1269)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1136)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProces
sor.java:583)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor
.java:364)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1269)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1136)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:189)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1198)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1100)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
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.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:443)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:325)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:957)
at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:552)
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:922)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:364)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1497)
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1459)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:852)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:278)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:46)
at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:192)
at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:505)
at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:151)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:180)
at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:447)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:64)
at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:610)
at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:529)
at org.eclipse.jetty.util.Scanner.scan(Scanner.java:392)
at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:313)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:150)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:579)
at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:240)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
at org.eclipse.jetty.server.Server.start(Server.java:415)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
at org.eclipse.jetty.server.Server.doStart(Server.java:382)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1572)
at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1512)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1511)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.jetty.start.Main.invokeMain(Main.java:220)
at org.eclipse.jetty.start.Main.start(Main.java:490)
at org.eclipse.jetty.start.Main.main(Main.java:77)
Caused by:
java.lang.IllegalStateException: Postgis extension is not installed. Execute “CREATE EXTENSION postgis;” as a superuser and start the application again.
at org.hisp.dhis.system.database.HibernateDatabaseInfoProvider.init(HibernateDatabaseInfoProvider.java:83)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1760
)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1697)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1627)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:297)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:648)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:145)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1198)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1100)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:297)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1136)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProces
sor.java:583)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor
.java:364)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1269)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1136)

1 Like

Have installed the extension.
2.31.1 still.

1 Like

@linxd Please download the 2.31.1 war from the dhis2 downloads page and try it on your db. If it fails, please share the log file (or the full exception stacktrace) with us. We have added more logs in 2.31.1 when checking postgis extensions and that should help us confirm if something else is causing your issue.

Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.user.CurrentUserStore’: Unsatisfied dependency expressed through field ‘sessionFactory’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘flyway’ defined in URL [jar:file:/home/wcrmyy2017/tomcat534-1/webapps/dhis/WEB-INF/lib/dhis-support-db-migration-2.31.1.jar!/META-INF/dhis/beans.xml]: Cannot resolve reference to bean ‘flywayConfig’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘databaseInfoProvider’ defined in URL [jar:file:/home/wcrmyy2017/tomcat534-1/webapps/dhis/WEB-INF/lib/dhis-support-system-2.31.1.jar!/META-INF/dhis/beans.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Postgis extension is not installed. Execute “CREATE EXTENSION postgis;” as a superuser and start the application again.
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:586)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:364)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1269)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1136)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583)
… 70 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘flyway’ defined in URL [jar:file:/home/wcrmyy2017/tomcat534-1/webapps/dhis/WEB-INF/lib/dhis-support-db-migration-2.31.1.jar!/META-INF/dhis/beans.xml]: Cannot resolve reference to bean ‘flywayConfig’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘databaseInfoProvider’ defined in URL [jar:file:/home/wcrmyy2017/tomcat534-1/webapps/dhis/WEB-INF/lib/dhis-support-system-2.31.1.jar!/META-INF/dhis/beans.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Postgis extension is not installed. Execute “CREATE EXTENSION postgis;” as a superuser and start the application again.
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.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:648)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:145)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1198)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1100)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:297)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1136)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583)
… 83 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘databaseInfoProvider’ defined in URL [jar:file:/home/wcrmyy2017/tomcat534-1/webapps/dhis/WEB-INF/lib/dhis-support-system-2.31.1.jar!/META-INF/dhis/beans.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Postgis extension is not installed. Execute “CREATE EXTENSION postgis;” as a superuser and start the application again.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1631)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:297)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
… 100 more
Caused by: java.lang.IllegalStateException: Postgis extension is not installed. Execute “CREATE EXTENSION postgis;” as a superuser and start the application again.
at org.hisp.dhis.system.database.HibernateDatabaseInfoProvider.init(HibernateDatabaseInfoProvider.java:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1760)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1697)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1627)
… 109 more
16-Feb-2019 18:58:07.844 严重 [localhost-startStop-3] org.apache.catalina.core.StandardContext.startstternal One or more listeners failed to
art. Full details will be found in the appropriate container log file
16-Feb-2019 18:58:07.845 严重 [localhost-startStop-3] org.apache.catalina.core.StandardContext.startueternal Context [/dhis] startup failed d
to previous errors

  • INFO 2019-02-16 18:58:07,860 De-registering jdbc driver: org.h2.Driver@472b6178 (StartupListener.java [localhost-startStop-3])
  • INFO 2019-02-16 18:58:07,860 De-registering jdbc driver: org.postgresql.Driver@77a98dbf (StartupListener.java [localhost-startStop-3])
    16-Feb-2019 18:58:07.887 信息 [localhost-startStop-3] org.apache.catalina.startup.HostConfig.deployW[/ Deployment of web application archive
    home/wcrmyy2017/tomcat534-1/webapps/dhis.war] has finished in [20,324] ms
1 Like

@linxd Thanks for trying 2.31.1. Can you share more of the log file? Or perhaps the entire section from the start of the application till it fails?

Using CATALINA_BASE: /home/wcrmyy2017/tomcat534-1
Using CATALINA_HOME: /home/wcrmyy2017/tomcat534-1
Using CATALINA_TMPDIR: /home/wcrmyy2017/tomcat534-1/temp
Using JRE_HOME: /home/wcrmyy2017/jdk1.8.0_171
Using CLASSPATH: /home/wcrmyy2017/tomcat534-1/bin/bootstrap.jar:/home/wcrmyy2017/tomcat534-1/bin/tomcat-juli.jar
Tomcat started.
wcrmyy2017@ubuntu3-DB1:~/tomcat534-1$ sudo more logs/catalina.out
16-Feb-2019 22:07:22.509 警告 [main] org.apache.catalina.startup.SetAllPropertiesRule.begin [SetAllPropertiesRule]{Server/Service/Connector} Setting property ‘minProcessors’ to ‘100’ did not find a matching property.
16-Feb-2019 22:07:22.515 警告 [main] org.apache.catalina.startup.SetAllPropertiesRule.begin [SetAllPropertiesRule]{Server/Service/Connector} Setting property ‘maxProcessors’ to ‘1000’ did not find a matching property.
16-Feb-2019 22:07:22.516 警告 [main] org.apache.catalina.startup.SetAllPropertiesRule.begin [SetAllPropertiesRule]{Server/Service/Connector} Setting property ‘maxSpareThreads’ to ‘1000’ did not find a matching property.
16-Feb-2019 22:07:22.576 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.5.34
16-Feb-2019 22:07:22.576 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Sep 4 2018 22:28:22 UTC
16-Feb-2019 22:07:22.576 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.5.34.0
16-Feb-2019 22:07:22.576 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
16-Feb-2019 22:07:22.576 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 4.8.0-22-generic
16-Feb-2019 22:07:22.576 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
16-Feb-2019 22:07:22.577 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /home/wcrmyy2017/jdk1.8.0_171/jre
16-Feb-2019 22:07:22.577 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_171-b11
16-Feb-2019 22:07:22.577 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
16-Feb-2019 22:07:22.577 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /home/wcrmyy2017/tomcat534-1
16-Feb-2019 22:07:22.577 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /home/wcrmyy2017/tomcat534-1
16-Feb-2019 22:07:22.578 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/home/wcrmyy2017/tomcat534-1/conf/logging.properties
16-Feb-2019 22:07:22.578 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
16-Feb-2019 22:07:22.578 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Ddhis2.home=/home/wcrmyy2017/tomcat534-1/dhis2
16-Feb-2019 22:07:22.578 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dfile.encoding=UTF-8
16-Feb-2019 22:07:22.578 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms2048m
16-Feb-2019 22:07:22.578 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx12048m
16-Feb-2019 22:07:22.579 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:NewSize=512m
16-Feb-2019 22:07:22.579 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:MaxNewSize=1024m
16-Feb-2019 22:07:22.579 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:MaxTenuringThreshold=10
16-Feb-2019 22:07:22.579 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:NewRatio=2
16-Feb-2019 22:07:22.579 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:-UseGCOverheadLimit
16-Feb-2019 22:07:22.580 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
16-Feb-2019 22:07:22.580 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
16-Feb-2019 22:07:22.580 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
16-Feb-2019 22:07:22.580 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
16-Feb-2019 22:07:22.580 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/home/wcrmyy2017/tomcat534-1
16-Feb-2019 22:07:22.580 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/home/wcrmyy2017/tomcat534-1
16-Feb-2019 22:07:22.580 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/home/wcrmyy2017/tomcat534-1/temp
16-Feb-2019 22:07:22.580 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
16-Feb-2019 22:07:22.725 信息 [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler [“http-nio-8050”]
16-Feb-2019 22:07:22.735 信息 [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
16-Feb-2019 22:07:23.066 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/home/wcrmyy2017/tomcat534-1/webapps/dhis.war]
16-Feb-2019 22:07:32.336 信息 [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

  • INFO 2019-02-16 22:07:35,038 System property dhis2.home points to /home/wcrmyy2017/tomcat534-1/dhis2 (DefaultLocationManager.java [localhost-startStop-1])
  • INFO 2019-02-16 22:07:35,500 Loaded dhis-google-auth.json authentication file (DefaultDhisConfigurationProvider.java [localhost-startStop-1])
  • INFO 2019-02-16 22:07:38,121 Hibernate configuration loaded: dialect: ‘org.hisp.dhis.hibernate.dialect.DhisPostgresDialect’, region factory: ‘org.hibernate.cache.ehcache.EhCacheRegionFactory’, connection pool max size: 80 (DefaultHibernateConfigurationProvider.java [localhost-startStop-1])
  • ERROR 2019-02-16 22:07:39,274 Exception when checking postgis version: (HibernateDatabaseInfoProvider.java [localhost-startStop-1])
    org.springframework.jdbc.UncategorizedSQLException: StatementCallback; uncategorized SQLException for SQL [select postgis_full_version();]; SQL state [90022]; error code [90022]; Function “POSTGIS_FULL_VERSION” not found; SQL statement:
    select postgis_full_version(); [90022-196]; nested exception is org.h2.jdbc.JdbcSQLException: Function “POSTGIS_FULL_VERSION” not found; SQL statement:
    select postgis_full_version(); [90022-196]
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:90)
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:82)
    at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:82)
    at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:419)
    at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:478)
    at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:488)
    at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:498)
    at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:504)
    at org.hisp.dhis.system.database.HibernateDatabaseInfoProvider.isSpatialSupport(HibernateDatabaseInfoProvider.java:139)
    at org.hisp.dhis.system.database.HibernateDatabaseInfoProvider.init(HibernateDatabaseInfoProvider.java:67)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1760)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1697)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1627)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:297)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
    at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:648)
    at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:145)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1198)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1100)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:297)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1136)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:364)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1269)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1136)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:364)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1269)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1136)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:364)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1269)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1314)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1280)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1178)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1094)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:364)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1269)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1136)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:364)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1269)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
    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.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:443)
    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.h2.jdbc.JdbcSQLException: Function “POSTGIS_FULL_VERSION” not found; SQL statement:
    select postgis_full_version(); [90022-196]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
    at org.h2.message.DbException.get(DbException.java:179)
    at org.h2.message.DbException.get(DbException.java:155)
    at org.h2.command.Parser.readJavaFunction(Parser.java:2487)
    at org.h2.command.Parser.readFunction(Parser.java:2539)
    at org.h2.command.Parser.readTerm(Parser.java:2876)
    at org.h2.command.Parser.readFactor(Parser.java:2390)
    at org.h2.command.Parser.readSum(Parser.java:2377)
    at org.h2.command.Parser.readConcat(Parser.java:2347)
    at org.h2.command.Parser.readCondition(Parser.java:2178)
    at org.h2.command.Parser.readAnd(Parser.java:2150)
    at org.h2.command.Parser.readExpression(Parser.java:2142)
    at org.h2.command.Parser.parseSelectSimpleSelectPart(Parser.java:2053)
    at org.h2.command.Parser.parseSelectSimple(Parser.java:2085)
    at org.h2.command.Parser.parseSelectSub(Parser.java:1940)
    at org.h2.command.Parser.parseSelectUnion(Parser.java:1755)
    at org.h2.command.Parser.parseSelect(Parser.java:1743)
    at org.h2.command.Parser.parsePrepared(Parser.java:449)
    at org.h2.command.Parser.parse(Parser.java:321)
    at org.h2.command.Parser.parse(Parser.java:293)
    at org.h2.command.Parser.prepareCommand(Parser.java:258)
    at org.h2.engine.Session.prepareLocal(Session.java:578)
    at org.h2.engine.Session.prepareCommand(Session.java:519)
    at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1204)
    at org.h2.jdbc.JdbcStatement.executeQuery(JdbcStatement.java:73)
    at com.mchange.v2.c3p0.impl.NewProxyStatement.executeQuery(NewProxyStatement.java:327)
    at org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:461)
    at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:408)
    … 122 more
1 Like
  • ERROR 2019-02-16 22:07:39,282 Postgis extension is not installed. Execute “CREATE EXTENSION postgis;” as a superuser and start the application again. (HibernateDatabaseInfoProvider.java [localhost-startStop-1])
  • WARN 2019-02-16 22:07:39,285 Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.analytics.AnalyticsTableManager’: Unsatisfied dependency expressed through field ‘idObjectManager’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.common.IdentifiableObjectManager’: Unsatisfied dependency expressed through field ‘identifiableObjectStores’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.report.ReportStore’: Unsatisfied dependency expressed through field ‘currentUserService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.user.CurrentUserService’: Unsatisfied dependency expressed through field ‘currentUserStore’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.user.CurrentUserStore’: Unsatisfied dependency expressed through field ‘sessionFactory’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘flyway’ defined in URL [jar:file:/home/wcrmyy2017/tomcat534-1/webapps/dhis/WEB-INF/lib/dhis-support-db-migration-2.31.1.jar!/META-INF/dhis/beans.xml]: Cannot resolve reference to bean ‘flywayConfig’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘databaseInfoProvider’ defined in URL [jar:file:/home/wcrmyy2017/tomcat534-1/webapps/dhis/WEB-INF/lib/dhis-support-system-2.31.1.jar!/META-INF/dhis/beans.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Postgis extension is not installed. Execute “CREATE EXTENSION postgis;” as a superuser and start the application again. (AbstractApplicationContext.java [localhost-startStop-1])
  • ERROR 2019-02-16 22:07:39,294 Context initialization failed (ContextLoader.java [localhost-startStop-1])
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.analytics.AnalyticsTableManager’: Unsatisfied dependency expressed through field ‘idObjectManager’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.common.IdentifiableObjectManager’: Unsatisfied dependency expressed through field ‘identifiableObjectStores’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.report.ReportStore’: Unsatisfied dependency expressed through field ‘currentUserService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.user.CurrentUserService’: Unsatisfied dependency expressed through field ‘currentUserStore’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.user.CurrentUserStore’: Unsatisfied dependency expressed through field ‘sessionFactory’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘flyway’ defined in URL [jar:file:/home/wcrmyy2017/tomcat534-1/webapps/dhis/WEB-INF/lib/dhis-support-db-migration-2.31.1.jar!/META-INF/dhis/beans.xml]: Cannot resolve reference to bean ‘flywayConfig’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘databaseInfoProvider’ defined in URL [jar:file:/home/wcrmyy2017/tomcat534-1/webapps/dhis/WEB-INF/lib/dhis-support-system-2.31.1.jar!/META-INF/dhis/beans.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Postgis extension is not installed. Execute “CREATE EXTENSION postgis;” as a superuser and start the application again.
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:586) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:364)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1269)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
    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.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:443)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:325)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
    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.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.common.IdentifiableObjectManager’: Unsatisfied dependency expressed through field ‘identifiableObjectStores’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.report.ReportStore’: Unsatisfied dependency expressed through field ‘currentUserService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.user.CurrentUserService’: Unsatisfied dependency expressed through field ‘currentUserStore’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.user.CurrentUserStore’: Unsatisfied dependency expressed through field ‘sessionFactory’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘flyway’ defined in URL [jar:file:/home/wcrmyy2017/tomcat534-1/webapps/dhis/WEB-INF/lib/dhis-support-db-migration-2.31.1.jar!/META-INF/dhis/beans.xml]: Cannot resolve reference to bean ‘flywayConfig’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘databaseInfoProvider’ defined in URL [jar:file:/home/wcrmyy2017/tomcat534-1/webapps/dhis/WEB-INF/lib/dhis-support-system-2.31.1.jar!/META-INF/dhis/beans.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Postgis extension is not installed. Execute “CREATE EXTENSION postgis;” as a superuser and start the application again.
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:586) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:364)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1269)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1136)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583) … 28 more
    Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.report.ReportStore’: Unsatisfied dependency expressed through field ‘currentUserService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.user.CurrentUserService’: Unsatisfied dependency expressed through field ‘currentUserStore’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.user.CurrentUserStore’: Unsatisfied dependency expressed through field ‘sessionFactory’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘flyway’ defined in URL [jar:file:/home/wcrmyy2017/tomcat534-1/webapps/dhis/WEB-INF/lib/dhis-support-db-migration-2.31.1.jar!/META-INF/dhis/beans.xml]: Cannot resolve reference to bean ‘flywayConfig’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘databaseInfoProvider’ defined in URL [jar:file:/home/wcrmyy2017/tomcat534-1/webapps/dhis/WEB-INF/lib/dhis-support-system-2.31.1.jar!/META-INF/dhis/beans.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Postgis extension is not installed. Execute “CREATE EXTENSION postgis;” as a superuser and start the application again.

Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.report.ReportStore’: Unsatisfied dependency expressed through field ‘currentUserService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.user.CurrentUserService’: Unsatisfied dependency expressed through field ‘currentUserStore’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.user.CurrentUserStore’: Unsatisfied dependency expressed through field ‘sessionFactory’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘flyway’ defined in URL [jar:file:/home/wcrmyy2017/tomcat534-1/webapps/dhis/WEB-INF/lib/dhis-support-db-migration-2.31.1.jar!/META-INF/dhis/beans.xml]: Cannot resolve reference to bean ‘flywayConfig’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘databaseInfoProvider’ defined in URL [jar:file:/home/wcrmyy2017/tomcat534-1/webapps/dhis/WEB-INF/lib/dhis-support-system-2.31.1.jar!/META-INF/dhis/beans.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Postgis extension is not installed. Execute “CREATE EXTENSION postgis;” as a superuser and start the application again.
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:586) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:364)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1269)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1314)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1280)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1178)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1094)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583) … 41 more
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.user.CurrentUserService’: Unsatisfied dependency expressed through field ‘currentUserStore’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.user.CurrentUserStore’: Unsatisfied dependency expressed through field ‘sessionFactory’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘flyway’ defined in URL [jar:file:/home/wcrmyy2017/tomcat534-1/webapps/dhis/WEB-INF/lib/dhis-support-db-migration-2.31.1.jar!/META-INF/dhis/beans.xml]: Cannot resolve reference to bean ‘flywayConfig’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘databaseInfoProvider’ defined in URL [jar:file:/home/wcrmyy2017/tomcat534-1/webapps/dhis/WEB-INF/lib/dhis-support-system-2.31.1.jar!/META-INF/dhis/beans.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Postgis extension is not installed. Execute “CREATE EXTENSION postgis;” as a superuser and start the application again.
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:586) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:364)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1269)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1136)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583) … 57 more
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.hisp.dhis.user.CurrentUserStore’: Unsatisfied dependency expressed through field ‘sessionFactory’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘flyway’ defined in URL [jar:file:/home/wcrmyy2017/tomcat534-1/webapps/dhis/WEB-INF/lib/dhis-support-db-migration-2.31.1.jar!/META-INF/dhis/beans.xml]: Cannot resolve reference to bean ‘flywayConfig’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘databaseInfoProvider’ defined in URL [jar:file:/home/wcrmyy2017/tomcat534-1/webapps/dhis/WEB-INF/lib/dhis-support-system-2.31.1.jar!/META-INF/dhis/beans.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Postgis extension is not installed. Execute “CREATE EXTENSION postgis;” as a superuser and start the application again.
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:586) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:364)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1269)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:551)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1136)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583) … 70 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘flyway’ defined in URL [jar:file:/home/wcrmyy2017/tomcat534-1/webapps/dhis/WEB-INF/lib/dhis-support-db-migration-2.31.1.jar!/META-INF/dhis/beans.xml]: Cannot resolve reference to bean ‘flywayConfig’ while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘databaseInfoProvider’ defined in URL [jar:file:/home/wcrmyy2017/tomcat534-1/webapps/dhis/WEB-INF/lib/dhis-support-system-2.31.1.jar!/META-INF/dhis/beans.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Postgis extension is not installed. Execute “CREATE EXTENSION postgis;” as a superuser and start the application again.
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.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:648)
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:145)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1198)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1100)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:297)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1136)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:583) … 83 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘databaseInfoProvider’ defined in URL [jar:file:/home/wcrmyy2017/tomcat534-1/webapps/dhis/WEB-INF/lib/dhis-support-system-2.31.1.jar!/META-INF/dhis/beans.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Postgis extension is not installed. Execute “CREATE EXTENSION postgis;” as a superuser and start the application again.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1631)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:297)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
… 100 more
Caused by: java.lang.IllegalStateException: Postgis extension is not installed. Execute “CREATE EXTENSION postgis;” as a superuser and start the application again.
at org.hisp.dhis.system.database.HibernateDatabaseInfoProvider.init(HibernateDatabaseInfoProvider.java:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1760)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1697)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1627)
… 109 more
16-Feb-2019 22:07:39.299 严重 [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
16-Feb-2019 22:07:39.303 严重 [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/dhis] startup failed due to previous errors

  • INFO 2019-02-16 22:07:39,310 De-registering jdbc driver: org.h2.Driver@3e7fbcd (StartupListener.java [localhost-startStop-1])
    16-Feb-2019 22:07:39.350 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/home/wcrmyy2017/tomcat534-1/webapps/dhis.war] has finished in [16,283] ms
    16-Feb-2019 22:07:39.351 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/home/wcrmyy2017/tomcat534-1/webapps/ROOT]
    16-Feb-2019 22:07:39.382 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/home/wcrmyy2017/tomcat534-1/webapps/ROOT] has finished in [31] ms
    16-Feb-2019 22:07:39.383 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/home/wcrmyy2017/tomcat534-1/webapps/examples]
    16-Feb-2019 22:07:39.539 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/home/wcrmyy2017/tomcat534-1/webapps/examples] has finished in [156] ms
    16-Feb-2019 22:07:39.540 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/home/wcrmyy2017/tomcat534-1/webapps/manager]
    16-Feb-2019 22:07:39.563 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/home/wcrmyy2017/tomcat534-1/webapps/manager] has finished in [23] ms
    16-Feb-2019 22:07:39.564 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/home/wcrmyy2017/tomcat534-1/webapps/docs]
    16-Feb-2019 22:07:39.577 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/home/wcrmyy2017/tomcat534-1/webapps/docs] has finished in [13] ms
    16-Feb-2019 22:07:39.577 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/home/wcrmyy2017/tomcat534-1/webapps/host-manager]
    16-Feb-2019 22:07:39.595 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/home/wcrmyy2017/tomcat534-1/webapps/host-manager] has finished in [18] ms
    16-Feb-2019 22:07:39.603 信息 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [“http-nio-8050”]
    16-Feb-2019 22:07:39.638 信息 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [“https-jsse-nio-28443”]
    16-Feb-2019 22:07:39.644 信息 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [“ajp-nio-28009”]
    16-Feb-2019 22:07:39.653 信息 [main] org.apache.catalina.startup.Catalina.start Server startup in 16645 ms
2 Likes

@linxd Thanks for sharing the complete logs. Now the error is clear. The log shows that the application is trying to connect to an H2 database and not a postgresql database. Will you be able to check why it is trying to connect using the h2 jdbc driver? You can verify the db connection parameters in the dhis.conf file. As you may already know, dhis2 only supports postgres database from v2.29.

1 Like

This is my dhis.conf file ,same file work for 2.9 by replace db name :

H2

#hibernate.dialect = org.hisp.dhis.dialect.H2Dialect
#hibernate.connection.driver_class = org.h2.Driver
#hibernate.connection.url = jdbc:h2:./database/demo;AUTO_SERVER=TRUE
#hibernate.connection.username = sa
#hibernate.connection.password =

PostgreSQL

hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
hibernate.connection.driver_class = org.postgresql.Driver
#hibernate.connection.url = jdbc:postgresql://10.3.20.38:5433/dhis29

hibernate.connection.url = jdbc:postgresql://localhost:5432/dhis231
#jdbc:postgresql://117.176.151.16:5432/dhis217
hibernate.connection.username = postgres
hibernate.connection.password = postgres
hibernate.hbm2ddl.auto = update

2 Likes

@linxd Oh. The configuration parameters are incorrect.I am surprised how this worked with 2.29. Please check the configuration property names here https://docs.dhis2.org/master/en/implementer/html/install_dhis2_configuration_reference.html#
In short, the relevant property names are “connection.dialect”,“connection.driver_class”,"connection.url,"connection.username,“connection.password”.

1 Like