DHIS2: minmaxdataelement table not created

Hi Jeton=2C
interesting that you are setting this up in Kosovo.=20
I think what you have is two problems. Regarding the build problem you must=
first build dhis-2/ then dhis-2/dhis-web=2C see here for instructions: htt=
p://dhis2.org/development

Regarding the database problem I am not really sure. There might be some is=
sues when upgrading from a legacy database in MySQL to a newer DHIS 2 versi=
on. In case you haven't done too much with your database you can try changi=
ng 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=2C

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=2C 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=2C can you please help me fix the problem I'm running into. That

is=2C 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=2C729 System property dhis2.home not set

(DefaultLocationManager.java [main])

* INFO 11:29:24=2C729 Environment variable DHIS2_HOME points to C:\dhis

(DefaultLocationManager.java [main])

* ERROR 11:30:01=2C054 Unsuccessful: create table minmaxdataelement

(minmaxdataelementid integer not null auto_increment=2C sourceid integer=2C

dataelementid integer=2C categoryoptioncomboid integer=2C minvalue integer

not null=2C maxvalue integer not null=2C generated bit not null=2C primary =
key

(minmaxdataelementid)) (SchemaUpdate.java [main])

* ERROR 11:30:01=2C055 You have an error in your SQL syntax=3B check the

manual that corresponds to your MySQL server version for the right

syntax to use near 'maxvalue integer not null=2C generated bit not null=2C

primary key (minmaxdataelemen' at line 1 (SchemaUpdate.java [main])

* ERROR 11:30:01=2C058 Unsuccessful: alter table minmaxdataelement add

index fk_minmaxdataelement_dataelementid (dataelementid)=2C add constraint

fk_minmaxdataelement_dataelementid foreign key (dataelementid)

references dataelement (dataelementid) (SchemaUpdate.java [main])

* ERROR 11:30:01=2C059 Table 'dhis.minmaxdataelement' doesn't exist

(SchemaUpdate.java [main])

* ERROR 11:30:01=2C063 Unsuccessful: alter table minmaxdataelement add

index fk_minmaxdataelement_categoryoptioncomboid

(categoryoptioncomboid)=2C add constraint

fk_minmaxdataelement_categoryoptioncomboid foreign key

(categoryoptioncomboid) references categoryoptioncombo

(categoryoptioncomboid) (SchemaUpdate.java [main])

* ERROR 11:30:01=2C063 Table 'dhis.minmaxdataelement' doesn't exist

(SchemaUpdate.java [main])

* ERROR 11:30:01=2C067 Unsuccessful: alter table minmaxdataelement add

index fk_minmaxdataelement_sourceid (sourceid)=2C add constraint

fk_minmaxdataelement_sourceid foreign key (sourceid) references source

(sourceid) (SchemaUpdate.java [main])

* ERROR 11:30:01=2C076 Table 'dhis.minmaxdataelement' doesn't exist

(SchemaUpdate.java [main])

* ERROR 11:30:01=2C080 Unsuccessful: create index index_minmaxdataelement

on minmaxdataelement (sourceid=2C dataelementid=2C categoryoptioncomboid)

(SchemaUpdate.java [main])

* ERROR 11:30:01=2C080 Table 'dhis.minmaxdataelement' doesn't exist

(SchemaUpdate.java [main])

* INFO 11:30:46=2C738 Executing startup routine [1 of 10=2C runlevel 1]:

TableAlteror (DefaultStartupRoutineExecutor.java [main])

Also=2C 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=2C

org.hisp.dhis:dhis-service-i18n:jar:2.3-SNAPSHOT=2C org.hisp.dhis:dhis-

service-cor

e:jar:2.3-SNAPSHOT=2C org.hisp.dhis:dhis-service-

administration:jar:2.3-SNAPSHOT=2C

org.hisp.dhis:dhis-service-options:jar:2.3-SNAPSHOT=2C org.hisp.dhis:dhis-

service-

reporting:jar:2.3-SNAPSHOT=2C org.hisp.dhis:dhis-support-

test:jar:2.3-SNAPSHOT=2C 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=2C 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=2C

please rea

d the following articles:

[ERROR] [Help 1]

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

lutionException

[ERROR]

[ERROR] After correcting the problems=2C you can resume the build with the

command

[ERROR] mvn <goals> -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

                 =

--_785b5507-d215-4507-ba0d-51d30d7eb7fd_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style><!--
.hmmessage P
{
margin:0px=3B
padding:0px
}
body.hmmessage
{
font-size: 10pt=3B
font-family:Tahoma
}
--></style>
</head>
<body class=3D'hmmessage'>

<style><!--
.hmmessage P
{
margin:0px=3B
padding:0px
}
body.hmmessage
{
font-size: 10pt=3B
font-family:Tahoma
}
--></style>

Thanks for the quick reply Lars.<div><br></div><div>Sorry for not letting y=
ou know but in fact the dhis-2/ has been built successfully. Only dhis-2/dh=
is-web is not going through!</div><div><br></div><div>Will switch to Postgr=
eeSQL and see what happens.</div><div><br></div><div><br></div><div>Best=2C=
</div><div><br></div><div>Jeton<br><br><hr id=3D"stopSpelling">Date: Tue=2C=
14 Jun 2011 18:57:43 +0200<br>Subject: Re: DHIS2: minmaxdataelement table =
not created<br>From: larshelge@gmail.com<br>To: jeton_lesnadekon@hotmail.co=
m=3B dhis2-devs@lists.launchpad.net<br><br><div><br></div>Hi Jeton=2C<div><=

</div><div>interesting that you are setting this up in Kosovo.&nbsp=3B</=
<div><br></div><div>I think what you have is two problems. Regarding th=

e build problem you must first build dhis-2/ then dhis-2/dhis-web=2C see he=
re for instructions:&nbsp=3B<a target=3D"_blank">Developer Resources - DHIS2
nt</a></div>
<div><br></div><div><a target=3D"_blank"></a>Regarding the database problem=
I am not really sure. There might be some issues when upgrading from a leg=
acy database in MySQL to a newer DHIS 2 version. In case you haven't done t=
oo much with your database you can try changing to PostgreSQL which is more=
&nbsp=3Bthoroughly&nbsp=3Btested in the community.</div>
<div><br></div><div>Forwarding to list so other can help.</div><div><br></d=

<div>regards Lars</div><div><br><br><div class=3D"ecxgmail_quote">2011/6=

/14 Jeton Mehmeti <span dir=3D"ltr">&lt=3B<a target=3D"_blank">jeton_lesnad=
ekon@hotmail.com</a>&gt=3B</span><br>
<blockquote class=3D"ecxgmail_quote" style=3D"border-left:1px #ccc solid=3B=
padding-left:1ex">Hi Lars=2C<br>
<br>
This is Jeton Mehmeti emailing from Kosovo regarding an issue i'm<br>
running into when starting tomcat server.<br>
<br>
I &nbsp=3Bhave recently checked out the DHIS2 source code for the purpose a=
nd<br>
intention of implementing DHIS2 in Kosovo. No agreement has been made<br>
yet=2C but I'm in process of negotiation with them guys from Ministry of<br=

Health and they are eager to see the software and learn what they can<br>
benefit from it.<br>
<br>
Anyways=2C can you please help me fix the problem I'm running into. That<br=

is=2C when I run tomcat server minmaxdataelement table cannot be created.<b=

Please see log below:<br>
<br>
2011-06-14 11:28:17 Commons Daemon procrun stdout initialized* INFO<br>
11:29:24=2C729 System property dhis2.home not set<br>
(DefaultLocationManager.java [main])<br>
* INFO &nbsp=3B11:29:24=2C729 Environment variable DHIS2_HOME points to C:\=
dhis<br>
(DefaultLocationManager.java [main])<br>
* ERROR 11:30:01=2C054 Unsuccessful: create table minmaxdataelement<br>
(minmaxdataelementid integer not null auto_increment=2C sourceid integer=2C=
<br>
dataelementid integer=2C categoryoptioncomboid integer=2C minvalue integer<=

not null=2C maxvalue integer not null=2C generated bit not null=2C primary =
key<br>
(minmaxdataelementid)) (SchemaUpdate.java [main])<br>
* ERROR 11:30:01=2C055 You have an error in your SQL syntax=3B check the<br=

manual that corresponds to your MySQL server version for the right<br>
syntax to use near 'maxvalue integer not null=2C generated bit not null=2C<=

primary key (minmaxdataelemen' at line 1 (SchemaUpdate.java [main])<br>
* ERROR 11:30:01=2C058 Unsuccessful: alter table minmaxdataelement add<br>
index fk_minmaxdataelement_dataelementid (dataelementid)=2C add constraint<=

fk_minmaxdataelement_dataelementid foreign key (dataelementid)<br>
references dataelement (dataelementid) (SchemaUpdate.java [main])<br>
* ERROR 11:30:01=2C059 Table 'dhis.minmaxdataelement' doesn't exist<br>
(SchemaUpdate.java [main])<br>
* ERROR 11:30:01=2C063 Unsuccessful: alter table minmaxdataelement add<br>
index fk_minmaxdataelement_categoryoptioncomboid<br>
(categoryoptioncomboid)=2C add constraint<br>
fk_minmaxdataelement_categoryoptioncomboid foreign key<br>
(categoryoptioncomboid) references categoryoptioncombo<br>
(categoryoptioncomboid) (SchemaUpdate.java [main])<br>
* ERROR 11:30:01=2C063 Table 'dhis.minmaxdataelement' doesn't exist<br>
(SchemaUpdate.java [main])<br>
* ERROR 11:30:01=2C067 Unsuccessful: alter table minmaxdataelement add<br>
index fk_minmaxdataelement_sourceid (sourceid)=2C add constraint<br>
fk_minmaxdataelement_sourceid foreign key (sourceid) references source<br>
(sourceid) (SchemaUpdate.java [main])<br>
* ERROR 11:30:01=2C076 Table 'dhis.minmaxdataelement' doesn't exist<br>
(SchemaUpdate.java [main])<br>
* ERROR 11:30:01=2C080 Unsuccessful: create index index_minmaxdataelement<b=

on minmaxdataelement (sourceid=2C dataelementid=2C categoryoptioncomboid)<b=

(SchemaUpdate.java [main])<br>
* ERROR 11:30:01=2C080 Table 'dhis.minmaxdataelement' doesn't exist<br>
(SchemaUpdate.java [main])<br>
* INFO &nbsp=3B11:30:46=2C738 Executing startup routine [1 of 10=2C runleve=
l 1]:<br>
TableAlteror (DefaultStartupRoutineExecutor.java [main])<br>
<br>
Also=2C when I run mvn eclipse:eclipse in &nbsp=3B/dhis-2/dhis-web &nbsp=3B=
Built fails<br>
for the following reasons:<br>
<br>
[INFO] BUILD FAILURE<br>
[INFO]<br>
------------------------------------------------------------------------<br=

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

[ERROR] Failed to execute goal on project dhis-web-commons: Could not<br>
resolve de<br>
pendencies for project org.hisp.dhis:dhis-web-commons:jar:2.3-SNAPSHOT:<br>
The foll<br>
owing artifacts could not be resolved: org.hisp.dhis:dhis-<br>
api:jar:2.3-SNAPSHOT=2C<br>
org.hisp.dhis:dhis-service-i18n:jar:2.3-SNAPSHOT=2C org.hisp.dhis:dhis-<br>
service-cor<br>
e:jar:2.3-SNAPSHOT=2C org.hisp.dhis:dhis-service-<br>
administration:jar:2.3-SNAPSHOT=2C<br>
org.hisp.dhis:dhis-service-options:jar:2.3-SNAPSHOT=2C org.hisp.dhis:dhis-<=

service-<br>
reporting:jar:2.3-SNAPSHOT=2C org.hisp.dhis:dhis-support-<br>
test:jar:2.3-SNAPSHOT=2C or<br>
g.hisp.dhis:dhis-support-system:jar:2.3-SNAPSHOT: Could not find<br>
artifact org.hi<br>
sp.dhis:dhis-api:jar:2.3-SNAPSHOT in amplecode_maven2_repo<br>
(<a target=3D"_blank">http://www.amplecode</a><br>
.org/maven2) -&gt=3B [Help 1]<br>
[ERROR]<br>
[ERROR] To see the full stack trace of the errors=2C re-run Maven with the<=

-e swit<br>
ch.<br>
[ERROR] Re-run Maven using the -X switch to enable full debug logging.<br>
[ERROR]<br>
[ERROR] For more information about the errors and possible solutions=2C<br>
please rea<br>
d the following articles:<br>
[ERROR] [Help 1]<br>
<a target=3D"_blank">http://cwiki.apache.org/confluence/display/MAVEN/Depen=
dencyReso</a><br>
lutionException<br>
[ERROR]<br>
[ERROR] After correcting the problems=2C you can resume the build with the<=

command<br>
<br>
[ERROR] &nbsp=3B mvn &lt=3Bgoals&gt=3B -rf :dhis-web-commons<br>
C:\dhis\dhis-2\dhis-web&gt=3B<br>
<br>
Sorry to overload you with so much error text. I hope you can find some<br>
time to respond.<br>
<br>
Thank in advance.<br>
<br>
Jeton<br>
<font color=3D"#888888">--<br>
This message was sent from Launchpad by<br>
Jeton Mehmeti (<a target=3D"_blank">https://launchpad.net/~jeton-lesnadekon=
</a>)<br>
using the "Contact this user" link on your profile page<br>
(<a target=3D"_blank">https://launchpad.net/~larshelge&lt;/a&gt;\).<br>
For more information see<br>
<a target=3D"_blank">https://help.launchpad.net/YourAccount/ContactingPeopl=
e</a><br>
</font></blockquote></div><br></div></div>
                 </body>
</html>=

--_785b5507-d215-4507-ba0d-51d30d7eb7fd_--