MCRMODSLinksEventHandler throws FileNotFoundException

Description

If someone tries to import a MODS MyCoRe Object with child objects,
before the children are created, he might get the following exception:

The event handler should only proceed, if the child object really exists.

MyCoRe: org.apache.commons.vfs2.FileNotFoundException: Could not read from "file:///opt/mycore/data/rosdok/metadata/rosdok/document/000000/00/rosdok_document_0000000022.xml" because it is not a file.
at org.apache.commons.vfs2.provider.AbstractFileObject.getInputStream(AbstractFileObject.java:1309)
at org.apache.commons.vfs2.provider.DefaultFileContent.getInputStream(DefaultFileContent.java:411)
at org.mycore.common.content.MCRVFSContent.getInputStream(MCRVFSContent.java:77)
at org.mycore.common.content.MCRContent.getInputSource(MCRContent.java:209)
at org.mycore.common.xml.MCRXMLParserImpl.parseXML(MCRXMLParserImpl.java:82)
at org.mycore.common.content.MCRContent.asXML(MCRContent.java:286)
at org.mycore.datamodel.common.MCRXMLMetadataManager.retrieveXML(MCRXMLMetadataManager.java:495)
at org.mycore.datamodel.metadata.MCRMetadataManager.retrieveMCRObject(MCRMetadataManager.java:665)
at org.mycore.datamodel.metadata.MCRMetadataManager.retrieve(MCRMetadataManager.java:699)
at org.mycore.mods.MCRMODSLinksEventHandler.handleObjectUpdated(MCRMODSLinksEventHandler.java:94)
at org.mycore.common.events.MCREventHandlerBase.doHandleEvent(MCREventHandlerBase.java:63)

Environment

None

Assignee

Robert Stephan

Reporter

Robert Stephan

Labels

None

URL

None

External issue ID

None

Components

Fix versions

Affects versions

Priority

Medium
Configure