DHIS2: minmaxdataelement table not created

Not so familiar with MySQL but are you sure the dhis schema is the default? These JDBC queries ( as far as I know) will not handle multiple schemes in the same database. I have seen similar errors with posrtgres but not sure it is related in this case.


Sent from my HTC

----- Reply message -----
From: “Lars Helge Øverland” larshelge@gmail.com
Date: Tue, Jun 14, 2011 18:57
Subject: [Dhis2-devs] DHIS2: minmaxdataelement table not created
To: “Jeton Mehmeti” jeton_lesnadekon@hotmail.com, “DHIS 2 developers” dhis2-devs@lists.launchpad.net

Hi Jeton,

interesting that you are setting this up in Kosovo.

I think what you have is two problems. Regarding the build problem you must
first build dhis-2/ then dhis-2/dhis-web, see here for instructions:

<http://dhis2.org/development>Regarding the database problem I am not really
sure. There might be some issues when upgrading from a legacy database in
MySQL to a newer DHIS 2 version. In case you haven’t done too much with your
database you can try changing to PostgreSQL which is more thoroughly tested
in the community.

Forwarding to list so other can help.

regards Lars

2011/6/14 Jeton Mehmeti jeton_lesnadekon@hotmail.com

Hi Lars,

This is Jeton Mehmeti emailing from Kosovo regarding an issue i’m
running into when starting tomcat server.

I have recently checked out the DHIS2 source code for the purpose and
intention of implementing DHIS2 in Kosovo. No agreement has been made
yet, but I’m in process of negotiation with them guys from Ministry of
Health and they are eager to see the software and learn what they can
benefit from it.

Anyways, can you please help me fix the problem I’m running into. That
is, when I run tomcat server minmaxdataelement table cannot be created.
Please see log below:

2011-06-14 11:28:17 Commons Daemon procrun stdout initialized* INFO
11:29:24,729 System property dhis2.home not set
(DefaultLocationManager.java [main])

  • INFO 11:29:24,729 Environment variable DHIS2_HOME points to C:\dhis
    (DefaultLocationManager.java [main])
  • ERROR 11:30:01,054 Unsuccessful: create table minmaxdataelement
    (minmaxdataelementid integer not null auto_increment, sourceid integer,
    dataelementid integer, categoryoptioncomboid integer, minvalue integer
    not null, maxvalue integer not null, generated bit not null, primary key
    (minmaxdataelementid)) (SchemaUpdate.java [main])
  • ERROR 11:30:01,055 You have an error in your SQL syntax; check the
    manual that corresponds to your MySQL server version for the right
    syntax to use near ‘maxvalue integer not null, generated bit not null,
    primary key (minmaxdataelemen’ at line 1 (SchemaUpdate.java [main])
  • ERROR 11:30:01,058 Unsuccessful: alter table minmaxdataelement add
    index fk_minmaxdataelement_dataelementid (dataelementid), add constraint
    fk_minmaxdataelement_dataelementid foreign key (dataelementid)
    references dataelement (dataelementid) (SchemaUpdate.java [main])
  • ERROR 11:30:01,059 Table ‘dhis.minmaxdataelement’ doesn’t exist
    (SchemaUpdate.java [main])
  • ERROR 11:30:01,063 Unsuccessful: alter table minmaxdataelement add
    index fk_minmaxdataelement_categoryoptioncomboid
    (categoryoptioncomboid), add constraint
    fk_minmaxdataelement_categoryoptioncomboid foreign key
    (categoryoptioncomboid) references categoryoptioncombo
    (categoryoptioncomboid) (SchemaUpdate.java [main])
  • ERROR 11:30:01,063 Table ‘dhis.minmaxdataelement’ doesn’t exist
    (SchemaUpdate.java [main])
  • ERROR 11:30:01,067 Unsuccessful: alter table minmaxdataelement add
    index fk_minmaxdataelement_sourceid (sourceid), add constraint
    fk_minmaxdataelement_sourceid foreign key (sourceid) references source
    (sourceid) (SchemaUpdate.java [main])
  • ERROR 11:30:01,076 Table ‘dhis.minmaxdataelement’ doesn’t exist
    (SchemaUpdate.java [main])
  • ERROR 11:30:01,080 Unsuccessful: create index index_minmaxdataelement
    on minmaxdataelement (sourceid, dataelementid, categoryoptioncomboid)
    (SchemaUpdate.java [main])
  • ERROR 11:30:01,080 Table ‘dhis.minmaxdataelement’ doesn’t exist
    (SchemaUpdate.java [main])
  • INFO 11:30:46,738 Executing startup routine [1 of 10, runlevel 1]:
    TableAlteror (DefaultStartupRoutineExecutor.java [main])

Also, when I run mvn eclipse:eclipse in /dhis-2/dhis-web Built fails
for the following reasons:


[INFO] Total time: 14.002s
[INFO] Finished at: Tue Jun 14 12:11:57 CEST 2011
[INFO] Final Memory: 9M/21M

[ERROR] Failed to execute goal on project dhis-web-commons: Could not
resolve de
pendencies for project org.hisp.dhis:dhis-web-commons:jar:2.3-SNAPSHOT:
The foll
owing artifacts could not be resolved: org.hisp.dhis:dhis-
org.hisp.dhis:dhis-service-i18n:jar:2.3-SNAPSHOT, org.hisp.dhis:dhis-
e:jar:2.3-SNAPSHOT, org.hisp.dhis:dhis-service-
org.hisp.dhis:dhis-service-options:jar:2.3-SNAPSHOT, org.hisp.dhis:dhis-
reporting:jar:2.3-SNAPSHOT, org.hisp.dhis:dhis-support-
test:jar:2.3-SNAPSHOT, or
g.hisp.dhis:dhis-support-system:jar:2.3-SNAPSHOT: Could not find
artifact org.hi
sp.dhis:dhis-api:jar:2.3-SNAPSHOT in amplecode_maven2_repo
.org/maven2) → [Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven