Reported By: Megan I. McCuller
Collections Manager, Non-molluscan Invertebrates
North Carolina Museum of Natural Sciences
Whenever clicking save on the Collecting Trip form the following error occurs:

And the Specify Error log says this:
org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: edu.ku.brc.specify.datamodel.CollectingTrip.collectingTripAttachments, no session or session was closed
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationException(AbstractPersistentCollection.java:358)
at org.hibernate.collection.AbstractPersistentCollection.throwLazyInitializationExceptionIfNotConnected(AbstractPersistentCollection.java:350)
at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:343)
at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
at org.hibernate.collection.PersistentSet.iterator(PersistentSet.java:163)
at edu.ku.brc.specify.datamodel.busrules.AttachmentOwnerBaseBusRules.beforeMerge(AttachmentOwnerBaseBusRules.java:127)
at edu.ku.brc.af.ui.forms.FormViewObj.saveToDB(FormViewObj.java:2857)
at edu.ku.brc.af.ui.forms.FormViewObj.saveObject(FormViewObj.java:3089)
at edu.ku.brc.af.ui.forms.validation.ValComboBoxFromQuery.createEditFrame(ValComboBoxFromQuery.java:956)
at edu.ku.brc.af.ui.forms.validation.ValComboBoxFromQuery.createEditFrame(ValComboBoxFromQuery.java:794)
at edu.ku.brc.af.ui.forms.validation.ValComboBoxFromQuery$3.actionPerformed(ValComboBoxFromQuery.java:580)
The Collecting Trip form was able to be saved via the Data sidebar, but not via the Collecting Event form.
The common.views form for the CollectingTrip viewdef says “<![CDATA[CollectingTrip Form - unknown use in database]]>” – that made me realize the Collecting Trip form connected to Collecting Event was attempting to use the CollectingTrip viewdef, whereas the one that worked was using the CollectingTripForm viewdef.
I edited dialog_defs.xml to display CollectingTripForm (instead of CollectingTrip) and now it works!
Reported By: Megan I. McCuller
Collections Manager, Non-molluscan Invertebrates
North Carolina Museum of Natural Sciences
Whenever clicking save on the Collecting Trip form the following error occurs:
And the Specify Error log says this:
The Collecting Trip form was able to be saved via the Data sidebar, but not via the Collecting Event form.
The common.views form for the CollectingTrip viewdef says “
<![CDATA[CollectingTrip Form - unknown use in database]]>” – that made me realize the Collecting Trip form connected to Collecting Event was attempting to use the CollectingTrip viewdef, whereas the one that worked was using the CollectingTripForm viewdef.I edited
dialog_defs.xmlto display CollectingTripForm (instead of CollectingTrip) and now it works!