ver 2.29 , can't import metadata.

hi,all

I have a new installed 2.29 instance. got error when import metadata from other 2.29 instance.

···
  • WARN 2018-09-04 10:38:13,888 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#75]])

Non-nullable association(s): ([org.hisp.dhis.attribute.AttributeValue.attribute]) (UnresolvedEntityInsertActions.java [taskScheduler-23])

  • ERROR 2018-09-04 10:38:13,898 Unexpected error occurred in scheduled task. (TaskUtils.java [taskScheduler-23])

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$20(DefaultObjectBundleService.java:239)

at java.util.ArrayList.forEach(ArrayList.java:1249)

at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.lambda$handleCreates$21(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)


此致

林晓东

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

Hi,

I hope it is not too late for you, can you share the screen (import page) by clicking on “Display import summary” link, below the import form for more detail on the error, it seems like it was not able to insert the AttributeValue entity because it is missing the referenced Attribute entity; the missing Attribute needs to be inserted first.

Regards

···

Eric Dusabe

Senior Developer

**HISP **Rwanda

m: (+250) 788743445

a: KG 113 St, Kigali – Rwanda

w: hisprwanda.org e: dusabe.eric@hisprwanda.org

2018-09-06 09:43:25
(admin) Creating 147 object(s) of type Option
2018-09-06 09:43:25
(admin) Creating 1 object(s) of type Constant
2018-09-06 09:43:25
(admin) Creating 2 object(s) of type UserGroup
2018-09-06 09:43:25
(admin) Updating 1 object(s) of type User
2018-09-06 09:43:25
(admin) Creating 9 object(s) of type User
2018-09-06 09:43:25
(admin) Updating 1 object(s) of type UserAuthorityGroup
2018-09-06 09:43:24
(admin) Creating 4 object(s) of type UserAuthorityGroup
2018-09-06 09:43:18
(admin) Import:Start

···

Eric Dusabe

Senior
Developer

**HISP **Rwanda

m: (+250)
788743445

a: KG 113
St, Kigali – Rwanda

w: hisprwanda.org e: dusabe.eric@hisprwanda.org

You are right whenever there is an error while importing it keeps showing that it is still running. you can try a dry run and check if everything is fine first.

···

Eric Dusabe

Senior Developer

HISP RWANDA

m: (+250) 788743445

a: KG 113 St, Kigali – Rwanda

w: hisprwanda.org e: dusabe.eric@hisprwanda.org

dry run is ok

在 2018-09-06 23:35:15,“Dusabe Eric” duserik@gmail.com 写道:

···

Eric Dusabe

Senior
Developer

HISP RWANDA

m: (+250)
788743445

a: KG 113
St, Kigali – Rwanda

w: hisprwanda.org e: dusabe.eric@hisprwanda.org

Hi

it seems something is wrong with your attribute references. Do they already exist in the system? or are you importing them as part of the metadata file?

Assuming they are part of the same file, this would clearly be a bug.

Would you mind filing a bug at jira.dhis2.org ?

···

Morten Olav Hansen

Senior Engineer, DHIS 2

Team Integration Lead

University of Oslo

http://www.dhis2.org