dhis2 installation update

Hi Tom,

I'm copying this to the dhis2-users team and mailing list; you can
sign up here: https://launchpad.net/~dhis2-users

I just did a clean install of version 2.7 against Mysql, and I seem to
be able to enter data without getting the error you got.
"Caused by (com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException):
Table 'dhis2.minmaxdataelement' doesn't exist"

However, I see that there is no table called "minmaxdataelement" in
MySql (149 tables total), whereas it is there when I do the same in
Postgres (150 tables). This does indicate that there is a problem with
the data generation for MySql.

I have reported this as a bug, https://bugs.launchpad.net/dhis2/+bug/985800

I hope this will be fixed for the upcoming 2.8 release. While you wait
for that, you could probably run the following SQL query to add the
missing table:

CREATE TABLE minmaxdataelement
(
  minmaxdataelementid int(11) NOT NULL,
  sourceid int(11),
  dataelementid int(11),
  categoryoptioncomboid int(11),
  `minvalue` int(11) NOT NULL,
  `maxvalue` int(11) NOT NULL,
  generated bool NOT NULL
)

Knut

Hi Knut,
I am using MySQL on Linux with DHIS2. I have 157 tables including
'minmaxdataelement'.
So, I think this is a problem of generating tables than MySQL.

More or less similar behaviour (table does not exist) can be seen with the
use of Datasets >> Edit Compulsory Dataelements. There the error indicates
not having '_categoryoptioncomboname' but the problem solved when Resource
Tables generated under Data Administration. I didn't report this as a bug
though.

Anyway, your description indicated that 'minmaxdataelement' error is not
related to Resource tables. Since you are having 149 and 150 tables
respectively, you haven't generated Resource tables yet, so I guess, you
can replicate '_categoryoptioncomboname' error message.

Roshan

···

On 22 April 2012 22:20, Knut Staring <knutst@gmail.com> wrote:

Hi Tom,

I'm copying this to the dhis2-users team and mailing list; you can
sign up here: https://launchpad.net/~dhis2-users

I just did a clean install of version 2.7 against Mysql, and I seem to
be able to enter data without getting the error you got.
"Caused by (com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException):
Table 'dhis2.minmaxdataelement' doesn't exist"

However, I see that there is no table called "minmaxdataelement" in
MySql (149 tables total), whereas it is there when I do the same in
Postgres (150 tables). This does indicate that there is a problem with
the data generation for MySql.

I have reported this as a bug,
https://bugs.launchpad.net/dhis2/+bug/985800

I hope this will be fixed for the upcoming 2.8 release. While you wait
for that, you could probably run the following SQL query to add the
missing table:

CREATE TABLE minmaxdataelement
(
minmaxdataelementid int(11) NOT NULL,
sourceid int(11),
dataelementid int(11),
categoryoptioncomboid int(11),
`minvalue` int(11) NOT NULL,
`maxvalue` int(11) NOT NULL,
generated bool NOT NULL
)

Knut

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp

Thanks Roshan,

There is quite a clear difference with the resource tables, which are
generated later, on manual request (but it is a kind of bug if you get
error messages if you haven't generated them - at a minimum, you
should be directed to trigger the generation).

Adding the missing minmaxdataelement table workedm, but it is
interesting that you have it - perhaps your database was created with
2.6? I have not heard of this bug before, so it could have been
something that was introduced with 2.7. It seems strange to me that
there should be a difference between Linux and Windows on this.

Knut

···

On Sun, Apr 22, 2012 at 11:02 PM, Roshan Hewapathirana <roshanhewapathirana@gmail.com> wrote:

Hi Knut,
I am using MySQL on Linux with DHIS2. I have 157 tables including
'minmaxdataelement'.
So, I think this is a problem of generating tables than MySQL.

More or less similar behaviour (table does not exist) can be seen with the
use of Datasets >> Edit Compulsory Dataelements. There the error indicates
not having '_categoryoptioncomboname' but the problem solved when Resource
Tables generated under Data Administration. I didn't report this as a bug
though.

Anyway, your description indicated that 'minmaxdataelement' error is not
related to Resource tables. Since you are having 149 and 150 tables
respectively, you haven't generated Resource tables yet, so I guess, you can
replicate '_categoryoptioncomboname' error message.

Roshan

On 22 April 2012 22:20, Knut Staring <knutst@gmail.com> wrote:

Hi Tom,

I'm copying this to the dhis2-users team and mailing list; you can
sign up here: https://launchpad.net/~dhis2-users

I just did a clean install of version 2.7 against Mysql, and I seem to
be able to enter data without getting the error you got.
"Caused by (com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException):
Table 'dhis2.minmaxdataelement' doesn't exist"

However, I see that there is no table called "minmaxdataelement" in
MySql (149 tables total), whereas it is there when I do the same in
Postgres (150 tables). This does indicate that there is a problem with
the data generation for MySql.

I have reported this as a bug,
https://bugs.launchpad.net/dhis2/+bug/985800

I hope this will be fixed for the upcoming 2.8 release. While you wait
for that, you could probably run the following SQL query to add the
missing table:

CREATE TABLE minmaxdataelement
(
minmaxdataelementid int(11) NOT NULL,
sourceid int(11),
dataelementid int(11),
categoryoptioncomboid int(11),
`minvalue` int(11) NOT NULL,
`maxvalue` int(11) NOT NULL,
generated bool NOT NULL
)

Knut

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-users
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-users
More help : https://help.launchpad.net/ListHelp

--
Knut Staring
Dept. of Informatics, University of Oslo
+4791880522
http://dhis2.org

Ok, I'll report _categoryoptioncomboname as a bug.
In short it is,
[+] Exception (java.lang.RuntimeException): Failed to get all operands
[+] Caused by (com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException):
Table 'dhis._categoryoptioncomboname' doesn't exist
I'll send all details to launchpad.

About minmaxdataelement table, I was able to get it again after dropping my
database again (so I have 150 tables, before creating resource tables).
My database is generated by 2.7 codes as a fresh instance.
Version:2.7
Build revision:6129
Build date:2012-04-17 02:14

Hope this will help you to fix it.

Roshan

This is not so much a bug as a blueprint I think. The system does not
behave necessarily as the user would expect, but it has been
documented quite some time ago here

https://blueprints.launchpad.net/dhis2/+spec/generate-resource-tables-on-startup

Certainly, the message could be handled a bit better however.

Regards,
Jason

···

On Mon, Apr 23, 2012 at 4:49 PM, Roshan Hewapathirana <roshanhewapathirana@gmail.com> wrote:

Ok, I'll report _categoryoptioncomboname as a bug.
In short it is,
[+] Exception (java.lang.RuntimeException): Failed to get all operands
[+] Caused by (com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException):
Table 'dhis._categoryoptioncomboname' doesn't exist
I'll send all details to launchpad.

About minmaxdataelement table, I was able to get it again after dropping my
database again (so I have 150 tables, before creating resource tables).
My database is generated by 2.7 codes as a fresh instance.
Version:2.7
Build revision:6129
Build date:2012-04-17 02:14

Hope this will help you to fix it.

Roshan

_______________________________________________
Mailing list: DHIS 2 Users in Launchpad
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : DHIS 2 Users in Launchpad
More help : ListHelp - Launchpad Help