dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #05792
Re: DHIS2.0.4: import errors referring to DataElementCategoryOption?
hi,
the problem is solved...!
Note: The name of a dataelementcategoryoption is an identifier for
importing.
On Wed, May 5, 2010 at 10:49 AM, Kim-Anh Vo <catakim@xxxxxxxxx> wrote:
> Hi,
>
> Can't run import for datavalue due to duplication of
> DataElementCategoryOption... but checked out the equivalent table - it seems
> fine...
> *
> See the logs:*
> *
> * INFO 10:12:34,832 Internal process started
> (AbstractStatementInternalProcess.java [Thread-15])
> * INFO 10:12:43,949 Imported DataElementCategoryOptions
> (DefaultImportObjectManager.java [Thread-15])
> * INFO 10:12:50,396 Imported DataElementCategories
> (DefaultImportObjectManager.java [Thread-15])
> * INFO 10:12:59,588 Imported DataElementCategoryCombos
> (DefaultImportObjectManager.java [Thread-15])
> * ERROR 10:13:14,721 Internal process failed
> (AbstractStatementInternalProcess.java [Thread-15])
> org.hibernate.HibernateException: More than one row with the given
> identifier was found: 10878, for class:
> org.hisp.dhis.dataelement.DataElementCategoryOption
> at
> org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityL
> oader.java:69)
> at
> org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityL
> oader.java:42)
> at
> org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractE
> ntityPersister.java:3049)
> at
> org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(D
> efaultLoadEventListener.java:399)
> at
> org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEv
> entListener.java:375)
> at
> org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEven
> tListener.java:139)
> at
> org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultL
> oadEventListener.java:195)
> at
> org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEv
> entListener.java:103)
> at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
> at org.hibernate.impl.SessionImpl.get(SessionImpl.java:815)
> at org.hibernate.impl.SessionImpl.get(SessionImpl.java:808)
> at
> org.hisp.dhis.hibernate.HibernateGenericStore.get(HibernateGenericSto
> re.java:162)
> at
> org.hisp.dhis.dataelement.DefaultDataElementCategoryService.getDataEl
> ementCategoryOption(DefaultDataElementCategoryService.java:168)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti
> on(AopUtils.java:307)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo
> inpoint(ReflectiveMethodInvocation.java:182)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> ReflectiveMethodInvocation.java:149)
> at
> org.springframework.transaction.interceptor.TransactionInterceptor.in
> voke(TransactionInterceptor.java:106)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> ReflectiveMethodInvocation.java:171)
> at
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invok
> e(ExposeInvocationInterceptor.java:89)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> ReflectiveMethodInvocation.java:171)
> at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
> cAopProxy.java:204)
> at $Proxy17.getDataElementCategoryOption(Unknown Source)
> at
> org.hisp.dhis.importexport.service.DefaultImportObjectManager.importC
> ategoryOptionCombos(DefaultImportObjectManager.java:342)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti
> on(AopUtils.java:307)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo
> inpoint(ReflectiveMethodInvocation.java:182)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> ReflectiveMethodInvocation.java:149)
> at
> org.springframework.transaction.interceptor.TransactionInterceptor.in
> voke(TransactionInterceptor.java:106)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> ReflectiveMethodInvocation.java:171)
> at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
> cAopProxy.java:204)
> at $Proxy45.importCategoryOptionCombos(Unknown Source)
> at
> org.hisp.dhis.importexport.service.DefaultImportObjectService.importA
> ll(DefaultImportObjectService.java:637)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti
> on(AopUtils.java:307)
> at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
> cAopProxy.java:198)
> at $Proxy46.importAll(Unknown Source)
> at
> org.hisp.dhis.importexport.ImportPreviewInternalProcess.executeStatem
> ents(ImportPreviewInternalProcess.java:69)
> at
> org.hisp.dhis.system.process.AbstractStatementInternalProcess.execute
> (AbstractStatementInternalProcess.java:92)
> at
> org.hisp.dhis.system.process.AbstractStatementInternalProcess.execute
> (AbstractStatementInternalProcess.java:40)
> at
> org.amplecode.cave.process.ProcessExecutor.run(ProcessExecutor.java:1
> 25)
> at java.lang.Thread.run(Thread.java:619)
> * ERROR 10:13:14,886 org.hibernate.HibernateException: More than one row
> with th
> e given identifier was found: 10878, for class:
> org.hisp.dhis.dataelement.DataEl
> ementCategoryOption
> at
> org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityL
> oader.java:69)
> at
> org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityL
> oader.java:42)
> at
> org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractE
> ntityPersister.java:3049)
> at
> org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(D
> efaultLoadEventListener.java:399)
> at
> org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEv
> entListener.java:375)
> at
> org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEven
> tListener.java:139)
> at
> org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultL
> oadEventListener.java:195)
> at
> org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEv
> entListener.java:103)
> at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
> at org.hibernate.impl.SessionImpl.get(SessionImpl.java:815)
> at org.hibernate.impl.SessionImpl.get(SessionImpl.java:808)
> at
> org.hisp.dhis.hibernate.HibernateGenericStore.get(HibernateGenericSto
> re.java:162)
> at
> org.hisp.dhis.dataelement.DefaultDataElementCategoryService.getDataEl
> ementCategoryOption(DefaultDataElementCategoryService.java:168)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti
> on(AopUtils.java:307)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo
> inpoint(ReflectiveMethodInvocation.java:182)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> ReflectiveMethodInvocation.java:149)
> at
> org.springframework.transaction.interceptor.TransactionInterceptor.in
> voke(TransactionInterceptor.java:106)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> ReflectiveMethodInvocation.java:171)
> at
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invok
> e(ExposeInvocationInterceptor.java:89)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> ReflectiveMethodInvocation.java:171)
> at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
> cAopProxy.java:204)
> at $Proxy17.getDataElementCategoryOption(Unknown Source)
> at
> org.hisp.dhis.importexport.service.DefaultImportObjectManager.importC
> ategoryOptionCombos(DefaultImportObjectManager.java:342)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti
> on(AopUtils.java:307)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo
> inpoint(ReflectiveMethodInvocation.java:182)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> ReflectiveMethodInvocation.java:149)
> at
> org.springframework.transaction.interceptor.TransactionInterceptor.in
> voke(TransactionInterceptor.java:106)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> ReflectiveMethodInvocation.java:171)
> at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
> cAopProxy.java:204)
> at $Proxy45.importCategoryOptionCombos(Unknown Source)
> at
> org.hisp.dhis.importexport.service.DefaultImportObjectService.importA
> ll(DefaultImportObjectService.java:637)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti
> on(AopUtils.java:307)
> at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
> cAopProxy.java:198)
> at $Proxy46.importAll(Unknown Source)
> at
> org.hisp.dhis.importexport.ImportPreviewInternalProcess.executeStatem
> ents(ImportPreviewInternalProcess.java:69)
> at
> org.hisp.dhis.system.process.AbstractStatementInternalProcess.execute
> (AbstractStatementInternalProcess.java:92)
> at
> org.hisp.dhis.system.process.AbstractStatementInternalProcess.execute
> (AbstractStatementInternalProcess.java:40)
> at
> org.amplecode.cave.process.ProcessExecutor.run(ProcessExecutor.java:1
> 25)
> at java.lang.Thread.run(Thread.java:619)
> (AbstractStatementInternalProcess.java [Thread-15])
> org.hibernate.HibernateException: More than one row with the given
> identifier wa
> s found: 10878, for class:
> org.hisp.dhis.dataelement.DataElementCategoryOption
> at
> org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityL
> oader.java:69)
> at
> org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityL
> oader.java:42)
> at
> org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractE
> ntityPersister.java:3049)
> at
> org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(D
> efaultLoadEventListener.java:399)
> at
> org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEv
> entListener.java:375)
> at
> org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEven
> tListener.java:139)
> at
> org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultL
> oadEventListener.java:195)
> at
> org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEv
> entListener.java:103)
> at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
> at org.hibernate.impl.SessionImpl.get(SessionImpl.java:815)
> at org.hibernate.impl.SessionImpl.get(SessionImpl.java:808)
> at
> org.hisp.dhis.hibernate.HibernateGenericStore.get(HibernateGenericSto
> re.java:162)
> at
> org.hisp.dhis.dataelement.DefaultDataElementCategoryService.getDataEl
> ementCategoryOption(DefaultDataElementCategoryService.java:168)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti
> on(AopUtils.java:307)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo
> inpoint(ReflectiveMethodInvocation.java:182)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> ReflectiveMethodInvocation.java:149)
> at
> org.springframework.transaction.interceptor.TransactionInterceptor.in
> voke(TransactionInterceptor.java:106)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> ReflectiveMethodInvocation.java:171)
> at
> org.springframework.aop.interceptor.ExposeInvocationInterceptor.invok
> e(ExposeInvocationInterceptor.java:89)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> ReflectiveMethodInvocation.java:171)
> at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
> cAopProxy.java:204)
> at $Proxy17.getDataElementCategoryOption(Unknown Source)
> at
> org.hisp.dhis.importexport.service.DefaultImportObjectManager.importC
> ategoryOptionCombos(DefaultImportObjectManager.java:342)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti
> on(AopUtils.java:307)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo
> inpoint(ReflectiveMethodInvocation.java:182)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> ReflectiveMethodInvocation.java:149)
> at
> org.springframework.transaction.interceptor.TransactionInterceptor.in
> voke(TransactionInterceptor.java:106)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
> ReflectiveMethodInvocation.java:171)
> at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
> cAopProxy.java:204)
> at $Proxy45.importCategoryOptionCombos(Unknown Source)
> at
> org.hisp.dhis.importexport.service.DefaultImportObjectService.importA
> ll(DefaultImportObjectService.java:637)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> sorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti
> on(AopUtils.java:307)
> at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
> cAopProxy.java:198)
> at $Proxy46.importAll(Unknown Source)
> at
> org.hisp.dhis.importexport.ImportPreviewInternalProcess.executeStatem
> ents(ImportPreviewInternalProcess.java:69)
> at
> org.hisp.dhis.system.process.AbstractStatementInternalProcess.execute
> (AbstractStatementInternalProcess.java:92)
> at
> org.hisp.dhis.system.process.AbstractStatementInternalProcess.execute
> (AbstractStatementInternalProcess.java:40)
> at
> org.amplecode.cave.process.ProcessExecutor.run(ProcessExecutor.java:1
> 25)
> at java.lang.Thread.run(Thread.java:619)*
>
>
> Because of not knowing the association/relations relating between
> dataelement, dataelementCategoryOption, and , etc.... CAN anyone help?
> The database_backup and expected datavalues with import file (exported by
> DHIS2.0.4) are attached!
>
>
> --
> --
> Best regards,
> Kim-Anh Vo
>
> +84.906612246
> kavo@xxxxxxxxxx
> Coordinator of HISP(hisp.info) in Vietnam
> Master of Information Systems
> at the University of Oslo
> ------------------------------------
> join facebook at www.facebook.com join LinkedIn at www.linkedin.com
>
--
--
Best regards,
Kim-Anh Vo
+84.906612246
kavo@xxxxxxxxxx
Coordinator of HISP(hisp.info) in Vietnam
Master of Information Systems
at the University of Oslo
------------------------------------
join facebook at www.facebook.com join LinkedIn at www.linkedin.com
References