WebUpd8 Oracle Java (JDK) 8 Installer PPA (DISCONTINUED)

(Paul Cleary) #1

I am trying to use DHIS 2 Tools to set up DHIS 2 on Ubuntu 18.04. This worked fine until April when the WebUpd8 Oracle Java (JDK) 8 Installer PPA was discontinued (see https://launchpad.net/~webupd8team/+archive/ubuntu/java).

I have tried installing Amazon Corretto as an alternative (see https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/generic-linux-install.html).

I have also added the following to /etc/profile:

export JAVA_HOME="/usr/lib/jvm/java-1.8.0-amazon-corretto/jre"
export JRE_HOME="/usr/lib/jvm/java-1.8.0-amazon-corretto"
export PATH=$PATH::$JAVA_HOME/bin

and the following to /var/lib/dhis2/dhis2/bin/setenv.sh:

export JAVA_HOME="/usr/lib/jvm/java-1.8.0-amazon-corretto/jre"
export JRE_HOME="/usr/lib/jvm/java-1.8.0-amazon-corretto"

but am getting the following errors in the log:

SEVERE: Exception sending context initialized event to listener instance of class [org.springframework.web.context.ContextLoaderListener]
SEVERE: Exception sending context initialized event to listener instance of class [org.hisp.dhis.system.startup.StartupListener]
SEVERE: One or more listeners failed to start. Full details will be found in the appropriate container log file May 13, 2019 9:08:57 AM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/dhis2] startup failed due to previous errors

and DHIS 2 fails to start.

Are there any suggestions for dealing with this specific issue or for installing alternative versions of Java in general?

Thanks, Paul

1 Like
(Philip Larsen Donnelly) #2

Hi @prcleary,

I would recommend to try with openjdk-8-jdk

In the meantime, I’ll raise the issue with the maintainer of the dhis2 tools repository, so that we can fix the problem there.

Thanks,
Phil

1 Like
(Bob Jolliffe) #3

Thanks Paul (and Phil)

The dhis2-tools package doesn’t actually have an formal dependency on any particular jvm version. In fact it depends on tomcat8, which brings in its own dependencies.

Generally it is a good idea to install the jvm prior to installing the dhis2-tools so that you can explicitly choose which jvm to use.

I have just fixed the example install script here https://github.com/dhis2/dhis2-tools/blob/bionic/install.sh. As you can see, it installs the openjdk-8- jre-headless package prior to installing the tools. Previously it was installing oracle from the webupd repo. Probably this is what you were doing. Any please try that and let me know if there are any problems.

Cheers
Bob

BTW the tools have worked very well for a number of years, but there are good reasons to move to something more sophisticated for very large or very sensitive (tracker) installations. I am working on some new guidelines over the next few weeks so expect that soon. Meanwhile will continue to support dhis2-tools for the short/medium term.

1 Like
(Paul Cleary) #4

Thanks all. I just ran the install.sh script from the bionic branch of the dhis2-tools repo and checked only the correct version of Java was installed with update-alternatives --config java but I am still getting Java errors which prevent DHIS 2 from starting. I can’t upload files directly but the catalina.out file can be found in my Google Drive here: https://drive.google.com/open?id=1bX3liDDwVHXo2vHMG4Mq0Qv9uplxw9kQLZ1_YqcTTNk

1 Like