用于获取单个记录的IBM FEB 8.6 REST API失败

时间:2016-03-10 07:05:47

标签: java rest websphere-portal ibm-forms

我在点击FEB REST API获取记录时遇到以下错误。我正在传递Authorization标头并使用以下URL使用get请求,我使用Java来调用REST API。

如果我使用邮递员点击相同的网址,则效果非常好。

网址:http://localhost/forms-basic/secure/org/data/f0720c16-d4b8-442f-8674-2d7fbdab8afc/F_Form1/8d4dfeed-aa11-45fc-a958-23d62d9328cc

[3/10/16 6:37:57:293 GMT] 000000bd StandardExcep E com.ibm.form.nitro.platform.StandardExceptionMapper toResponse 1b6b206a-248c-4a4f-bb45-6bad1ee45b29
                                 java.lang.NullPointerException
    at com.ibm.form.nitro.endpoints.data.DataEntryPoint.getFormat(DataEntryPoint.java:1636)
    at com.ibm.form.nitro.endpoints.data.DataEntryPoint.getRecord(DataEntryPoint.java:965)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at com.ibm.form.platform.service.rest.jaxrs.model.RESTMethod.invoke(RESTMethod.java:345)
    at com.ibm.form.platform.service.rest.jaxrs.impl.RESTApplicationImpl._process(RESTApplicationImpl.java:1194)
    at com.ibm.form.platform.service.rest.jaxrs.impl.RESTApplicationImpl.restProcess(RESTApplicationImpl.java:391)
    at com.ibm.form.platform.service.rest.jaxrs.impl.RESTApplicationImpl.process(RESTApplicationImpl.java:355)
    at com.ibm.form.nitro.endpoints.RESTEntryPoint.performView(RESTEntryPoint.java:294)
    at com.ibm.form.platform.impl.dispatcher.simple.SimpleDispatcher.performServletWork(SimpleDispatcher.java:395)
    at com.ibm.form.platform.impl.front.internal.java.FrameworkJavaAccess.performServletWork(FrameworkJavaAccess.java:370)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at com.ibm.form.platform.front.access.servlet.SimplifiedPlatformAccessServlet.service(SimplifiedPlatformAccessServlet.java:85)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1230)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779)
    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
    at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1071)
    at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)
    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:914)
    at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:461)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:528)
    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:314)
    at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88)
    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
    at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
    at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
    at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
    at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
    at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
    at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1864)

1 个答案:

答案 0 :(得分:0)

我已在请求标头中将接受标头作为 application / atom + xml 传递,现在它正常运行,没有任何问题。