0
我目前正试图以流过新泽西州的REST服务的视频文件,并获得返回的响应神秘异常:视频流与新泽西
ERROR WebApplicationImpl - The RuntimeException could not be mapped to a response, re-throwing to the HTTP container java.lang.NullPointerException
at com.sun.jersey.core.util.KeyComparatorHashMap$Entry.hashCode(KeyComparatorHashMap.java:735)
at java.util.HashMap.getEntry(HashMap.java:344)
at java.util.HashMap.containsKey(HashMap.java:335)
at java.util.HashSet.contains(HashSet.java:184)
at com.sun.jersey.server.linking.impl.RefProcessor.processLinks(RefProcessor.java:85)
at com.sun.jersey.server.linking.impl.RefProcessor.processMember(RefProcessor.java:120)
at com.sun.jersey.server.linking.impl.RefProcessor.processLinks(RefProcessor.java:113)
at com.sun.jersey.server.linking.impl.RefProcessor.processMember(RefProcessor.java:120)
at com.sun.jersey.server.linking.impl.RefProcessor.processLinks(RefProcessor.java:113)
at com.sun.jersey.server.linking.impl.RefProcessor.processMember(RefProcessor.java:120)
....
创建响应代码如下所示:
return Response.ok(new StreamingOutput()
{
@Override
public void write(OutputStream output) throws WebApplicationException
{
PrintWriter out = new PrintWriter(output);
out.println("Foo");
out.close();
}
}, MediaType.MULTIPART_FORM_DATA).build();
(我已经删除了额外的范围标题和东西)。我在StreamingOutput.write()方法中有几个断点,但似乎没有达到。我有第二个休息方法返回视频作为完整的实体工作。
那么,有没有人想到异常意味着什么,我可以改进什么?谢谢!
首先理解:停用在web.xml中LinkFilter使事情工作 – Andreas 2012-02-17 07:59:10