Unable to create indicators

I’m experiencing some issues with a database: When I try to create a new indicator and click on either Edit numerator or Edit denominator, no Data Elements show up in the pop-up window.

The log seems to indicate an issue with Categorycombos - but how to find out what the issue might be?

  • ERROR 15:33:43,426 Error while executing action (ExceptionInterceptor.java [25299772@qtp-24670213-4])

java.lang.ArrayIndexOutOfBoundsException: 0

at org.hisp.dhis.common.CombinationGenerator.getCurrent(CombinationGenerator.java:123)

It seems I’m also unable to generate all the Resource Tables, getting this message:

at java.lang.Thread.run(Thread.java:662)

  • ERROR 2013-07-18 09:46:35,687 Error while executing action (ExceptionInterceptor.java [“http-bio-80”-exec-160])

org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [org.hisp.dhis.dataelement.DataElementCategoryOptionCombo#1540]

at org.hibernate.internal.SessionFactoryImpl$1$1.handleEntityNotFound(SessionFactoryImpl.java:244)

···

On Thu, Jul 18, 2013 at 3:38 PM, Knut Staring knutst@gmail.com wrote:

I’m experiencing some issues with a database: When I try to create a new indicator and click on either Edit numerator or Edit denominator, no Data Elements show up in the pop-up window.

The log seems to indicate an issue with Categorycombos - but how to find out what the issue might be?

  • ERROR 15:33:43,426 Error while executing action (ExceptionInterceptor.java [25299772@qtp-24670213-4])

java.lang.ArrayIndexOutOfBoundsException: 0

at org.hisp.dhis.common.CombinationGenerator.getCurrent(CombinationGenerator.java:123)


Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org

Run SQL queries in attached file to check integrity of the category model. Look for category options without any categories. Let us know so we can make the code robust against these kind of anomalies.

Lars

integrity.sql (1.18 KB)

···

On Thu, Jul 18, 2013 at 3:38 PM, Knut Staring knutst@gmail.com wrote:

I’m experiencing some issues with a database: When I try to create a new indicator and click on either Edit numerator or Edit denominator, no Data Elements show up in the pop-up window.

The log seems to indicate an issue with Categorycombos - but how to find out what the issue might be?

  • ERROR 15:33:43,426 Error while executing action (ExceptionInterceptor.java [25299772@qtp-24670213-4])

java.lang.ArrayIndexOutOfBoundsException: 0

at org.hisp.dhis.common.CombinationGenerator.getCurrent(CombinationGenerator.java:123)


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.

The results show there are:

22 category options without category option combos

16 catetegory options without categories

1 category without category options

and

5 categories without category combos (not an error but could be removed)

I started by trying to delete the one category without category options, but that also produced an error:

ERROR 16:04:13,935 Error while executing action (ExceptionInterceptor.java [32181168@qtp-6718343-4])

org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [fk_categorycombo_categoryid]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement

at org.springframework.orm.hibernate4.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:138)
···

On Thu, Jul 18, 2013 at 3:52 PM, Lars Helge Øverland larshelge@gmail.com wrote:

Run SQL queries in attached file to check integrity of the category model. Look for category options without any categories. Let us know so we can make the code robust against these kind of anomalies.

Lars


Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org

On Thu, Jul 18, 2013 at 3:38 PM, Knut Staring knutst@gmail.com wrote:

I’m experiencing some issues with a database: When I try to create a new indicator and click on either Edit numerator or Edit denominator, no Data Elements show up in the pop-up window.

The log seems to indicate an issue with Categorycombos - but how to find out what the issue might be?

  • ERROR 15:33:43,426 Error while executing action (ExceptionInterceptor.java [25299772@qtp-24670213-4])

java.lang.ArrayIndexOutOfBoundsException: 0

at org.hisp.dhis.common.CombinationGenerator.getCurrent(CombinationGenerator.java:123)


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, so I have identified the issue:

I just added an option to the one empty category, and then I was able to generate the resource tables. So now I can also create indicators.

But some issues remain:

  1. We should tolerate empty categories

  2. We should be able to delete empty categories

  3. It would be nice to get a message that tells you you have to generate the resource tables when things dont work.

···

On Thu, Jul 18, 2013 at 4:04 PM, Knut Staring knutst@gmail.com wrote:

Thanks.

The results show there are:

22 category options without category option combos

16 catetegory options without categories

1 category without category options

and

5 categories without category combos (not an error but could be removed)

I started by trying to delete the one category without category options, but that also produced an error:

ERROR 16:04:13,935 Error while executing action (ExceptionInterceptor.java [32181168@qtp-6718343-4])

org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [fk_categorycombo_categoryid]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement

at org.springframework.orm.hibernate4.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:138)


Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org

On Thu, Jul 18, 2013 at 3:52 PM, Lars Helge Øverland larshelge@gmail.com wrote:

Run SQL queries in attached file to check integrity of the category model. Look for category options without any categories. Let us know so we can make the code robust against these kind of anomalies.

Lars


Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org

On Thu, Jul 18, 2013 at 3:38 PM, Knut Staring knutst@gmail.com wrote:

I’m experiencing some issues with a database: When I try to create a new indicator and click on either Edit numerator or Edit denominator, no Data Elements show up in the pop-up window.

The log seems to indicate an issue with Categorycombos - but how to find out what the issue might be?

  • ERROR 15:33:43,426 Error while executing action (ExceptionInterceptor.java [25299772@qtp-24670213-4])

java.lang.ArrayIndexOutOfBoundsException: 0

at org.hisp.dhis.common.CombinationGenerator.getCurrent(CombinationGenerator.java:123)


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 will fix 1). https://bugs.launchpad.net/dhis2/+bug/1202714

  1. is not really possible to do through the user interface and is a result of manual database operations.
···

On Thu, Jul 18, 2013 at 4:19 PM, Knut Staring knutst@gmail.com wrote:

Ok, so I have identified the issue:

I just added an option to the one empty category, and then I was able to generate the resource tables. So now I can also create indicators.

But some issues remain:

  1. We should tolerate empty categories
  1. We should be able to delete empty categories
  1. It would be nice to get a message that tells you you have to generate the resource tables when things dont work.

On Thu, Jul 18, 2013 at 4:04 PM, Knut Staring knutst@gmail.com wrote:

Thanks.

The results show there are:

22 category options without category option combos

16 catetegory options without categories

1 category without category options

and

5 categories without category combos (not an error but could be removed)

I started by trying to delete the one category without category options, but that also produced an error:

ERROR 16:04:13,935 Error while executing action (ExceptionInterceptor.java [32181168@qtp-6718343-4])

org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [fk_categorycombo_categoryid]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement

at org.springframework.orm.hibernate4.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:138)


Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org

On Thu, Jul 18, 2013 at 3:52 PM, Lars Helge Øverland larshelge@gmail.com wrote:

Run SQL queries in attached file to check integrity of the category model. Look for category options without any categories. Let us know so we can make the code robust against these kind of anomalies.

Lars


Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org

On Thu, Jul 18, 2013 at 3:38 PM, Knut Staring knutst@gmail.com wrote:

I’m experiencing some issues with a database: When I try to create a new indicator and click on either Edit numerator or Edit denominator, no Data Elements show up in the pop-up window.

The log seems to indicate an issue with Categorycombos - but how to find out what the issue might be?

  • ERROR 15:33:43,426 Error while executing action (ExceptionInterceptor.java [25299772@qtp-24670213-4])

java.lang.ArrayIndexOutOfBoundsException: 0

at org.hisp.dhis.common.CombinationGenerator.getCurrent(CombinationGenerator.java:123)


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