dhis2-users team mailing list archive
-
dhis2-users team
-
Mailing list archive
-
Message #03562
Re: [Dhis2-devs] DHIS Import Log?
Hi Morten,
You pointed me in the right direction. Thanks.
Taking a look at the log, it shows that there is a NULL value in surname
field when its trying to insert a record in the userinfo table. I checked
the source metadata.xml file and ensured that all surname entries have a
value. I still get the same error.
See attached log snippet.
Any thoughts on why this is persisting even in the absence of NULL values?
Edwin
On Mon, Dec 16, 2013 at 4:59 AM, Edwin Mulwa <eddiemu@xxxxxxxxx> wrote:
> Ok, thanks. Yes I am...
>
>
> On Mon, Dec 16, 2013 at 3:37 PM, Morten Olav Hansen <mortenoh@xxxxxxxxx>wrote:
>
>> I would recommend looking at logs/catalina.out (assuming you are running
>> tomcat)
>>
>> --
>> Morten
>>
>>
>> On Mon, Dec 16, 2013 at 1:31 PM, Edwin Mulwa <eddiemu@xxxxxxxxx> wrote:
>>
>>> Hi,
>>>
>>> I am importing all metadata from one instance of DHIS2 to another. The
>>> import process seems to be hanging on the Importing Users section (see
>>> attached screenshot).
>>>
>>> Is there an import log that I can check to see what is happening?
>>>
>>> Edwin
>>>
>>>
>>>
>>> _______________________________________________
>>> 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
>>>
>>>
>>
>
* INFO 2013-12-16 05:44:53,562 [Level: INFO, category: METADATA_IMPORT, time: Mon Dec 16 05:44:53 PST 2013, message: Importing 6303 Users] (InMemoryNotifier.java [taskScheduler-1])
* WARN 2013-12-16 05:44:53,969 SQL Error: 23502, SQLState: 23502 (SqlExceptionHelper.java [taskScheduler-1])
* ERROR 2013-12-16 05:44:53,969 NULL not allowed for column "SURNAME"; SQL statement:
insert into userinfo (userinfoid, uid, code, lastUpdated, created, surname, firstName, email, phoneNumber, jobTitle, introduction, gender, birthday, nationality, employer, education, interests, languages, lastCheckedInterpretations) values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [23502-173] (SqlExceptionHelper.java [taskScheduler-1])
* ERROR 2013-12-16 05:44:54,869 Unexpected error occurred in scheduled task. (TaskUtils.java [taskScheduler-1])
org.hibernate.exception.ConstraintViolationException: could not execute statement
at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:128)
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.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:55)
at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:189)
at org.hibernate.event.internal.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:49)
at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.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.HibernateIdentifiableObjectStore.save(HibernateIdentifiableObjectStore.java:60)
at org.hisp.dhis.common.hibernate.HibernateIdentifiableObjectStore.save(HibernateIdentifiableObjectStore.java:51)
at org.hisp.dhis.common.DefaultIdentifiableObjectManager.save(DefaultIdentifiableObjectManager.java:98)
at sun.reflect.GeneratedMethodAccessor364.invoke(Unknown Source)
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.$Proxy98.save(Unknown Source)
at org.hisp.dhis.dxf2.metadata.DefaultObjectBridge.saveObject(DefaultObjectBridge.java:260)
at org.hisp.dhis.dxf2.metadata.importers.DefaultIdentifiableObjectImporter.newObject(DefaultIdentifiableObjectImporter.java:432)
at org.hisp.dhis.dxf2.metadata.importers.DefaultIdentifiableObjectImporter.startImport(DefaultIdentifiableObjectImporter.java:650)
at org.hisp.dhis.dxf2.metadata.importers.DefaultIdentifiableObjectImporter.importObjectLocal(DefaultIdentifiableObjectImporter.java:605)
at org.hisp.dhis.dxf2.metadata.importers.DefaultIdentifiableObjectImporter.importObjects(DefaultIdentifiableObjectImporter.java:570)
at org.hisp.dhis.dxf2.metadata.DefaultImportService.doImport(DefaultImportService.java:233)
at org.hisp.dhis.dxf2.metadata.DefaultImportService.importMetaData(DefaultImportService.java:152)
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.$Proxy128.importMetaData(Unknown Source)
at org.hisp.dhis.importexport.action.util.ImportMetaDataTask.run(ImportMetaDataTask.java:93)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.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: org.h2.jdbc.JdbcSQLException: NULL not allowed for column "SURNAME"; SQL statement:
insert into userinfo (userinfoid, uid, code, lastUpdated, created, surname, firstName, email, phoneNumber, jobTitle, introduction, gender, birthday, nationality, employer, education, interests, languages, lastCheckedInterpretations) values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [23502-173]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:331)
at org.h2.message.DbException.get(DbException.java:171)
at org.h2.message.DbException.get(DbException.java:148)
at org.h2.table.Column.validateConvertUpdateSequence(Column.java:295)
at org.h2.table.Table.validateConvertUpdateSequence(Table.java:699)
at org.h2.command.dml.Insert.insertRows(Insert.java:123)
at org.h2.command.dml.Insert.update(Insert.java:86)
at org.h2.command.CommandContainer.update(CommandContainer.java:79)
at org.h2.command.Command.executeUpdate(Command.java:235)
at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:154)
at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:140)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:133)
... 67 more
Follow ups
References