Hi,

We are working on DHIS 2.24 branch (revision - 23565). We have created a
chart on one DHIS instance and imported it into another DHIS instance. All
the other metadata entities sync well, except for charts. The same happens
with Pivot Tables, Event reports and Event Charts and maps as well. The
importer throws an error and fails at importing these Analytics objects.

Here's the log trace for the exception -

* INFO  2016-08-16 18:04:12,673 Skipping unknown property 'date'.
(DefaultRenderService.java [taskScheduler-2])
* INFO  2016-08-16 18:04:12,674 (system-process) Import:Start
(DefaultMetadataImportService.java [taskScheduler-2])
* INFO  2016-08-16 18:04:12,693 (system-process) Import:Preheat[REFERENCE]
took 0.02 seconds (DefaultPreheatService.java [taskScheduler-2])
* INFO  2016-08-16 18:04:12,694 (system-process) Import:Validation took
0.00 seconds (DefaultObjectBundleValidationService.java [taskScheduler-2])
** INFO  2016-08-16 18:04:12,694 (system-process) Creating 1 object(s) of
type Chart (DefaultObjectBundleService.java [taskScheduler-2])*
** ERROR 2016-08-16 18:04:12,697 Exception occurred while trying to import
the metadata. object references an unsaved transient instance - save the
transient instance before flushing: org.hisp.dhis.dataelement.DataElement
(MetadataSyncImportHandler.java [taskScheduler-2])*
*org.hibernate.TransientObjectException: object references an unsaved
transient instance - save the transient instance before flushing:
org.hisp.dhis.dataelement.DataElement*
at org.hibernate.engine.internal.ForeignKeys.getEntityIdentifierIfNotUnsave
d(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.DefaultFlushEntityEventListene
r.isUpdateNecessary(DefaultFlushEntityEventListener.java:215)
at org.hibernate.event.internal.DefaultFlushEntityEventListene
r.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.metadata2.objectbundle.DefaultObjectBundleService.
commit(DefaultObjectBundleService.java:155)
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:302)
at org.springframework.aop.framework.ReflectiveMethodInvocation.
invokeJoinpoint(ReflectiveMethodInvocation.java:190)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:157)


This issue was reported earlier, but looks like it has not been fixed.
Could you please help fix this.



*Cheers,*

Archana Chillala
Application Developer
Email archa...@thoughtworks.com
Telephone +91 9100960533 <+91+9100960533>
[image: ThoughtWorks]
<http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator>
_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to     : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp

Reply via email to