Thanks for this Jo, but I think this is not the issue. A bit more detail.
1) Here is my hibernate.properties file.
wheel@dhissvr01:~$ tail -f /etc/dhis2/ghain/hibernate.properties
hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
hibernate.connection.driver_class = org.postgresql.Driver
hibernate.connection.url = jdbc:postgresql://*****/*****
hibernate.connection.username = dhis2
hibernate.connection.password = *******
hibernate.hbm2ddl.auto = update
I already have it.
2) Here is the query produced by Hibernate, which fails from the postgres log.
DETAIL: parameters: $1 = 'default'
ERROR: column dataelemen1_.uuid does not exist at character 166
STATEMENT: select optioncomb0_.categorycomboid as category2_149_1_,
optioncomb0_.categoryoptioncomboid as category1_1_,
dataelemen1_.categoryoptioncomboid as category1_143_0_,
dataelemen1_.uuid as uuid143_0_, dataelemen1_1_.categorycomboid as
category2_144_0_ from categorycombos_optioncombos optioncomb0_ inner
join categoryoptioncombo dataelemen1_ on
optioncomb0_.categoryoptioncomboid=dataelemen1_.categoryoptioncomboid
left outer join categorycombos_optioncombos dataelemen1_1_ on
dataelemen1_.categoryoptioncomboid=dataelemen1_1_.categoryoptioncomboid
where optioncomb0_.categorycomboid=$1
ERROR: current transaction is aborted, commands ignored until end of
transaction block
Look carefully and you will see that the dataelement1_ table
references categoryoptioncombo, which according to the query, needs a
uuid.
3) dataelement already has a uuid column.
Regards,
Jason
···
On Wed, Mar 2, 2011 at 2:54 PM, Jo Størset <storset@gmail.com> wrote:
Hi,
Den 2. mars 2011 kl. 18.08 skrev Jason Pickering:
Using the latest snapshot from Jenkins, I get this upgrading from 2.0.6 to 2.1
* ERROR 13:35:46,079 ERROR: column dataelemen1_.uuid does not exist
Position: 166 (JDBCExceptionReporter.java [Thread-2])Since we want to use a more stable id for external communication, I think I added uuid to dataelement (at least I've added the population of uuids on startup).
I think that means you have to have
hibernate.hbm2ddl.auto = update
set on the first startup for Hibernate to take care of adding it. I think this is our "default" way of handling db changes, but we should probably be more explicit about it..
Jo
--
Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+260974901293