← Back to team overview

dhis2-users team mailing list archive

NULL error when trying to set Min-Max values (extra fields in db table)

 

Using 2.11 with a recent Chrome:

Manually setting Min-Max values for a particular data element/catcombo
field in the data entry seems to work fine in the online demo. It also
works fine in my local installation which uses the demo db - but on the
machines of many of my colleagues the values are not saved (the fields
become red instead of green).

There seems to be a problem with my minmaxdataelement table - it contains
*both*
minvalue, maxvalue *and* minimumvalue, maximumvalue

I suppose there is some SQL that should be run to fix this?

The log says the following:

 ERROR 12:51:54,297 Error while executing action (ExceptionInterceptor.java
[9426007@qtp-30488988-48])
org.springframework.dao.DataIntegrityViolationException: ERROR: null value
in column "minvalue" violates not-null constraint
  Detail: Failing row contains (1921, 371, 44, 15, null, null, f, 10, 20).;
SQL [n/a]; constraint [minvalue]; nested exception is
org.hibernate.exception.ConstraintViolationException: ERROR: null value in
column "minvalue" violates not-null constraint
  Detail: Failing row contains (1921, 371, 44, 15, null, null, f, 10, 20).
at
org.springframework.orm.hibernate4.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:138)
 at
org.springframework.orm.hibernate4.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:594)
at
org.springframework.orm.hibernate4.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:476)
 at
org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:755)
at
org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:724)
 at
org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:387)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120)
 at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
 at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
 at com.sun.proxy.$Proxy59.addMinMaxDataElement(Unknown Source)
at
org.hisp.dhis.de.action.SaveMinMaxLimitsAction.execute(SaveMinMaxLimitsAction.java:153)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)

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

Follow ups