We're updating the issue view to help you get more done. 

repeating mods:name[@type="corporate"] leads to IndexOutOfBoundsException

Description

If there are mods:name[@type="corporate"] elements for institution and for name in metadata an exception occured using repeater button:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 2019-04-12T09:52:14,712 INFO administrator MCRXEditorServlet: sending submission to target insert /mycoreobject/metadata/def.modsContainer/modsContainer/mods:mods|4 |build|mods:name[((@type = "personal") or (not(@type) or ((@type = "corporate") and not((@authorityURI = "http://www.mycore.org/classifications/mir_institutes")))))]|rep-13 2019-04-12T09:52:14,730 ERROR administrator MCRServlet: Exception while in rendering phase: Index: 3, Size: 3 2019-04-12T09:52:14,731 ERROR MCRErrorServlet: /servlets/XEditor: Error 500 occured. The following message was given: Index: 3, Size: 3 java.lang.IndexOutOfBoundsException: Index: 3, Size: 3 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at org.mycore.frontend.xeditor.MCRRepeatBinding.insert(MCRRepeatBinding.ja va:106) at org.mycore.frontend.xeditor.target.MCRInsertTarget.handle(MCRInsertTarget .java:30) at org.mycore.frontend.xeditor.target.MCRSwapInsertTarget.handle(MCRSwapI nsertTarget.java:54) at org.mycore.frontend.xeditor.target.MCRSwapInsertTarget.handleRepeaterCo ntrol(MCRSwapInsertTarget.java:39) at org.mycore.frontend.xeditor.target.MCRRepeaterControl.handleSubmission( MCRRepeaterControl.java:37) at org.mycore.frontend.xeditor.MCRXEditorServlet.sendToTarget(MCRXEditorSe rvlet.java:80) at org.mycore.frontend.xeditor.MCRXEditorServlet.doGetPost(MCRXEditorServl et.java:58) at org.mycore.frontend.servlets.MCRServlet.doPost(MCRServlet.java:183) at org.mycore.frontend.servlets.MCRServlet.render(MCRServlet.java:471) at org.mycore.frontend.servlets.MCRServlet.processRenderingPhase(MCRServlet .java:439) at org.mycore.frontend.servlets.MCRServlet.doGetPost(MCRServlet.java:289) at org.mycore.frontend.servlets.MCRServlet.doPost(MCRServlet.java:176) at javax.servlet.http.HttpServlet.service(HttpServlet.java:661) at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationF ilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCha in.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationF ilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCha in.java:166) at org.mycore.frontend.filter.MCRWebAppBaseFilter.doFilter(MCRWebAppBase Filter.java:41) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationF ilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCha in.java:166) at org.mycore.frontend.filter.MCRRequestAuthenticationFilter.doFilter(MCRReq uestAuthenticationFilter.java:57) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationF ilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCha in.java:166) at org.mycore.frontend.filter.MCRRequestDebugFilter.doFilter(MCRRequestDeb ugFilter.java:75) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationF ilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCha in.java:166) at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipel ine.java:120) at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:133) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationF ilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCha in.java:166) at org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.jav a:71) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationF ilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCha in.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal ve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv e.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorB ase.java:493) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java: 140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81 ) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLog Valve.java:650) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.j ava:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:34 2) at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:479) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.jav a:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractPro tocol.java:800) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoin t.java:1471) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.jav a:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.jav a:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja va:624) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThre ad.java:61) at java.lang.Thread.run(Thread.java:748)

Environment

None

Status

Assignee

Kathleen Neumann

Reporter

Paul Borchert

Labels

None

External issue ID

None

External issue ID

None

External issue ID

None

URL

None

External issue ID

None

External issue ID

None

Components

Fix versions

Affects versions

2018.06.0.3
2019.02

Priority

Medium