Prezados,
Estou com um problema no OAI-PMH que apresenta a mensagem de HTTP Status 500 – Internal Server Error OAI-PMH apenas em uma URL de paginação, exemplo: https://meurepositório.com/oai/request?verb=ListRecords&resumptionToken=xoai%2F%2F%2F%2F21100.
HTTP Status 500 – Internal Server Error
Type Exception Report
Message com.lyncode.xoai.dataprovider.exceptions.WritingXmlException: Error trying to output ‘’
Description The server encountered an unexpected condition that prevented it from fulfilling the request.
Exception
java.io.IOException: com.lyncode.xoai.dataprovider.exceptions.WritingXmlException: Error trying to output ‘’
org.dspace.xoai.services.impl.cache.DSpaceXOAICacheService.store(DSpaceXOAICacheService.java:113)
org.dspace.xoai.controller.DSpaceOAIDataProvider.contextAction(DSpaceOAIDataProvider.java:104)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:213)
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:126)
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96)
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617)
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578)
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
javax.servlet.http.HttpServlet.service(HttpServlet.java:655)
javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)Root Cause
com.lyncode.xoai.dataprovider.exceptions.WritingXmlException: Error trying to output ‘’
com.lyncode.xoai.dataprovider.xml.EchoElement.write(EchoElement.java:58)
com.lyncode.xoai.dataprovider.xml.oaipmh.MetadataType.write(MetadataType.java:78)
com.lyncode.xoai.dataprovider.xml.oaipmh.RecordType.write(RecordType.java:130)
com.lyncode.xoai.dataprovider.xml.oaipmh.ListRecordsType.write(ListRecordsType.java:110)
com.lyncode.xoai.util.XmlIOUtils.writeElement(XmlIOUtils.java:20)
com.lyncode.xoai.dataprovider.xml.oaipmh.OAIPMHtype.write(OAIPMHtype.java:286)
com.lyncode.xoai.dataprovider.xml.oaipmh.OAIPMH.write(OAIPMH.java:44)
org.dspace.xoai.services.impl.cache.DSpaceXOAICacheService.store(DSpaceXOAICacheService.java:97)
org.dspace.xoai.controller.DSpaceOAIDataProvider.contextAction(DSpaceOAIDataProvider.java:104)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:213)
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:126)
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96)
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617)
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578)
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
javax.servlet.http.HttpServlet.service(HttpServlet.java:655)
javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)Root Cause
com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at [row,col {unknown-source}]: [1,0]
com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:661)
com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2134)
com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2040)
com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
com.ctc.wstx.evt.WstxEventReader.nextEvent(WstxEventReader.java:196)
com.lyncode.xoai.dataprovider.xml.EchoElement.write(EchoElement.java:31)
com.lyncode.xoai.dataprovider.xml.oaipmh.MetadataType.write(MetadataType.java:78)
com.lyncode.xoai.dataprovider.xml.oaipmh.RecordType.write(RecordType.java:130)
com.lyncode.xoai.dataprovider.xml.oaipmh.ListRecordsType.write(ListRecordsType.java:110)
com.lyncode.xoai.util.XmlIOUtils.writeElement(XmlIOUtils.java:20)
com.lyncode.xoai.dataprovider.xml.oaipmh.OAIPMHtype.write(OAIPMHtype.java:286)
com.lyncode.xoai.dataprovider.xml.oaipmh.OAIPMH.write(OAIPMH.java:44)
org.dspace.xoai.services.impl.cache.DSpaceXOAICacheService.store(DSpaceXOAICacheService.java:97)
org.dspace.xoai.controller.DSpaceOAIDataProvider.contextAction(DSpaceOAIDataProvider.java:104)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.lang.reflect.Method.invoke(Method.java:498)
org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:213)
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:126)
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96)
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617)
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578)
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
javax.servlet.http.HttpServlet.service(HttpServlet.java:655)
javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
Note The full stack trace of the root cause is available in the server logs.Apache Tomcat/8.5.69
Em todas as pesquisas que realizei sobre esse erro mencionam que a solução é adicionar o parâmetro JAVA_OPTS=-Dfile.encoding=UTF-8 no tomcat, limpar o cache e reiniciar o tomcat. Eu já fiz todas as recomendações e já até reindexei todo o OAI-PMH e o problema permanece.
Como o problema é apenas nessa URL de paginação, tudo me leva a crer que seja um caractere inválido. Alguém sabe quais são os caracteres inválidos ou alguma combinação caracteres de não pode ser usada?