[
https://issues.apache.org/jira/browse/JENA-433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13631574#comment-13631574
]
ArthurVaisse-Lesteven edited comment on JENA-433 at 4/15/13 8:08 AM:
---------------------------------------------------------------------
It seems that the bug come from this code:
[...]
if ( statusLine.getStatusCode() == 200 )
{
String contentType =
response.getFirstHeader(HttpNames.hContentType).getValue() ;
[...]
at org.apache.jena.riot.web.HttpOp.httpResponse(HttpOp.java:469) ( sorry for
the mistake about the line number! )
If no content type is received, the
"response.getFirstHeader(HttpNames.hContentType)" object is null, and
null.getValue() -> NullPointerException().
was (Author: avl):
It seems that the bug come from this code:
[...]
if ( statusLine.getStatusCode() == 200 )
{
String contentType =
response.getFirstHeader(HttpNames.hContentType).getValue() ;
[...]
at org.apache.jena.riot.web.HttpOp.httpResponse(HttpOp.java:469)
If no content type is received, the
"response.getFirstHeader(HttpNames.hContentType)" object is null, and
null.getValue() -> NullPointerException().
> Null Pointer Exception coming with a message without content type
> -----------------------------------------------------------------
>
> Key: JENA-433
> URL: https://issues.apache.org/jira/browse/JENA-433
> Project: Apache Jena
> Issue Type: Bug
> Components: Jena
> Affects Versions: Jena 2.10.0
> Reporter: ArthurVaisse-Lesteven
> Priority: Minor
> Labels: bug
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> I use Jena to send request to a Joseki SPARQL endpoint. With Jena 2.10.0,
> after each request i got a "NullPointerException".
> It seems that Joseki unlike Fuseki SPARQL endpoint doesn't send a content
> type, and the HttpOp class wait for this content type. But content type is
> suppose to be optional.
> I can't post the error trace here, but i remember it was coming from HttpOp
> l.442.
> I solved the problem by using the older version of Jena for the moment.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira