Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexOutOfBoundsException when retrieving a register in RDF/XML or XML ISO 19135 #101

Closed
heidivanparys opened this issue Nov 25, 2021 · 0 comments
Labels
solved Solution developed and accepted, not yet deployed Type: Bug Something isn't working
Milestone

Comments

@heidivanparys
Copy link
Contributor

The exception below occurs when retrieving a register in RDF/XML or XML ISO 19135:

image

[ERROR] 2021-11-25 15:48:50.647 [http-nio-8080-exec-415] [restapi.ItemsServlet.doGet:207] - Unexpected exception occured
java.lang.IndexOutOfBoundsException: Index: 0
	at java.util.Collections$EmptyList.get(Collections.java:4456) ~[?:1.8.0_292]
	at eu.europa.ec.re3gistry2.restapi.format.ISO19135Formatter.writeRegisterAdministratorRole(ISO19135Formatter.java:226) ~[classes/:?]
	at eu.europa.ec.re3gistry2.restapi.format.ISO19135Formatter.writeSubmitter(ISO19135Formatter.java:203) ~[classes/:?]
	at eu.europa.ec.re3gistry2.restapi.format.ISO19135Formatter.writeRegister(ISO19135Formatter.java:128) ~[classes/:?]
	at eu.europa.ec.re3gistry2.restapi.format.ISO19135Formatter.write(ISO19135Formatter.java:69) ~[classes/:?]
	at eu.europa.ec.re3gistry2.restapi.util.ResponseUtil.ok(ResponseUtil.java:48) ~[classes/:?]
	at eu.europa.ec.re3gistry2.restapi.ItemsServlet.doGet(ItemsServlet.java:191) [classes/:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:655) [servlet-api.jar:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) [servlet-api.jar:?]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [catalina.jar:8.5.70]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.70]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-websocket.jar:8.5.70]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.70]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.70]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:196) [catalina.jar:8.5.70]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) [catalina.jar:8.5.70]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:544) [catalina.jar:8.5.70]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) [catalina.jar:8.5.70]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) [catalina.jar:8.5.70]
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:698) [catalina.jar:8.5.70]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) [catalina.jar:8.5.70]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:364) [catalina.jar:8.5.70]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:624) [tomcat-coyote.jar:8.5.70]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-coyote.jar:8.5.70]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:831) [tomcat-coyote.jar:8.5.70]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1650) [tomcat-coyote.jar:8.5.70]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:8.5.70]
	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) [tomcat-util.jar:8.5.70]
	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) [tomcat-util.jar:8.5.70]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.5.70]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_292]
[ERROR] 2021-11-25 15:50:36.632 [http-nio-8080-exec-411] [restapi.ItemsServlet.doGet:207] - Unexpected exception occured
java.lang.IndexOutOfBoundsException: Index: 0
	at java.util.Collections$EmptyList.get(Collections.java:4456) ~[?:1.8.0_292]
	at eu.europa.ec.re3gistry2.restapi.format.RDFFormatter.writeRoles(RDFFormatter.java:406) ~[classes/:?]
	at eu.europa.ec.re3gistry2.restapi.format.RDFFormatter.writeRegister(RDFFormatter.java:211) ~[classes/:?]
	at eu.europa.ec.re3gistry2.restapi.format.RDFFormatter.write(RDFFormatter.java:124) ~[classes/:?]
	at eu.europa.ec.re3gistry2.restapi.util.ResponseUtil.ok(ResponseUtil.java:48) ~[classes/:?]
	at eu.europa.ec.re3gistry2.restapi.ItemsServlet.doGet(ItemsServlet.java:191) [classes/:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:655) [servlet-api.jar:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) [servlet-api.jar:?]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [catalina.jar:8.5.70]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.70]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-websocket.jar:8.5.70]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [catalina.jar:8.5.70]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [catalina.jar:8.5.70]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:196) [catalina.jar:8.5.70]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) [catalina.jar:8.5.70]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:544) [catalina.jar:8.5.70]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) [catalina.jar:8.5.70]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81) [catalina.jar:8.5.70]
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:698) [catalina.jar:8.5.70]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) [catalina.jar:8.5.70]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:364) [catalina.jar:8.5.70]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:624) [tomcat-coyote.jar:8.5.70]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat-coyote.jar:8.5.70]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:831) [tomcat-coyote.jar:8.5.70]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1650) [tomcat-coyote.jar:8.5.70]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:8.5.70]
	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) [tomcat-util.jar:8.5.70]
	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) [tomcat-util.jar:8.5.70]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.5.70]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_292]
@oscar9 oscar9 added the Type: Bug Something isn't working label May 9, 2022
@oscar9 oscar9 added the ready for testing Solution is ready to test label Jul 18, 2022
oscar9 added a commit that referenced this issue Aug 24, 2022
Localizations for rols are not in the localization table, they are in the reg_group table. For those keys, their value has to be search in the reg_group
oscar9 added a commit that referenced this issue Aug 24, 2022
…ersion #101

If an issue has a minorVersion of 0, it has a different behaviour and it has to be fixed in the code.
@oscar9 oscar9 added this to the v2.4.0 milestone Oct 4, 2022
@oscar9 oscar9 added solved Solution developed and accepted, not yet deployed and removed ready for testing Solution is ready to test labels Oct 18, 2022
@oscar9 oscar9 closed this as completed Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved Solution developed and accepted, not yet deployed Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants