Details
-
Bug
-
Resolution: Workaround exists
-
Neutral
-
None
-
None
-
None
-
None
Description
In cases where the binary is missing from the data store then the detail subApp fails to start normally. See full-stack-trace.txt.
2021-05-21 15:12:28,104 ERROR agnolia.ui.framework.app.AppInstanceControllerImpl: Sub-app [jcrDetail] of app [dam] failed to start com.machinezoo.noexception.WrappedException: org.apache.jackrabbit.core.data.DataStoreException: Record 1973a5c3c21db3b70e903236d33a526709a49646ea6ad1d34eed094f2565819f does not exist ... Caused by: org.apache.jackrabbit.core.data.DataStoreException: Record 1973a5c3c21db3b70e903236d33a526709a49646ea6ad1d34eed094f2565819f does not exist ... ... 2021-05-21 15:13:37,775 WARN org.apache.jackrabbit.core.value.BLOBInDataStore : getSize for 1973a5c3c21db3b70e903236d33a526709a49646ea6ad1d34eed094f2565819f failed org.apache.jackrabbit.core.data.DataStoreException: Record 1973a5c3c21db3b70e903236d33a526709a49646ea6ad1d34eed094f2565819f does not exist ... ... 2021-05-21 15:14:02,330 ERROR info.magnolia.ui.framework.ContextProperty$Impl : Failed to dispatch context property change: Invocation of method selectionChange in com.vaadin.ui.components.grid.MultiSelectionModel$$Lambda$1358/1748390998 failed. com.vaadin.event.ListenerMethod$MethodException: Invocation of method selectionChange in com.vaadin.ui.components.grid.MultiSelectionModel$$Lambda$1358/1748390998 failed. ... Caused by: java.lang.NullPointerException
Workaround
- Using the record id printed in the log try to retrieve the binary from backup. The beginning characters in the id indicate the folder locations of the record. Copy it from backup into live.
- If repairing the lost binary is not possible then the node should be deleted using the browser.
To check for other missing binaries use the following script.
// check for missing binaries in the datastore import org.apache.jackrabbit.core.RepositoryImpl; import info.magnolia.jcr.predicate.NodeTypePredicate; workspace = 'dam'; nodeType = "mgnl:asset" session = ctx.getJCRSession(workspace); dataStore = ((RepositoryImpl)session.getRepository()).getRepositoryContext().getDataStore(); collection = (NodeUtil.collectAllChildren(session.getRootNode(), new NodeTypePredicate(nodeType))).iterator(); while (collection.hasNext()) { node = collection.next(); binary = node.getNode("jcr:content").getProperty("jcr:data").getBinary(); dataRecord = dataStore.getRecordIfStored(binary.getDataIdentifier()); if (dataRecord == null) { print node; print ' '; println binary; print '\n'; } }
Checklists
Acceptance criteria