DHIS2: minmaxdataelement table not created

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] BUILD FAILURE

[INFO]


[INFO] Total time: 14.002s

[INFO] Finished at: Tue Jun 14 12:11:57 CEST 2011

[INFO] Final Memory: 9M/21M

[INFO]


[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-

api:jar:2.3-SNAPSHOT,

org.hisp.dhis:dhis-service-i18n:jar:2.3-SNAPSHOT, org.hisp.dhis:dhis-

service-cor

e:jar:2.3-SNAPSHOT, org.hisp.dhis:dhis-service-

administration:jar:2.3-SNAPSHOT,

org.hisp.dhis:dhis-service-options:jar:2.3-SNAPSHOT, org.hisp.dhis:dhis-

service-

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

(http://www.amplecode

.org/maven2) → [Help 1]

[ERROR]

[ERROR] To see the full stack trace of the errors, re-run Maven with the

-e swit

ch.

[ERROR] Re-run Maven using the -X switch to enable full debug logging.

[ERROR]

[ERROR] For more information about the errors and possible solutions,

please rea

d the following articles:

[ERROR] [Help 1]

http://cwiki.apache.org/confluence/display/MAVEN/DependencyReso

lutionException

[ERROR]

[ERROR] After correcting the problems, you can resume the build with the

command

[ERROR] mvn -rf :dhis-web-commons

C:\dhis\dhis-2\dhis-web>

Sorry to overload you with so much error text. I hope you can find some

time to respond.

Thank in advance.

Jeton

This message was sent from Launchpad by

Jeton Mehmeti (https://launchpad.net/~jeton-lesnadekon)

using the “Contact this user” link on your profile page

(https://launchpad.net/~larshelge).

For more information see

https://help.launchpad.net/YourAccount/ContactingPeople