← Back to team overview

dhis2-users team mailing list archive

Re: import metadata from xml error

 

also for user group:


| 2013-07-17 16:05 | Importing 2 UserGroups   |
| 2013-07-17 16:05 | Importing 6 DataSets   |
| 2013-07-17 16:05 | Importing 2 DataDictionaries   |
| 2013-07-17 16:05 | Importing 1 Indicators   |
| 2013-07-17 16:05 | Importing 2 IndicatorTypes   |
| 2013-07-17 16:05 | Importing 2 DataElementGroupSets   |
| 2013-07-17 16:05 | Importing 14 DataElementGroups   |
| 2013-07-17 16:05 | Importing 239 DataElements   |
| 2013-07-17 16:05 | Importing 1 Categories   |
| 2013-07-17 16:05 | Importing 36 OptionSets   |
| 2013-07-17 16:05 | Importing 1 Constants   |
| 2013-07-17 16:05 | Importing 3 Concepts   |
| 2013-07-17 16:05 | Importing meta-data   |
org.hibernate.TransientObjectException: object references an unsaved transient instance - sa
ve the transient instance before flushing: org.hisp.dhis.user.User
        at org.hibernate.engine.internal.ForeignKeys.getEntityIdentifierIfNotUnsaved(Foreign
Keys.java:249)
        at org.hibernate.type.EntityType.getIdentifier(EntityType.java:489)
        at org.hibernate.type.ManyToOneType.nullSafeSet(ManyToOneType.java:151)
        at org.hibernate.persister.collection.AbstractCollectionPersister.writeElement(Abstr
actCollectionPersister.java:863)
        at org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractC
ollectionPersister.java:1253)
        at org.hibernate.action.internal.CollectionRecreateAction.execute(CollectionRecreate
Action.java:58)
        at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:362)
        at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:354)
        at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:279)
        at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(Abst
ractFlushingEventListener.java:328)
        at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventL
istener.java:52)
        at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1233)
        at org.hisp.dhis.dxf2.metadata.DefaultImportService.importMetaData(DefaultImportServ
ice.java:150)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.
java:317)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(Refl
ectiveMethodInvocation.java:183)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMe
thodInvocation.java:150)
        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithI
nvocation(TransactionInterceptor.java:96)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithin
Transaction(TransactionAspectSupport.java:260)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(Transac
tionInterceptor.java:94)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMe
thodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.ja
va:204)
        at com.sun.proxy.$Proxy132.importMetaData(Unknown Source)
        at org.hisp.dhis.importexport.action.util.ImportMetaDataTask.run(ImportMetaDataTask.
java:92)
        at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(Delega
tingErrorHandlingRunnable.java:53)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(U
nknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown
Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)







--

此致

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

At 2013-07-17 15:08:55,"Morten Olav Hansen" <mortenoh@xxxxxxxxx> wrote:

Hi,


Yes, we already know of this bug. It is because you have assigned a dataset to a orgUnit group. Will have a fix for it soon I hope, but for now, you can remove the dataset from the orgunit group (either in dhis, or remove the reference in the xml/json file)


--
Morten



On Wed, Jul 17, 2013 at 2:01 PM, easy <lin_xd@xxxxxxx> wrote:

hi,all,  when I import the metadata from other dhis, till to import optionset cause error:
| 2013-07-17 14:51 | Importing 44 OrganisationUnitGroups   |
| 2013-07-17 14:51 | Importing 5 OrganisationUnitLevels   |
| 2013-07-17 14:51 | Importing 5 OrganisationUnitLevels   |
| 2013-07-17 14:48 | Importing 66707 OrganisationUnits   |
| 2013-07-17 14:48 | Importing 36 OptionSets   |
| 2013-07-17 14:48 | Importing 1 Constants   |
| 2013-07-17 14:48 | Importing 3 Concepts   |
| 2013-07-17 14:48 | Importing meta-data   |


* ERROR 2013-07-17 14:51:26,822 Unexpected error occurred in scheduled task. (TaskUtils.java
 [taskScheduler-1])
org.hibernate.TransientObjectException: object references an unsaved transient instance - sa
ve the transient instance before flushing: org.hisp.dhis.dataset.DataSet
        at org.hibernate.engine.internal.ForeignKeys.getEntityIdentifierIfNotUnsaved(Foreign
Keys.java:249)
        at org.hibernate.type.EntityType.getIdentifier(EntityType.java:489)
        at org.hibernate.type.ManyToOneType.nullSafeSet(ManyToOneType.java:151)
        at org.hibernate.persister.collection.AbstractCollectionPersister.writeElement(Abstr
actCollectionPersister.java:863)
        at org.hibernate.persister.collection.AbstractCollectionPersister.recreate(AbstractC
ollectionPersister.java:1253)
        at org.hibernate.action.internal.CollectionRecreateAction.execute(CollectionRecreate
Action.java:58)
        at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:362)
        at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:354)
        at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:279)
        at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(Abst
ractFlushingEventListener.java:328)
        at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventL
istener.java:52)
        at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1233)
        at org.hisp.dhis.dxf2.metadata.DefaultImportService.importMetaData(DefaultImportServ
ice.java:150)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.
java:317)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(Refl
ectiveMethodInvocation.java:183)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMe
thodInvocation.java:150)
        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithI
nvocation(TransactionInterceptor.java:96)
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithin
Transaction(TransactionAspectSupport.java:260)
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(Transac
tionInterceptor.java:94)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMe
thodInvocation.java:172)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.ja
va:204)
        at com.sun.proxy.$Proxy132.importMetaData(Unknown Source)
        at org.hisp.dhis.importexport.action.util.ImportMetaDataTask.run(ImportMetaDataTask.
java:92)
        at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(Delega
tingErrorHandlingRunnable.java:53)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(U
nknown Source)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown
Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)




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



_______________________________________________
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




References