← Back to team overview

dhis2-devs team mailing list archive

Re: disappearing tables

 

Good long shot.  Included hbm2ddl.auto=true and everything is fine
again :-)  But I've never had to set this before (I see what it does
now).  Shouldn't this be coming from one of our base inherited
properties?

2010/12/14 Bob Jolliffe <bobjolliffe@xxxxxxxxx>:
> Could well be.  I just cut and paste a generic postgres hibernate/c3p0 setup.
>
> hibernate.connection.driver_class = org.postgresql.Driver
> hibernate.connection.url = jdbc:postgresql://localhost/dhis2_ke
> hibernate.connection.username = postgres
> hibernate.connection.password = postgres
> hibernate.c3p0.min_size=5
> hibernate.c3p0.max_size=20
> hibernate.c3p0.timeout=1800
> hibernate.c3p0.max_statements=50
> hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
>
> Not sure what the hbm2ddl.auto property does.  Will look it up.
>
> Cheers
> bob
>
> 2010/12/14 Lars Helge Øverland <larshelge@xxxxxxxxx>:
>> Can we see the hibernate.properties in use? A long shot: it might be related
>> to the hibernate.hbm2ddl.auto property, usually should be set to "update".
>> On Tue, Dec 14, 2010 at 1:52 PM, Bob Jolliffe <bobjolliffe@xxxxxxxxx> wrote:
>>>
>>> This is so weird i am even a bit embarressed sharing on the list but I
>>> have had a very strange morning.  I've been trying to set up a new
>>> dhis development environment in windoze (which i know is a bad idea
>>> but anyway ..).  What seems to be happening is that dhis, when it
>>> starts up, is clobbering tables in my database.  I was using postgres
>>> 9 and figured maybe that was too brave so I downgraded back to 8.4.5.
>>> Same issue.
>>>
>>> What happens is this:  if I start with a blank database, then when
>>> dhis runs the tables are created as normal - 164 of them.  But after i
>>> shut down dhis I am left with only 5 timetables -
>>> aggregateddatavalues, aggregateddatasetcompleteness,
>>> aggregatedindicatorvalue, datavaluearchive and
>>> patientdatavaluearchive.  Everything else is just gone :-(
>>>
>>> What is worse is that when I start with an existing database (with 169
>>> tables and lots of data) it does the same thing.  Clobbers most of my
>>> tables.  Interesting while dhis is running I have lots of empty tables
>>> which used to be full plus an oddly named _temp_dataelement table.
>>> Then when I shutdown dhis and look at my db again most of the tables
>>> have just gone and I'm left with the above plus a couple of _resource
>>> tables.
>>>
>>> Environment:
>>> dhis.war latest build 1676 - both my own and download from hudson
>>> postgres8.4.5
>>> java 1.6.0_22
>>> tomcat 6.0.29
>>>
>>> Has anyone else seen something like this or wasI just plagued by db
>>> spirits this morning.
>>>
>>> Regards
>>> Bob
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>



Follow ups

References