← Back to team overview

dhis2-users team mailing list archive

Re: Program metadata import

 

It's still happening with the last build version (e17a37f). The program is
a tracker program and the errors are the following:


** INFO  2017-01-25 07:14:17,785 (admin) Creating 23 object(s) of type
ProgramStageDataElement (DefaultObjectBundleService.java [taskScheduler-8])*
** INFO  2017-01-25 07:14:17,785 [Level: INFO, category: METADATA_IMPORT,
time: Wed Jan 25 07:14:17 UTC 2017, message: (admin) Creating 23 object(s)
of type ProgramStageDataElement] (InMemoryNotifier.java [taskScheduler-8])*
** INFO  2017-01-25 07:14:18,063 (admin) Creating 3 object(s) of type
ProgramStageSection (DefaultObjectBundleService.java [taskScheduler-8])*
** INFO  2017-01-25 07:14:18,063 [Level: INFO, category: METADATA_IMPORT,
time: Wed Jan 25 07:14:18 UTC 2017, message: (admin) Creating 3 object(s)
of type ProgramStageSection] (InMemoryNotifier.java [taskScheduler-8])*
** INFO  2017-01-25 07:14:18,177 (admin) Creating 1 object(s) of type
Program (DefaultObjectBundleService.java [taskScheduler-8])*
** INFO  2017-01-25 07:14:18,177 [Level: INFO, category: METADATA_IMPORT,
time: Wed Jan 25 07:14:18 UTC 2017, message: (admin) Creating 1 object(s)
of type Program] (InMemoryNotifier.java [taskScheduler-8])*
** ERROR 2017-01-25 07:14:18,223 Unexpected error occurred in scheduled
task. (TaskUtils.java [taskScheduler-8])*
*org.hibernate.TransientObjectException: object references an unsaved
transient instance - save the transient instance before flushing:
org.hisp.dhis.user.UserGroup*
*        at
org.hibernate.engine.internal.ForeignKeys.getEntityIdentifierIfNotUnsaved(ForeignKeys.java:279)*
*        at
org.hibernate.type.EntityType.getIdentifier(EntityType.java:455)*
*        at
org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:281)*
*        at
org.hibernate.type.ManyToOneType.isDirty(ManyToOneType.java:291)*
*        at org.hibernate.type.TypeHelper.findDirty(TypeHelper.java:296)*
*        at
org.hibernate.persister.entity.AbstractEntityPersister.findDirty(AbstractEntityPersister.java:4126)*
*        at
org.hibernate.event.internal.DefaultFlushEntityEventListener.dirtyCheck(DefaultFlushEntityEventListener.java:528)*
*        at
org.hibernate.event.internal.DefaultFlushEntityEventListener.isUpdateNecessary(DefaultFlushEntityEventListener.java:215)*
*        at
org.hibernate.event.internal.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:142)*
*        at
org.hibernate.event.internal.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:216)*
*        at
org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:85)*
*        at
org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:38)*
*        at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1295)*
*        at
org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.commit(DefaultObjectBundleService.java:158)*
*        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:498)*
*        at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)*
*        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:281)*
*        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:208)*
*        at com.sun.proxy.$Proxy165.commit(Unknown Source)*
*        at
org.hisp.dhis.dxf2.metadata.DefaultMetadataImportService.importMetadata(DefaultMetadataImportService.java:126)*
*        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:498)*
*        at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)*
*        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:281)*
*        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:208)*
*        at com.sun.proxy.$Proxy167.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(DelegatingErrorHandlingRunnable.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(ScheduledThreadPoolExecutor.java:180)*
*        at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.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)*


Just testing we saw that if we try to import a program of type Event the
import succeed.

Thanks,

Marc


2017-01-25 8:11 GMT+01:00 Marc Garnica <marcgarnica13@xxxxxxxxx>:

> We will update to the last build and let you know.
>
> Thanks!
>
> On 25 Jan 2017 2:00 a.m., "Morten Olav Hansen" <morten@xxxxxxxxx> wrote:
>
>> What version of DHIS2? also, are you on the latest? there have been many
>> fixes related to this lately.
>>
>> --
>> Morten Olav Hansen
>> Senior Engineer, DHIS 2
>> University of Oslo
>> http://www.dhis2.org
>>
>> On Wed, Jan 25, 2017 at 12:37 AM, Lars Helge Øverland <lars@xxxxxxxxx>
>> wrote:
>>
>>> Hi Marc,
>>>
>>> can you please post the relevant part of the Tomcat log.
>>>
>>> Lars
>>>
>>>
>>> On Tue, Jan 24, 2017 at 6:11 PM, Marc Garnica <marcgarnica13@xxxxxxxxx>
>>> wrote:
>>>
>>>> Hi all
>>>>
>>>> We are trying to import a program metadata which was download through
>>>> another DHIS2 instance with the Metadata Export with dependencies. Every
>>>> time we try the import the user interface just get stuck in creating a
>>>> program and the logs files have the following error:
>>>>
>>>> *object references an unsaved transient instance - save the transient
>>>> instance before flushing*
>>>>
>>>>
>>>> Any news on that?
>>>>
>>>> Thank you very much in advance,
>>>>
>>>> Marc
>>>>
>>>> _______________________________________________
>>>> 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
>>>>
>>>>
>>>
>>>
>>> --
>>> Lars Helge Øverland
>>> Lead developer, DHIS 2
>>> University of Oslo
>>> Skype: larshelgeoverland
>>> lars@xxxxxxxxx
>>> http://www.dhis2.org <https://www.dhis2.org/>
>>>
>>>
>>> _______________________________________________
>>> 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
>>>
>>>
>>

Follow ups

References