Dspace OAI - Estado HTTP 500 - 请求处理失败;嵌套异常是java.lang.NullPointerException

时间:2018-01-16 23:10:41

标签: java repository dspace oai

当我们可以访问: http://dspace/oai/request?verb=ListRecords&metadataPrefix=oai_dc 我们有以下错误:

ene 16, 2018 12:54:02 PM org.apache.catalina.core.StandardWrapperValve invoke
GRAVE: El Servlet.service() para el servlet [oai] en el contexto con ruta [/oai] lanzó la excepción [Request processing failed; nested exception is java.lang.NullPointerException] con causa raíz
java.lang.NullPointerException
        at org.apache.xalan.transformer.TransformerImpl.setOutputProperty(TransformerImpl.java:966)
        at com.lyncode.xoai.util.XSLPipeline.apply(XSLPipeline.java:24)
        at com.lyncode.xoai.dataprovider.handlers.ListRecordsHandler.createRecord(ListRecordsHandler.java:159)
        at com.lyncode.xoai.dataprovider.handlers.ListRecordsHandler.handle(ListRecordsHandler.java:124)
        at com.lyncode.xoai.dataprovider.OAIDataProvider.handle(OAIDataProvider.java:213)
        at org.dspace.xoai.controller.DSpaceOAIDataProvider.contextAction(DSpaceOAIDataProvider.java:104)
        at sun.reflect.GeneratedMethodAccessor127.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:213)
        at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:126)
        at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:96)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:617)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:578)
        at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
        at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:190)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:748)

我们使用以下方法尝试导入并清除oai的缓存:

./ dspace oai import -c

./ dsapce oai clear-cache

但错误仍然存​​在 谢谢你的帮助。

1 个答案:

答案 0 :(得分:0)

https://issues.apache.org/jira/browse/XALANJ-2568开始,这可能与角色编码有关。在命令行上运行oai命令时,是否使用UTF8字符编码?您的DSpace是否已针对UTF8正确设置?例如,请参阅official DSpace installation instructions

中的设置说明