← Back to team overview

dhis2-users team mailing list archive

Re: Fw:import error

 

still not working from 2.28 to 2.29:


* WARN  2018-04-09 15:36:37,931 HHH000437: Attempting to save one or more entities that have a non-nullable association with an unsaved transient entity. The unsaved
 transient entity must be saved in an operation prior to saving these dependent entities.
        Unsaved transient entity: ([org.hisp.dhis.attribute.Attribute#0])
        Dependent entities: ([[org.hisp.dhis.attribute.AttributeValue#72]])
        Non-nullable association(s): ([org.hisp.dhis.attribute.AttributeValue.attribute]) (UnresolvedEntityInsertActions.java [taskScheduler-4])
* ERROR 2018-04-09 15:36:37,945 Unexpected error occurred in scheduled task. (TaskUtils.java [taskScheduler-4])
org.hibernate.TransientPropertyValueException: Not-null property references a transient value - transient instance must be saved before current operation : org.hisp.
dhis.attribute.AttributeValue.attribute -> org.hisp.dhis.attribute.Attribute
        at org.hibernate.action.internal.UnresolvedEntityInsertActions.checkNoUnresolvedActionsAfterOperation(UnresolvedEntityInsertActions.java:122)
        at org.hibernate.engine.spi.ActionQueue.checkNoUnresolvedActionsAfterOperation(ActionQueue.java:421)
        at org.hibernate.internal.SessionImpl.checkNoUnresolvedActionsAfterOperation(SessionImpl.java:630)
        at org.hibernate.internal.SessionImpl.fireSave(SessionImpl.java:693)
        at org.hibernate.internal.SessionImpl.save(SessionImpl.java:683)
        at org.hibernate.internal.SessionImpl.save(SessionImpl.java:678)
        at org.hisp.dhis.dxf2.metadata.objectbundle.hooks.IdentifiableObjectBundleHook.handleAttributeValues(IdentifiableObjectBundleHook.java:97)
        at org.hisp.dhis.dxf2.metadata.objectbundle.hooks.IdentifiableObjectBundleHook.preCreate(IdentifiableObjectBundleHook.java:55)
        at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.lambda$null$179(DefaultObjectBundleService.java:239)
        at java.util.ArrayList.forEach(ArrayList.java:1249)
        at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.lambda$handleCreates$180(DefaultObjectBundleService.java:238)
        at java.util.ArrayList.forEach(ArrayList.java:1249)
        at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.handleCreates(DefaultObjectBundleService.java:238)
        at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.commit(DefaultObjectBundleService.java:180)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)





--

此致

   林晓东

莫愁前路无知己,天下谁人不识君。

At 2018-03-04 18:59:32, "gerald thomas" <gerald17006@xxxxxxxxx> wrote:

Lin,

I see no way this will working. Why not export and import to the same versions. Once everything is OK you can now upgrade to higher version. But it looks like resource issue



On Sun, Mar 4, 2018 at 8:19 AM, 林晓东 <lin_xd@xxxxxxx> wrote:

hi,sir,


   I can't import organization exported from other DHIS2 instances. DHIS2 is   from github ,version  2.8. build, fresh install.
 
    Thanks.
 got error on console: 


* ERROR 2018-03-04 14:26:09,597 Unexpected error occurred in scheduled task. (TaskUtils.java [taskSc
heduler-5])
java.lang.IllegalStateException: org.hibernate.TransientObjectException: object references an unsave
d transient instance - save the transient instance beforeQuery flushing: org.hisp.dhis.organisationu
nit.OrganisationUnit
        at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:144)
        at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:155)
        at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:162)
        at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1441)
        at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1421)
        at org.hisp.dhis.dbms.HibernateDbmsManager.clearSession(HibernateDbmsManager.java:339)
        at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.commit(DefaultObjectB
undleService.java:206)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333
)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMe
thodInvocation.java:190)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo
cation.java:157)
        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocatio
n(TransactionInterceptor.java:99)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransact
ion(TransactionAspectSupport.java:282)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInte
rceptor.java:96)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo
cation.java:179)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
        at com.sun.proxy.$Proxy242.commit(Unknown Source)
        at org.hisp.dhis.dxf2.metadata.DefaultMetadataImportService.importMetadata(DefaultMetadataIm
portService.java:127)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333
)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMe
thodInvocation.java:190)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo
cation.java:157)
        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocatio
n(TransactionInterceptor.java:99)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransact
ion(TransactionAspectSupport.java:282)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInte
rceptor.java:96)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvo
cation.java:179)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
        at com.sun.proxy.$Proxy244.importMetadata(Unknown Source)
        at org.hisp.dhis.importexport.action.util.ImportMetaDataTask.call(ImportMetaDataTask.java:99
)
        at org.hisp.dhis.security.SecurityContextRunnable.run(SecurityContextRunnable.java:57)
        at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErro
rHandlingRunnable.java:54)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Scheduled
ThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadP
oolExecutor.java:293)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.hibernate.TransientObjectException: object references an unsaved transient instance -
 save the transient instance beforeQuery flushing: org.hisp.dhis.organisationunit.OrganisationUnit
        at org.hibernate.engine.internal.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.jav
a:279)
        at org.hibernate.type.EntityType.getIdentifier(EntityType.java:462)
        at org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:298)
        at org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:309)
        at org.hibernate.type.TypeHelper.findDirty(TypeHelper.java:325)
        at org.hibernate.persister.entity.AbstractEntityPersister.findDirty(AbstractEntityPersister.
java:4208)
        at org.hibernate.event.internal.DefaultFlushEntityEventListener.dirtyCheck(DefaultFlushEntit
yEventListener.java:528)
        at org.hibernate.event.internal.DefaultFlushEntityEventListener.isUpdateNecessary(DefaultFlu
shEntityEventListener.java:215)
        at org.hibernate.event.internal.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEn
tityEventListener.java:142)
        at org.hibernate.event.internal.AbstractFlushingEventListener.flushEntities(AbstractFlushing
EventListener.java:216)
        at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(Ab
stractFlushingEventListener.java:85)
        at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.
java:38)
        at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1435)
        ... 40 more


====================


 last time  got error too:



   I import metadata from dhis28 to dhis29. got this, how?


* WARN  2018-02-24 17:49:35,077 HHH000437: Attempting to save one or more entities that have a non-nullable association with an unsaved transient entity. The unsaved transient entity must be saved in an operation prior to saving these dependent entities.
        Unsaved transient entity: ([org.hisp.dhis.attribute.Attribute#0])
        Dependent entities: ([[org.hisp.dhis.attribute.AttributeValue#85]])
        Non-nullable association(s): ([org.hisp.dhis.attribute.AttributeValue.attribute]) (UnresolvedEntityInsertActions.java [taskScheduler-11])
* ERROR 2018-02-24 17:49:35,080 Unexpected error occurred in scheduled task. (TaskUtils.java [taskScheduler-11])
org.hibernate.TransientPropertyValueException: Not-null property references a transient value - transient instance must be saved before current operation : org.hisp.dhis.attribute.AttributeValue.attribute -> org.hisp.dhis.attribute.Attribute
        at org.hibernate.action.internal.UnresolvedEntityInsertActions.checkNoUnresolvedActionsAfterOperation(UnresolvedEntityInsertActions.java:122)
        at org.hibernate.engine.spi.ActionQueue.checkNoUnresolvedActionsAfterOperation(ActionQueue.java:421)
        at org.hibernate.internal.SessionImpl.checkNoUnresolvedActionsAfterOperation(SessionImpl.java:630)
        at org.hibernate.internal.SessionImpl.fireSave(SessionImpl.java:693)
        at org.hibernate.internal.SessionImpl.save(SessionImpl.java:683)
        at org.hibernate.internal.SessionImpl.save(SessionImpl.java:678)
        at org.hisp.dhis.dxf2.metadata.objectbundle.hooks.IdentifiableObjectBundleHook.handleAttributeValues(IdentifiableObjectBundleHook.java:97)
        at org.hisp.dhis.dxf2.metadata.objectbundle.hooks.IdentifiableObjectBundleHook.preCreate(IdentifiableObjectBundleHook.java:55)
        at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.lambda$null$179(DefaultObjectBundleService.java:239)
        at java.util.ArrayList.forEach(ArrayList.java:1249)
        at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.lambda$handleCreates$180(DefaultObjectBundleService.java:238)
        at java.util.ArrayList.forEach(ArrayList.java:1249)
        at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.handleCreates(DefaultObjectBundleService.java:238)
        at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.commit(DefaultObjectBundleService.java:180)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
        at com.sun.proxy.$Proxy198.commit(Unknown Source)
        at org.hisp.dhis.dxf2.metadata.DefaultMetadataImportService.importMetadata(DefaultMetadataImportService.java:137)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:282)





--

此致

   林晓东

莫愁前路无知己,天下谁人不识君。




 





 


_______________________________________________
Mailing list: https://launchpad.net/~dhis2-users
Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp





--

Regards,
 
Gerald

References