[ 
https://issues.apache.org/jira/browse/SHINDIG-1232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12991104#comment-12991104
 ] 

Paul Lindner commented on SHINDIG-1232:
---------------------------------------

Recent versions default to jsonconverter instead of throwing an NPE.  However 
you can fix your code to do the right thing:

Use setHeader("Content-Type", "application/xml")

http://www.gwtapps.com/doc/html/com.google.gwt.http.client.RequestBuilder.html#setHeader(java.lang.String,
 java.lang.String)



> NPE in DataServiceServlet.handleSingleRequest
> ---------------------------------------------
>
>                 Key: SHINDIG-1232
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1232
>             Project: Shindig
>          Issue Type: Bug
>          Components: Java
>    Affects Versions: 1.1-BETA5
>         Environment: Windiws XP;Jetty;Mozilla Firefox 3; GWT 1.7.1
>            Reporter: Alec Kotovich
>
> NPE in DataServiceServlet.handleSingleRequest
> When not from browser, but from GWT client module (via Request response = 
> builder.sendRequest(null, 
>                                         new RequestCallback()) I am trying to 
> access GET url 'social/rest/people/canonical/@friends?format=xml', i get this 
> NPE and status code is returned: 500, as follows: 
> OAuth realm="shindig"
> Content-Type  text/html; charset=iso-8859-1
> Content-Length        5848
> Server        Jetty(6.1.21)
> Заголовки запроса
> Host  localhost:8090
> User-Agent    Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.15) 
> Gecko/2009101601 Firefox/3.0.15 (.NET CLR 3.5.30729)
> Accept        text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
> Accept-Language       ru,en-us;q=0.7,en;q=0.3
> Accept-Encoding       gzip,deflate
> Accept-Charset        windows-1251,utf-8;q=0.7,*;q=0.7
> Keep-Alive    300
> Connection    keep-alive
> Content-Type  text/plain; charset=utf-8
> Referer       
> http://localhost:8090/xxx-webapp/usermodule/3B179AC54BC137C54C4EFFD45D94E80C.cache.html
> Cookie        JSESSIONID=5fruorpfavnn
> Stacktrace:
> java.lang.NullPointerException
>         at 
> org.apache.shindig.protocol.DataServiceServlet.handleSingleRequest(Da
> taServiceServlet.java:162)
>         at 
> org.apache.shindig.protocol.DataServiceServlet.executeRequest(DataSer
> viceServlet.java:108)
>         at 
> org.apache.shindig.protocol.DataServiceServlet.doGet(DataServiceServl
> et.java:53)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>         at 
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511
> )

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to