← Back to team overview

dhis2-users team mailing list archive

Re: Database being cleared after Tomcat shutdown

 

Hi, I am working with 2.16 and am in the process of upgrading but will not be doing that on the live servers – I need to get this working offline on 2.16 before performing the upgrade.
Regards
Ed

From: Em Le Hong [mailto:em.hispvietnam@xxxxxxxxx]
Sent: Thursday, 31 August 2017 3:42 PM
To: Edward Robinson <erobinson@xxxxxxxxxxxxxxxxxx>
Cc: DHIS 2 Users list <dhis2-users@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Dhis2-users] Database being cleared after Tomcat shutdown

Hi again,

If you upgrade from 2.16 to 2.22 or above 2.22, you have to change the configuration file from hibernate.properties to dhis.conf. Otherwise, it can't connect to the correct database.

Read here to check how to create dhis.conf file.

https://docs.dhis2.org/2.22/en/implementer/html/ch08s03.html#d5e500

On Thu, Aug 31, 2017 at 8:29 PM, Em Le Hong <em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx>> wrote:
Hi,

Which version are you working on? for the recent new version, DHIS2 no longer use hibernate.properties file.

Read the upgrade note here:
https://www.dhis2.org/222-upgrade

On Thu, Aug 31, 2017 at 6:32 PM, Edward Robinson <erobinson@xxxxxxxxxxxxxxxxxx<mailto:erobinson@xxxxxxxxxxxxxxxxxx>> wrote:
I know this is not an uncommon issue and I recall it relates to a configuration problem if I’m not mistaken, but for the life of me I cannot fathom why two machines I am working with seem to exhibit this behaviour consistently.  I have a couple of Windows test servers set up to facilitate an offline upgrade from 2.16 but I’m unable to resolve this on these two machines.  I’ve seen this on Linux as well so assume it’s not OS related.

In a nutshell, the system appears to start up fine, I am able to login and access the system, create data elements, create users, etc. but when Tomcat is shut down, the database is cleared except for the aggregate tables (all other tables are dropped):
[cid:image001.jpg@01D32298.C3F1E660]

When Tomcat is started again, obviously the data is no longer there.  As long as it’s running, all appears well in the tables:
[cid:image003.jpg@01D32298.C3F1E660]

I have attached a copy of the logs as well as my hibernate.properties file (dummy password) and my system variables.  I’ve also attached a screenshot of the ‘about DHIS2’ page for reference.

As far as I can see, the only issues / errors on startup include:
A bunch of ERROR for database constraint drop scripts on startup – because the database does not yet exist – I assume these are benign.
Some WARN messages:
               “[127.0.0.1]:5701 [dev] [3.2.1] No join method is enabled! Starting standalone. (HazelcastInstanceImpl.java [localhost-startStop-1])”
               “RP discovery / realm validation disabled;  (RealmVerifier.java [localhost-startStop-1])”
               “Did not find any ViewResolvers to delegate to; please configure them using the 'viewResolvers' property on the ContentNegotiatingViewResolver (ContentNegotiatingViewResolver.java [localhost-startStop-1])”

Any idea what could be causing this?

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-users
Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx<mailto:dhis2-users@xxxxxxxxxxxxxxxxxxx>
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp



--
Em Le Hong
DHIS2 Implementation| HISP Vietnam
em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx> | Skype: em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx>

[https://drive.google.com/uc?id=0B-tlJrv190f5dmR1Y0t2NERvcVU&export=download]






--
Em Le Hong
DHIS2 Implementation| HISP Vietnam
em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx> | Skype: em.hispvietnam@xxxxxxxxx<mailto:em.hispvietnam@xxxxxxxxx>

[https://drive.google.com/uc?id=0B-tlJrv190f5dmR1Y0t2NERvcVU&export=download]



JPEG image

JPEG image


References