A series of (Hibernate-related?) errors when attempting to create new data elements

Hello,

We have upgraded several DHIS instances from earlier versions (2.0.X 2.4, and 2.7) to 2.13/2.14 recently.

Some of the new instances are not letting our users create new data elements with “an error occurred” message on the front-end.

Catalina output is attached from one instance.

Basically, when you click on “Data Elements” and then “Add New” to enter a name and click on create button, you get a series of errors triggered on the backend.

Each DHIS restart increases the ID that’s causing the error (i.e., 2045 to 2046 to 2047)

Based on my understanding, it seems to be a hibernate-related caching issue, but I could not manage to get it to resolve.

Any help is appreciated.

catalina.hibernate.error.out (142 KB)

···


-Cenk.

Hi,

Are you using postgres or mysql ?

  • ERROR 2014-04-08 18:40:57,093 ERROR: duplicate key value violates unique constraint “dataelement_pkey”

Detail: Key (dataelementid)=(2045) already exists. (SqlExceptionHelper.java [http-bio-80-exec-1])

···


Morten

On Wed, Apr 9, 2014 at 2:09 AM, D. Cenk Erdil dcerdil@gmail.com wrote:

Hello,

We have upgraded several DHIS instances from earlier versions (2.0.X 2.4, and 2.7) to 2.13/2.14 recently.

Some of the new instances are not letting our users create new data elements with “an error occurred” message on the front-end.

Catalina output is attached from one instance.

Basically, when you click on “Data Elements” and then “Add New” to enter a name and click on create button, you get a series of errors triggered on the backend.

Each DHIS restart increases the ID that’s causing the error (i.e., 2045 to 2046 to 2047)

Based on my understanding, it seems to be a hibernate-related caching issue, but I could not manage to get it to resolve.

Any help is appreciated.


-Cenk.


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

Hi @cenk.
Can you send the log file??

···

2014-04-09 5:20 GMT+01:00 Morten Olav Hansen mortenoh@gmail.com:

Hi,

Are you using postgres or mysql ?

  • ERROR 2014-04-08 18:40:57,093 ERROR: duplicate key value violates unique constraint “dataelement_pkey”

Detail: Key (dataelementid)=(2045) already exists. (SqlExceptionHelper.java [http-bio-80-exec-1])


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


Riddy NDOMA
Software Developer
Skype: riddyndoma, G+: riddyndoma, FB: riddy ndoma

Twitter: riddyndoma, LinkedIn: riddy ndoma
Blog: http://riddyndoma.blogspot.com/

Vous servir est mon désire (Serving you is my desire)


Morten

On Wed, Apr 9, 2014 at 2:09 AM, D. Cenk Erdil dcerdil@gmail.com wrote:

Hello,

We have upgraded several DHIS instances from earlier versions (2.0.X 2.4, and 2.7) to 2.13/2.14 recently.

Some of the new instances are not letting our users create new data elements with “an error occurred” message on the front-end.

Catalina output is attached from one instance.

Basically, when you click on “Data Elements” and then “Add New” to enter a name and click on create button, you get a series of errors triggered on the backend.

Each DHIS restart increases the ID that’s causing the error (i.e., 2045 to 2046 to 2047)

Based on my understanding, it seems to be a hibernate-related caching issue, but I could not manage to get it to resolve.

Any help is appreciated.


-Cenk.


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

@Riddy: The attached “catalina…out” file is the log file. Let me know if you don’t see it.

@Marten: postgres 9.1.

···

2014-04-09 5:20 GMT+01:00 Morten Olav Hansen mortenoh@gmail.com:

Hi,

Are you using postgres or mysql ?

  • ERROR 2014-04-08 18:40:57,093 ERROR: duplicate key value violates unique constraint “dataelement_pkey”

Detail: Key (dataelementid)=(2045) already exists. (SqlExceptionHelper.java [http-bio-80-exec-1])


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


Riddy NDOMA
Software Developer
Skype: riddyndoma, G+: riddyndoma, FB: riddy ndoma

Twitter: riddyndoma, LinkedIn: riddy ndoma
Blog: http://riddyndoma.blogspot.com/

Vous servir est mon désire (Serving you is my desire)


Morten

On Wed, Apr 9, 2014 at 2:09 AM, D. Cenk Erdil dcerdil@gmail.com wrote:

Hello,

We have upgraded several DHIS instances from earlier versions (2.0.X 2.4, and 2.7) to 2.13/2.14 recently.

Some of the new instances are not letting our users create new data elements with “an error occurred” message on the front-end.

Catalina output is attached from one instance.

Basically, when you click on “Data Elements” and then “Add New” to enter a name and click on create button, you get a series of errors triggered on the backend.

Each DHIS restart increases the ID that’s causing the error (i.e., 2045 to 2046 to 2047)

Based on my understanding, it seems to be a hibernate-related caching issue, but I could not manage to get it to resolve.

Any help is appreciated.


-Cenk.


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

Hi Cenk,

could it be that you have set the hibernate_sequence manually in your database, more specifically decreased it ? DHIS 2/hibernate will pop the next value from the sequence, assume its unique and use as primary key.

If this is the case, the fix is to bump the sequence higher than the highest primary key acrosd all tables with setval().

cheers

Lars

···

2014-04-09 5:20 GMT+01:00 Morten Olav Hansen mortenoh@gmail.com:

Hi,

Are you using postgres or mysql ?

  • ERROR 2014-04-08 18:40:57,093 ERROR: duplicate key value violates unique constraint “dataelement_pkey”

Detail: Key (dataelementid)=(2045) already exists. (SqlExceptionHelper.java [http-bio-80-exec-1])


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


Riddy NDOMA
Software Developer
Skype: riddyndoma, G+: riddyndoma, FB: riddy ndoma

Twitter: riddyndoma, LinkedIn: riddy ndoma
Blog: http://riddyndoma.blogspot.com/

Vous servir est mon désire (Serving you is my desire)


Morten

On Wed, Apr 9, 2014 at 2:09 AM, D. Cenk Erdil dcerdil@gmail.com wrote:

Hello,

We have upgraded several DHIS instances from earlier versions (2.0.X 2.4, and 2.7) to 2.13/2.14 recently.

Some of the new instances are not letting our users create new data elements with “an error occurred” message on the front-end.

Catalina output is attached from one instance.

Basically, when you click on “Data Elements” and then “Add New” to enter a name and click on create button, you get a series of errors triggered on the backend.

Each DHIS restart increases the ID that’s causing the error (i.e., 2045 to 2046 to 2047)

Based on my understanding, it seems to be a hibernate-related caching issue, but I could not manage to get it to resolve.

Any help is appreciated.


-Cenk.


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