The problem that i could observe was that the localhost.log contained the following line
Blockquote
SEVERE [main] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class [org.springframework.web.context.ContextLoaderListener]
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name âorg.springframework.scheduling.annotation.ProxyAsyncConfigurationâ: Unsatisfied dependency expressed through method âsetConfigurersâ parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name âdatabaseInfoâ defined in URL [jar:file:/home/dhis/tomcat-dhis/webapps/ROOT/WEB-INF/lib/dhis-support-system-2.36.0.jar!/org/hisp/dhis/system/database/DatabaseInfoFactoryBean.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name âdatabaseInfoProviderâ: 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
Blockquote
Please note that postgis is already installed. I had again installed as
psql -U postgres -d postgres -c âCREATE EXTENSION postgisâ
and also psql -U dhis -d dhis2 -c âCREATE EXTENSION postgisâ
I also installed postgis_topology
Then stopped and restarted dhis application and finally rebooted the system. Still I am getting same error.
Also please note that in order to upload the files i had to add âdocâ extension to all them
Hello @amitta Post GIS is installed, but it looks like the scripts are not available. if they are not, you will usually find errors. what version of PostGIS are you using?
An example if you are using postgres 10
Dear @moses_mwale My postgres is 13.4. I ran the second line i.e postgis-scripts. But the system said that its a virtual package and to run the following
sudo apt install postgresql-13-postgis-3-scripts
After executing, still getting 404 error. But the error in localhost.2021-09-20 has changed to the following
20-Sep-2021 07:55:55.258 SEVERE [main] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class [org.springframework.web.context.ContextLoaderListener]
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name âorg.hisp.dhis.analytics.event.EventDataQueryServiceâ defined in URL [jar:file:/home/dhis/tomcat-dhis/webapps/ROOT/WEB-INF/lib/dhis-service-analytics-2.36.0.jar!/org/hisp/dhis/analytics/event/data/DefaultEventDataQueryService.class]: Unsatisfied dependency expressed through constructor parameter 3; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name âdefaultQueryItemLocatorâ defined in URL [jar:file:/home/dhis/tomcat-dhis/webapps/ROOT/WEB-INF/lib/dhis-service-analytics-2.36.0.jar!/org/hisp/dhis/analytics/event/data/DefaultQueryItemLocator.class]: Unsatisfied dependency expressed through constructor parameter 2; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name âorg.hisp.dhis.trackedentity.TrackedEntityAttributeServiceâ defined in URL [jar:file:/home/dhis/tomcat-dhis/webapps/ROOT/WEB-INF/lib/dhis-service-core-2.36.0.jar!/org/hisp/dhis/trackedentity/DefaultTrackedEntityAttributeService.class]: Bean instantiation via constructor failed; nested exception is java.lang.UnsatisfiedLinkError: Canât load library: /usr/lib/jvm/java-11-openjdk-amd64/lib/libawt_xawt.so
@amitta sorry for the late reply, how far with this issue (Canât load library: /usr/lib/jvm/java-11-openjdk-amd64/lib/libawt_xawt.so). It looks like the open JDK you loading is not compiled correctly. Are you able to uninstall it and install it again?
A work around would be to use the openjdk-1.8 for test purposes only and see if you still have the issue. if it goes away then the problem is the java 11 which I know it wasnt compiled properly.
Also another workaround If you have open JDK 8 installed, you could do the following to alternate
@moses_mwale Thanks for giving me insights. I googled for missing libawt_xawt.so. It was suggested that to reinstall java with the following command on Ubuntu
Great, it worked, @amitta please select the solution to your problem on the insights shared to help another person who might have the same problem in the future.
Ahh okay @amitta , but this question has 2 questions and 2 solutions. The first was for the PostGIS scripts and another was for the installation problem. what you @Gassim have marked as a solution is the installation problem. what do we do?
@moses_mwale You are right that we did solve two problems. When we solved the firs it uncovered the second. Because in the solution to the first problem, I have written that I am still having the problem. SO, I was not sure that I mark that also a solution.
If you and @Gassim think it proper to mark that (the first one) as a solution, I will do it