dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #50273
Adding compulsory data elements
Hi devs,
We're having trouble making data elements compulsory for a data set. This
is for DHIS2 2.26.
When attempting to save a data set after adding data elements as compulsory
we get the following 500 error from the server:
"No row with the given identifier exists:
[org.hisp.dhis.dataset.DataSetElement#30043359]"
The given id does exist in the DataSetElement table. If I was to guess, it
appears to be an issue with Hibernate caching...
(Note, we were previously getting an error on the uniqueness constraint for
dataElementOperands, but we've removed this constraint from the DB.)
Here is the relevant part of the stack trace:
11:07:39
* INFO 2017-11-14 11:07:39,759 (admin) Updating 1 object(s) of type DataSet
(DefaultObjectBundleService.java [http-apr-8080-exec-3685])
11:07:39
org.hibernate.ObjectNotFoundException: No row with the given identifier
exists: [org.hisp.dhis.dataset.DataSetElement#30043359]
11:07:39
at
org.hibernate.boot.internal.StandardEntityNotFoundDelegate.handleEntityNotFound(StandardEntityNotFoundDelegate.java:28)
11:07:39
at
org.hibernate.event.internal.DefaultLoadEventListener.load(DefaultLoadEventListener.java:227)
11:07:39
at
org.hibernate.event.internal.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:278)
11:07:39
at
org.hibernate.event.internal.DefaultLoadEventListener.doOnLoad(DefaultLoadEventListener.java:121)
11:07:39
at
org.hibernate.event.internal.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:89)
11:07:39
at org.hibernate.internal.SessionImpl.fireLoad(SessionImpl.java:1142)
11:07:39
at org.hibernate.internal.SessionImpl.internalLoad(SessionImpl.java:1025)
11:07:39
at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:639)
11:07:39
at org.hibernate.type.ManyToOneType.assemble(ManyToOneType.java:252)
11:07:39
at
org.hibernate.collection.internal.PersistentSet.initializeFromCache(PersistentSet.java:128)
11:07:39
at
org.hibernate.cache.spi.entry.CollectionCacheEntry.assemble(CollectionCacheEntry.java:58)
11:07:39
at
org.hibernate.event.internal.DefaultInitializeCollectionEventListener.initializeCollectionFromCache(DefaultInitializeCollectionEventListener.java:144)
11:07:39
at
org.hibernate.event.internal.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:59)
11:07:39
at
org.hibernate.internal.SessionImpl.initializeCollection(SessionImpl.java:2004)
11:07:39
at
org.hibernate.collection.internal.AbstractPersistentCollection$4.doWork(AbstractPersistentCollection.java:567)
11:07:39
at
org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:249)
11:07:39
at
org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:563)
11:07:39
at
org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:132)
11:07:39
at
org.hibernate.collection.internal.PersistentSet.iterator(PersistentSet.java:163)
11:07:39
at
java.util.Spliterators$IteratorSpliterator.estimateSize(Spliterators.java:1821)
11:07:39
at java.util.Spliterator.getExactSizeIfKnown(Spliterator.java:408)
11:07:39
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:480)
11:07:39
at
java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
11:07:39
at
java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
11:07:39
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
11:07:39
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
11:07:39
at org.hisp.dhis.dataelement.DataElement.getDataSets(DataElement.java:309)
11:07:39
at org.hisp.dhis.dataelement.DataElement.getDataSet(DataElement.java:284)
11:07:39
at org.hisp.dhis.dataelement.DataElement.getPeriodType(DataElement.java:352)
11:07:39
at
org.hisp.dhis.dataelement.DataElement.getFrequencyOrder(DataElement.java:433)
11:07:39
at
org.hisp.dhis.dataelement.DataElementOperand.updateProperties(DataElementOperand.java:398)
11:07:39
at
org.hisp.dhis.dataelement.DataElementOperand.hashCode(DataElementOperand.java:614)
11:07:39
at java.util.HashMap.hash(HashMap.java:338)
11:07:39
at java.util.HashMap.put(HashMap.java:611)
11:07:39
at java.util.HashSet.add(HashSet.java:219)
11:07:39
at
org.hibernate.collection.internal.PersistentSet.add(PersistentSet.java:186)
11:07:39
at
org.hisp.dhis.dxf2.metadata.objectbundle.hooks.DataSetObjectBundleHook.postUpdate(DataSetObjectBundleHook.java:187)
--
*Jasper Timm*
Lead Software Developer
*eHealth Africa*
Mobile +232 99891119 <+23299891119>
www.ehealthafrica.org
<http://www.ehealthafrica.org/>
Follow ups