Error Adding Data Elements

Hi all,

We have an odd one:

When trying to add a new Data Element, dhis 2.18 throws an exception in the UI (“sorry, the system failed to…”) and the logs show a “null value in column ‘active’” (Data Integrity Exception Violation) error.

I get the meaning – for some reason the new DE doesn’t have a value for ‘active’, which obviously cannot be null. But what would cause this, and more importantly, how do I fix it?

Kind Regards,

Jason Phillips

hisp

Software & Information Systems**
Health Information Systems Program**-------------------------------------------------------------

eMail:

jason@hisp.org

Landline:

+27 21 712 0170

Mobile:

+27 72 973 7250

Skype:

jason.n.phillips

This message and any attachments are subject to a disclaimer published at http://www.hisp.org/policies.html#comms_disclaimer. Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission.
If you cannot access the disclaimer, kindly send an email to disclaimer@hisp.org and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer.

Hi

The active column was removed from 2.18, so maybe there was an upgrade job that didn’t work? could you try and remove that column? it shouldn’t need to be there anymore

image

···

On Thu, Feb 5, 2015 at 1:46 PM, Jason Phillips jason@hisp.org wrote:

Hi all,

We have an odd one:

When trying to add a new Data Element, dhis 2.18 throws an exception in the UI (“sorry, the system failed to…”) and the logs show a “null value in column ‘active’” (Data Integrity Exception Violation) error.

I get the meaning – for some reason the new DE doesn’t have a value for ‘active’, which obviously cannot be null. But what would cause this, and more importantly, how do I fix it?

Kind Regards,

Jason Phillips

Software & Information Systems**
Health Information Systems Program**-------------------------------------------------------------

eMail:

jason@hisp.org

Landline:

+27 21 712 0170

Mobile:

+27 72 973 7250

Skype:

jason.n.phillips

This message and any attachments are subject to a disclaimer published at http://www.hisp.org/policies.html#comms_disclaimer. Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission.
If you cannot access the disclaimer, kindly send an email to disclaimer@hisp.org and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer.


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


Morten

I might have been a bit quick there, I see no active in 2.17 either. Do you have a column named active for data-element table?

image

···

On Thu, Feb 5, 2015 at 1:55 PM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi

The active column was removed from 2.18, so maybe there was an upgrade job that didn’t work? could you try and remove that column? it shouldn’t need to be there anymore


Morten


Morten

On Thu, Feb 5, 2015 at 1:46 PM, Jason Phillips jason@hisp.org wrote:

Hi all,

We have an odd one:

When trying to add a new Data Element, dhis 2.18 throws an exception in the UI (“sorry, the system failed to…”) and the logs show a “null value in column ‘active’” (Data Integrity Exception Violation) error.

I get the meaning – for some reason the new DE doesn’t have a value for ‘active’, which obviously cannot be null. But what would cause this, and more importantly, how do I fix it?

Kind Regards,

Jason Phillips

Software & Information Systems**
Health Information Systems Program**-------------------------------------------------------------

eMail:

jason@hisp.org

Landline:

+27 21 712 0170

Mobile:

+27 72 973 7250

Skype:

jason.n.phillips

This message and any attachments are subject to a disclaimer published at http://www.hisp.org/policies.html#comms_disclaimer. Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission.
If you cannot access the disclaimer, kindly send an email to disclaimer@hisp.org and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer.


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 all,

Some more detail on the issue:

The instance in question is using 2.18 Build 18121 running on top of PostgreSQL 9.4. There is no issue EDITING DE’s, and no other issues that I am aware of at the moment.

The system stays up and continues to process requests thereafter.

Excerpt of the log:

Caused by: org.postgresql.util.PSQLException: ERROR: null value in column “active” violates not-null constraint

Detail: Failing row contains (2917, k4pyjcqlU12, null, 2015-02-05 08:39:24.971, 2015-02-05 08:39:24.984, Complaint an$

    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)

    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927)

    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)

    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561)

    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:419)

    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:365)

    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)

    at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:133)

Kind regards,

Jason.

image

···

From: Dhis2-users [mailto:dhis2-users-bounces+jason=hisp.org@lists.launchpad.net] On Behalf Of Jason Phillips
Sent: 05 February 2015 08:47 AM
To: ‘DHIS 2 Users List’
Subject: [Dhis2-users] Error Adding Data Elements

Hi all,

We have an odd one:

When trying to add a new Data Element, dhis 2.18 throws an exception in the UI (“sorry, the system failed to…”) and the logs show a “null value in column ‘active’” (Data Integrity Exception Violation) error.

I get the meaning – for some reason the new DE doesn’t have a value for ‘active’, which obviously cannot be null. But what would cause this, and more importantly, how do I fix it?

Kind Regards,

Jason Phillips

hisp

Software & Information Systems**
Health Information Systems Program**-------------------------------------------------------------

eMail:

jason@hisp.org

Landline:

+27 21 712 0170

Mobile:

+27 72 973 7250

Skype:

jason.n.phillips

This message and any attachments are subject to a disclaimer published at http://www.hisp.org/policies.html#comms_disclaimer. Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission.
If you cannot access the disclaimer, kindly send an email to disclaimer@hisp.org and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer.

Hi Morten,

Yup - active there. I am assuming it should not be; I knew “active” was removed from OrgUnits, and assume it was also removed from other tables…?

Many thanks!

Jason

image

···

From: Morten Olav Hansen [mailto:mortenoh@gmail.com]
Sent: 05 February 2015 08:58 AM
To: Jason Phillips
Cc: DHIS 2 Users List
Subject: Re: [Dhis2-users] Error Adding Data Elements

I might have been a bit quick there, I see no active in 2.17 either. Do you have a column named active for data-element table?


Morten

On Thu, Feb 5, 2015 at 1:55 PM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi

The active column was removed from 2.18, so maybe there was an upgrade job that didn’t work? could you try and remove that column? it shouldn’t need to be there anymore


Morten

On Thu, Feb 5, 2015 at 1:46 PM, Jason Phillips jason@hisp.org wrote:

Hi all,

We have an odd one:

When trying to add a new Data Element, dhis 2.18 throws an exception in the UI (“sorry, the system failed to…”) and the logs show a “null value in column ‘active’” (Data Integrity Exception Violation) error.

I get the meaning – for some reason the new DE doesn’t have a value for ‘active’, which obviously cannot be null. But what would cause this, and more importantly, how do I fix it?

Kind Regards,

Jason Phillips

hisp

Software & Information Systems**
Health Information Systems Program**-------------------------------------------------------------

eMail:

jason@hisp.org

Landline:

+27 21 712 0170

Mobile:

+27 72 973 7250

Skype:

jason.n.phillips

This message and any attachments are subject to a disclaimer published at http://www.hisp.org/policies.html#comms_disclaimer. Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission.
If you cannot access the disclaimer, kindly send an email to disclaimer@hisp.org and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer.


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 Morten,

Just verified in a copy: a DROP CASCADE of the field solved the issue.

Thanks again!

Kind regards,

Jason.

image

···

From: Dhis2-users [mailto:dhis2-users-bounces+jason=hisp.org@lists.launchpad.net] On Behalf Of Jason Phillips
Sent: 05 February 2015 09:22 AM
To: ‘Morten Olav Hansen’
Cc: ‘DHIS 2 Users List’
Subject: Re: [Dhis2-users] Error Adding Data Elements

Hi Morten,

Yup - active there. I am assuming it should not be; I knew “active” was removed from OrgUnits, and assume it was also removed from other tables…?

Many thanks!

Jason

From: Morten Olav Hansen [mailto:mortenoh@gmail.com]
Sent: 05 February 2015 08:58 AM
To: Jason Phillips
Cc: DHIS 2 Users List
Subject: Re: [Dhis2-users] Error Adding Data Elements

I might have been a bit quick there, I see no active in 2.17 either. Do you have a column named active for data-element table?


Morten

On Thu, Feb 5, 2015 at 1:55 PM, Morten Olav Hansen mortenoh@gmail.com wrote:

Hi

The active column was removed from 2.18, so maybe there was an upgrade job that didn’t work? could you try and remove that column? it shouldn’t need to be there anymore


Morten

On Thu, Feb 5, 2015 at 1:46 PM, Jason Phillips jason@hisp.org wrote:

Hi all,

We have an odd one:

When trying to add a new Data Element, dhis 2.18 throws an exception in the UI (“sorry, the system failed to…”) and the logs show a “null value in column ‘active’” (Data Integrity Exception Violation) error.

I get the meaning – for some reason the new DE doesn’t have a value for ‘active’, which obviously cannot be null. But what would cause this, and more importantly, how do I fix it?

Kind Regards,

Jason Phillips

hisp

Software & Information Systems**
Health Information Systems Program**-------------------------------------------------------------

eMail:

jason@hisp.org

Landline:

+27 21 712 0170

Mobile:

+27 72 973 7250

Skype:

jason.n.phillips

This message and any attachments are subject to a disclaimer published at http://www.hisp.org/policies.html#comms_disclaimer. Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission.
If you cannot access the disclaimer, kindly send an email to disclaimer@hisp.org and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer.


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

Ok, great. :slight_smile: Yes, I see it was removed from 2.16, 2.17 and 2.18 at least. Not sure when it happened (it could have been backported), but probably at the same time as orgUnits active field was removed.

image

···

On Thu, Feb 5, 2015 at 2:10 PM, Jason Phillips jason@hisp.org wrote:

Hi all,

Some more detail on the issue:

The instance in question is using 2.18 Build 18121 running on top of PostgreSQL 9.4. There is no issue EDITING DE’s, and no other issues that I am aware of at the moment.

The system stays up and continues to process requests thereafter.

Excerpt of the log:

Caused by: org.postgresql.util.PSQLException: ERROR: null value in column “active” violates not-null constraint

Detail: Failing row contains (2917, k4pyjcqlU12, null, 2015-02-05 08:39:24.971, 2015-02-05 08:39:24.984, Complaint an$

    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:419)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:365)
    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
    at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:133)

Kind regards,

Jason.

From: Dhis2-users [mailto:dhis2-users-bounces+jason=hisp.org@lists.launchpad.net] On Behalf Of Jason Phillips
Sent: 05 February 2015 08:47 AM
To: ‘DHIS 2 Users List’
Subject: [Dhis2-users] Error Adding Data Elements

Hi all,

We have an odd one:

When trying to add a new Data Element, dhis 2.18 throws an exception in the UI (“sorry, the system failed to…”) and the logs show a “null value in column ‘active’” (Data Integrity Exception Violation) error.

I get the meaning – for some reason the new DE doesn’t have a value for ‘active’, which obviously cannot be null. But what would cause this, and more importantly, how do I fix it?

Kind Regards,

Jason Phillips

Software & Information Systems**
Health Information Systems Program**-------------------------------------------------------------

eMail:

jason@hisp.org

Landline:

+27 21 712 0170

Mobile:

+27 72 973 7250

Skype:

jason.n.phillips

This message and any attachments are subject to a disclaimer published at http://www.hisp.org/policies.html#comms_disclaimer. Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission.
If you cannot access the disclaimer, kindly send an email to disclaimer@hisp.org and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer.


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


Morten