← Back to team overview

dhis2-devs team mailing list archive

Re: Analytics error

 

Hm this one I am not sure about. It says:



On Tue, Nov 26, 2013 at 5:06 PM, Bharath <chbharathk@xxxxxxxxx> wrote:

> Hi, when we are running getting the below exception, can you plz help
>
> DataBase: MYSQL
>
> DHIS version: 2.13
>
> insert into analytics_temp_2013 (RRzlD3voz84,NpequZ9BYNW,
> PbWDjOt5Zav,YbQ9R6qGpFM,HBR9gw7Q6MX,o9rIsKtcvPT,f1Qyuns5mjJ,OqP9wmDkyxK,
> uidlevel1,uidlevel2,uidlevel3,uidlevel4,uidlevel5,daily,
> weekly,forteen,monthly,bimonthly,quarterly,sixmonthly,yearly,
> financialapril,financialjuly,financialoct,de,co,level,daysxvalue, daysno,
> value) select degs.RRzlD3voz84,ougs.NpequZ9BYNW,ougs.PbWDjOt5Zav,
> ougs.YbQ9R6qGpFM,ougs.HBR9gw7Q6MX,ougs.o9rIsKtcvPT,ougs.f1Qyuns5mjJ,ougs.
> OqP9wmDkyxK,ous.uidlevel1,ous.uidlevel2,ous.uidlevel3,ous.
> uidlevel4,ous.uidlevel5,ps.daily,ps.weekly,ps.forteen,ps.
> monthly,ps.bimonthly,ps.quarterly,ps.sixmonthly,ps.
> yearly,ps.financialapril,ps.financialjuly,ps.financialoct,
> de.uid,co.uid,ous.level,cast(dv.value as decimal(26,1)) * ps.daysno as
> daysxvalue, ps.daysno as daysno, cast(dv.value as decimal(26,1)) as value
> from datavalue dv left join _dataelementgroupsetstructure degs on
> dv.dataelementid=degs.dataelementid left join _
> organisationunitgroupsetstructure ougs on dv.sourceid=ougs.organisationunitid
> left join _categorystructure cs on dv.categoryoptioncomboid=cs.categoryoptioncomboid
> left join _orgunitstructure ous on dv.sourceid=ous.organisationunitid
> left join _periodstructure ps on dv.periodid=ps.periodid left join
> dataelement de on dv.dataelementid=de.dataelementid left join
> categoryoptioncombo co on dv.categoryoptioncomboid=co.categoryoptioncomboid
> left join period pe on dv.periodid=pe.periodid where de.valuetype = 'int'
> and de.domaintype = 'aggregate' and pe.startdate >= '2013-01-01' and
> pe.startdate <= '2013-12-31' and dv.value is not null and dv.value regexp
> '^(-?[0-9]+)(\.[0-9]+)?(E\d+)?$' and ( dv.value != '0' or
> de.aggregationtype = 'average' or de.zeroissignificant = true )
> (JdbcAnalyticsTableManager.java [SimpleAsyncTaskExecutor-1])
> * INFO  2013-11-26 06:11:35,501 [Level: ERROR, category: DATAMART, time:
> Tue Nov 26 06:11:35 GMT-05:00 2013, message: Process failed: Exception
> during execution] (InMemoryNotifier.java [taskScheduler-1])
> * WARN  2013-11-26 06:11:35,517 SQL Error: 1048, SQLState: 23000
> (SqlExceptionHelper.java [taskScheduler-1])
> * ERROR 2013-11-26 06:11:35,519 Column 'userid' cannot be null
> (SqlExceptionHelper.java [taskScheduler-1])
> * ERROR 2013-11-26 06:11:35,521 Unexpected error occurred in scheduled
> task. (TaskUtils.java [taskScheduler-1])
> org.hibernate.exception.ConstraintViolationException: could not execute
> statement
>         at org.hibernate.exception.internal.SQLExceptionTypeDelegate.
> convert(SQLExceptionTypeDelegate.java:74)
>         at org.hibernate.exception.internal.StandardSQLExceptionConverter.
> convert(StandardSQLExceptionConverter.java:49)
>         at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(
> SqlExceptionHelper.java:125)
>         at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(
> SqlExceptionHelper.java:110)
>         at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.
> executeUpdate(ResultSetReturnImpl.java:136)
>         at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.
> executeAndExtract(IdentityGenerator.java:96)
>         at org.hibernate.id.insert.AbstractReturningDelegate.
> performInsert(AbstractReturningDelegate.java:58)
>         at org.hibernate.persister.entity.AbstractEntityPersister.insert(
> AbstractEntityPersister.java:2966)
>         at org.hibernate.persister.entity.AbstractEntityPersister.insert(
> AbstractEntityPersister.java:3477)
>         at org.hibernate.action.internal.EntityIdentityInsertAction.
> execute(EntityIdentityInsertAction.java:81)
>         at org.hibernate.engine.spi.ActionQueue.execute(
> ActionQueue.java:362)
>         at org.hibernate.engine.spi.ActionQueue.
> addResolvedEntityInsertAction(ActionQueue.java:203)
>         at org.hibernate.engine.spi.ActionQueue.addInsertAction(
> ActionQueue.java:183)
>         at org.hibernate.engine.spi.ActionQueue.addAction(
> ActionQueue.java:167)
>         at org.hibernate.event.internal.AbstractSaveEventListener.
> addInsertAction(AbstractSaveEventListener.java:321)
>         at org.hibernate.event.internal.AbstractSaveEventListener.
> performSaveOrReplicate(AbstractSaveEventListener.java:286)
>         at org.hibernate.event.internal.AbstractSaveEventListener.
> performSave(AbstractSaveEventListener.java:192)
>         at org.hibernate.event.internal.AbstractSaveEventListener.
> saveWithGeneratedId(AbstractSaveEventListener.java:125)
>         at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.
> saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:204)
>         at org.hibernate.event.internal.DefaultSaveOrUpdateEventListen
> er.entityIsTransient(DefaultSaveOrUpdateEventListener.java:189)
>         at org.hibernate.event.internal.DefaultSaveOrUpdateEventListen
> er.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:114)
>         at org.hibernate.event.internal.DefaultSaveOrUpdateEventListen
> er.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:90)
>         at org.hibernate.internal.SessionImpl.fireSaveOrUpdate(
> SessionImpl.java:734)
>         at org.hibernate.internal.SessionImpl.saveOrUpdate(
> SessionImpl.java:726)
>         at org.hibernate.engine.spi.CascadingAction$5.cascade(
> CascadingAction.java:258)
>         at org.hibernate.engine.internal.Cascade.cascadeToOne(Cascade.
> java:387)
>         at org.hibernate.engine.internal.Cascade.cascadeAssociation(
> Cascade.java:330)
>         at org.hibernate.engine.internal.Cascade.cascadeProperty(
> Cascade.java:208)
>         at org.hibernate.engine.internal.Cascade.
> cascadeCollectionElements(Cascade.java:416)
>         at org.hibernate.engine.internal.Cascade.cascadeCollection(
> Cascade.java:357)
>         at org.hibernate.engine.internal.Cascade.cascadeAssociation(
> Cascade.java:333)
>         at org.hibernate.engine.internal.Cascade.cascadeProperty(
> Cascade.java:208)
>         at org.hibernate.engine.internal.Cascade.cascade(Cascade.java:165)
>         at org.hibernate.event.internal.AbstractSaveEventListener.
> cascadeAfterSave(AbstractSaveEventListener.java:449)
>         at org.hibernate.event.internal.AbstractSaveEventListener.
> performSaveOrReplicate(AbstractSaveEventListener.java:292)
>         at org.hibernate.event.internal.AbstractSaveEventListener.
> performSave(AbstractSaveEventListener.java:192)
>         at org.hibernate.event.internal.AbstractSaveEventListener.
> saveWithGeneratedId(AbstractSaveEventListener.java:125)
>         at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.
> saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:204)
>         at org.hibernate.event.internal.DefaultSaveEventListener.
> saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:55)
>         at org.hibernate.event.internal.DefaultSaveOrUpdateEventListen
> er.entityIsTransient(DefaultSaveOrUpdateEventListener.java:189)
>         at org.hibernate.event.internal.DefaultSaveEventListener.
> performSaveOrUpdate(DefaultSaveEventListener.java:49)
>         at org.hibernate.event.internal.DefaultSaveOrUpdateEventListen
> er.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:90)
>         at org.hibernate.internal.SessionImpl.fireSave(
> SessionImpl.java:763)
>         at org.hibernate.internal.SessionImpl.save(SessionImpl.java:755)
>         at org.hibernate.internal.SessionImpl.save(SessionImpl.java:751)
>         at org.hisp.dhis.hibernate.HibernateGenericStore.save(
> HibernateGenericStore.java:269)
>         at org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectSto
> re.save(HibernateIdentifiableObjectStore.java:60)
>         at org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectSto
> re.save(HibernateIdentifiableObjectStore.java:51)
>         at org.hisp.dhis.message.DefaultMessageService.
> saveMessageConversation(DefaultMessageService.java:234)
>         at org.hisp.dhis.message.DefaultMessageService.sendMessage(
> DefaultMessageService.java:152)
>         at org.hisp.dhis.message.DefaultMessageService.sendFeedback(
> DefaultMessageService.java:163)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:57)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:606)
>         at org.springframework.aop.support.AopUtils.
> invokeJoinpointUsingReflection(AopUtils.java:317)
>         at org.springframework.aop.framework.ReflectiveMethodInvocation.
> invokeJoinpoint(ReflectiveMethodInvocation.java:183)
>         at org.springframework.aop.framework.ReflectiveMethodInvocation.
> proceed(ReflectiveMethodInvocation.java:150)
>         at org.springframework.transaction.interceptor.
> TransactionInterceptor$1.proceedWithInvocation(
> TransactionInterceptor.java:96)
>         at org.springframework.transaction.interceptor.
> TransactionAspectSupport.invokeWithinTransaction(
> TransactionAspectSupport.java:260)
>         at org.springframework.transaction.interceptor.
> TransactionInterceptor.invoke(TransactionInterceptor.java:94)
>         at org.springframework.aop.framework.ReflectiveMethodInvocation.
> proceed(ReflectiveMethodInvocation.java:172)
>         at org.springframework.aop.framework.JdkDynamicAopProxy.
> invoke(JdkDynamicAopProxy.java:204)
>         at com.sun.proxy.$Proxy66.sendFeedback(Unknown Source)
>         at org.hisp.dhis.analytics.scheduling.AnalyticsTableTask.
> run(AnalyticsTableTask.java:115)
>         at org.hisp.dhis.scheduling.ScheduledTasks.run(
> ScheduledTasks.java:60)
>         at org.springframework.scheduling.support.
> DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnabl
> e.java:53)
>         at java.util.concurrent.Executors$RunnableAdapter.
> call(Executors.java:471)
>         at java.util.concurrent.FutureTask$Sync.innerRun(
> FutureTask.java:334)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:166)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$
> ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$
> ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(
> ThreadPoolExecutor.java:1145)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:724)
> Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException:
> Column 'userid' cannot be null
>         at sun.reflect.GeneratedConstructorAccessor262.newInstance(Unknown
> Source)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
> DelegatingConstructorAccessorImpl.java:45)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
>         at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
>         at com.mysql.jdbc.Util.getInstance(Util.java:386)
>         at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1039)
>         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4096)
>         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4028)
>         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2490)
>         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2651)
>         at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2683)
>         at com.mysql.jdbc.PreparedStatement.executeInternal(
> PreparedStatement.java:2144)
>         at com.mysql.jdbc.PreparedStatement.executeUpdate(
> PreparedStatement.java:2444)
>         at com.mysql.jdbc.PreparedStatement.executeUpdate(
> PreparedStatement.java:2362)
>         at com.mysql.jdbc.PreparedStatement.executeUpdate(
> PreparedStatement.java:2347)
>         at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.
> executeUpdate(NewProxyPreparedStatement.java:105)
>         at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.
> executeUpdate(ResultSetReturnImpl.java:133)
>         ... 70 more
>
>
>
> --
>
> Regards,
> Bharath Kumar. Ch
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References