Ticket #128 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

exception after defining a study, cannot save the study

Reported by: business@… Owned by: work@…
Priority: minor Milestone: 0.6.2
Component: Study create/edit wizard Version:
Keywords: Cc:
Product: Operating system:
URL: Hardware:

Description (last modified by business@…) (diff)

When creating a study with some generated samples, a popup box is shown with an exception:

exception → org.springframework.dao.DataIntegrityViolationException?: not-null property references a null or transient value: dbnp.studycapturing.Sample.parentEvent; nested exception is org.hibernate.PropertyValueException?: not-null property references a null or transient value: dbnp.studycapturing.Sample.parentEvent, see log for stacktrace

This indicates a bug in the sample generation (you also see in the user interface that only the first sample listed actually has a parentEvent template name). This bug has to be fixed. But also, parentEvent should become an optional Sample property. Please change this and make sure the wizard still works.

Change History

Changed 4 years ago by business@…

  • milestone set to 0.5.1

Changed 3 years ago by business@…

  • owner set to j.a.m.wesbeek@…
  • status changed from new to assigned
  • description modified (diff)

Changed 3 years ago by j.a.m.wesbeek@…

  • owner changed from j.a.m.wesbeek@… to business@…

nice issue, but this worked before I left for holidays... So one of you broke it, why do I need to fix your issue? Reassign it back to the one that broke it...

Changed 3 years ago by business@…

  • owner changed from business@… to j.a.m.wesbeek@…

Actually it didn't. In [895] the same error occurs (when you have more than 1 sample from 1 sampling event).

Changed 3 years ago by business@…

  • priority changed from blocker to minor
  • milestone changed from 0.5.1 to 0.6.2

This is now solved, because parentEvent is nullable. However, there is still probably some underlying problem, because this error shouldn't be raised at all under the circumstances it was raised. (Create a new study with a few subjects, 1 sampling event, be sure to put both in a group to get samples, and then also you have to create an assay and assign the samples to it to get an error). To re-create this problem, set parentEvent nullable to false.

Changed 3 years ago by work@…

  • owner changed from j.a.m.wesbeek@… to work@…

Changed 3 years ago by work@…

  • owner changed from work@… to business@…

Seems to be working properly? I don't get an exception aymore...

Committed false -> true change in r1161

please retest...

Changed 3 years ago by business@…

  • status changed from assigned to closed
  • resolution set to worksforme

In [1161], I still get an exception in a popup after trying to save the study (following the procedure described in my previous comment):

exception → org.compass.gps.device.hibernate.HibernateGpsDeviceException?: {hibernate}: Failed while creating [hj]; nested exception is org.compass.core.converter.ConversionException?: Trying to marshall a null id [id] for alias [Event], see log for stacktrace

However, this issue is more or less resolved by setting parentEvent to nullable, and this might as well be a Grails bug. So consider this fixed now.

Changed 3 years ago by business@…

  • status changed from closed to reopened
  • resolution worksforme deleted

Actually, I have to reopen it, because when testing on [1168], the problem reappears:

exception → org.compass.gps.device.hibernate.HibernateGpsDeviceException?: {hibernate}: Failed while creating [hj]; nested exception is org.compass.core.converter.ConversionException?: Trying to marshall a null id [id] for alias [Event], see log for stacktrace

This must be caused by the samples not being added to the assay properly (maybe even a Grails problem). The error does not occur when you don't create an assay. The strange this is, if you create an assay, but do not add any samples to it, and after that, change the study and add the samples to the assay, the error also does not occur. So saving the study before you add the samples to the assay solves this problem. But that is of course not what we want.

I tried adding belongsTo parentAssay : Assay to Sample class and this actually solves the above error, but then again the old error reappears:

exception → org.springframework.dao.DataIntegrityViolationException?: not-null property references a null or transient value: dbnp.studycapturing.Sample.parentEvent; nested exception is org.hibernate.PropertyValueException?: not-null property references a null or transient value: dbnp.studycapturing.Sample.parentEvent, see log for stacktrace

And of course setting parentAssay is not what we want, because a Sample can (and will) be used in multiple Assays.

Changed 3 years ago by business@…

  • owner changed from business@… to work@…
  • status changed from reopened to assigned

Changed 3 years ago by business@…

  • status changed from assigned to closed
  • resolution set to fixed

Ah, wait, I didn't see that you did not put parentEvent to nullable again yet. Fixed this now in [[1169].

Note: See TracTickets for help on using tickets.