Skip to content

CollectingTrip default form issue #1212

@grantfitzsimmons

Description

@grantfitzsimmons

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:

image

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions