kitodo / kitodo-production

Kitodo.Production is a workflow management tool for mass digitization and is part of the Kitodo Digital Library Suite.
http://www.kitodo.org/software/kitodoproduction/
GNU General Public License v3.0
62 stars 62 forks source link

Metadata Editor breaks when you click on an Image (in hierarchical process) #3627

Closed andre-hohmann closed 4 years ago

andre-hohmann commented 4 years ago

Problem

Processes of newspaper issues generate the following validation warning:

If the images are "touched", the metadata editor crashes and the error message is shown:

Solution

The element "PeriodicalIssue" should not be validated against the images, as for the other document types as monograph or manuscripts.

Example

Client: SLUB Dresden Test Processes: Aben_774618868_Test_20200508_1870011702-A ID: 1392 Aben_774618868_Test_20200508_1870010302-A ID: 1388

Validation warning

newspaperissue01

error message

newspaperissue02

matthias-ronge commented 4 years ago

The validation is right that the images are not assigned to the issue. The problem is obviously that the images cannot be assigned to it. However, that should be possible.

andre-hohmann commented 4 years ago

The Images of issue-processes still cannot be moved in the gallery:

An error has occurred.
Date/time: 2020-05-26 15:56:13
User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36
User IP: 134.100.172.49
Request URI: /cePreview/pages/metadataEditor.jsf
Ajax request: Yes
Status code: 500
Exception type: class java.lang.NullPointerException
Exception message:
Exception UUID:
Stack trace:
java.lang.NullPointerException
    at org.kitodo.production.forms.dataeditor.StructurePanel.updatePhysSelectionInLogTreeRecursive(StructurePanel.java:852)
    at org.kitodo.production.forms.dataeditor.StructurePanel.updatePhysSelectionInLogTreeRecursive(StructurePanel.java:860)
    at org.kitodo.production.forms.dataeditor.StructurePanel.updateLogicalNodeSelection(StructurePanel.java:771)
    at org.kitodo.production.forms.dataeditor.StructurePanel.updateNodeSelection(StructurePanel.java:726)
    at org.kitodo.production.forms.dataeditor.GalleryPanel.updateStructure(GalleryPanel.java:352)
    at org.kitodo.production.forms.dataeditor.GalleryPanel.select(GalleryPanel.java:799)
    at org.kitodo.production.forms.dataeditor.GalleryPanel.selectMedia(GalleryPanel.java:734)
    at org.kitodo.production.forms.dataeditor.GalleryPanel.select(GalleryPanel.java:760)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.el.parser.AstValue.invoke(AstValue.java:247)
    at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:267)
    at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40)
    at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
    at org.jboss.weld.util.el.ForwardingMethodExpression.invoke(ForwardingMethodExpression.java:40)
    at org.jboss.weld.el.WeldMethodExpression.invoke(WeldMethodExpression.java:50)
    at org.apache.myfaces.view.facelets.el.ContextAwareTagMethodExpression.invoke(ContextAwareTagMethodExpression.java:96)
    at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74)
    at org.springframework.faces.webflow.FlowActionListener.processAction(FlowActionListener.java:71)
    at org.springframework.faces.model.SelectionTrackingActionListener.processAction(SelectionTrackingActionListener.java:64)
    at javax.faces.component.UICommand.broadcast(UICommand.java:120)
    at javax.faces.component.UIViewRoot._broadcastAll(UIViewRoot.java:1255)
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:420)
    at javax.faces.component.UIViewRoot._process(UIViewRoot.java:1741)
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:935)
    at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:42)
    at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:195)
    at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:142)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:204)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
    at org.kitodo.production.servletfilter.EncodingFilter.doFilter(EncodingFilter.java:69)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
    at org.kitodo.production.security.SecurityObjectAccessFilter.doFilter(SecurityObjectAccessFilter.java:86)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:155)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
    at org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:591)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:789)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1437)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:748)
Imprint Data privacy Terms of use
KITODO.PRODUCTION Version 3.2.0-SNAPSHOT
matthias-ronge commented 4 years ago

A new process was started. It went through the "scan" task, images were inserted, "generate derivatives" (automatic), and now the "metadata" task takes place. You open the metadata editor from task page, and it looks like this:

Metadata editor

You click on any of the images in the "unstructured media" section, and it dies with Stacktrace:

java.lang.NullPointerException
    at org.kitodo.production.forms.dataeditor.StructurePanel.updatePhysSelectionInLogTreeRecursive(StructurePanel.java:854)
    at org.kitodo.production.forms.dataeditor.StructurePanel.updatePhysSelectionInLogTreeRecursive(StructurePanel.java:862)
    at org.kitodo.production.forms.dataeditor.StructurePanel.updateLogicalNodeSelection(StructurePanel.java:773)
    at org.kitodo.production.forms.dataeditor.StructurePanel.updateNodeSelection(StructurePanel.java:728)
    at org.kitodo.production.forms.dataeditor.GalleryPanel.updateStructure(GalleryPanel.java:352)
    at org.kitodo.production.forms.dataeditor.GalleryPanel.select(GalleryPanel.java:800)
    at org.kitodo.production.forms.dataeditor.GalleryPanel.selectMedia(GalleryPanel.java:734)
    at org.kitodo.production.forms.dataeditor.GalleryPanel.select(GalleryPanel.java:761)

Goal: When you click it, the picture should be selected.

matthias-ronge commented 4 years ago

The title of the issue is misleading. This is not a validation problem, but the fact that the metadata editor crashes as soon as you click on an image. I also observed the same behavior and first created it as a new ticket, I just closed it as a double. The validation error may also be unsightly, I'm not sure at the moment whether the validation correctly indicates an error or whether it is a false positive, but we should keep that out first.

matthias-ronge commented 4 years ago

@solth wrote:

I suspect this only happens with processes that have a parent process. @matthias-ronge can you confirm or deny this?

Apparently it happens in newspapers. I have not yet been able to analyze whether it also applies to multi-volume works.