You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Sarbashis Das <sa...@ericsson.com.INVALID> on 2021/09/06 14:31:15 UTC

Graph names accepted in Windows but not in linux

Hi Users,
                 I have been testing apache-jena-fuseki version 4.1.0. and found one issue with the graph name.

Previously I was using apache-jena-fuseki 3.14.0 and upload ttl files using python post request using graph names. As an example

http://localhost:3030/eva-dev/data?graph=http://www.mysite.com/eva/graph%23backhaul

(Graph names has “#” which is encoded as %23)

Now with fuseki v4.1.0, my python request failed with error as follow in linux and Mac

urllib3.exceptions.ProtocolError: ('Connection aborted.', BrokenPipeError(32, 'Broken pipe'))

During handling of the above exception, another exception occurred:

However it works with windows system

I am wondering what is the reason for this difference and how can I fix that. Below are some info to reproduce the issue

Apache-jena-fuseki-4.1.0
Java version:
java 12.0.1 2019-04-16
Java(TM) SE Runtime Environment (build 12.0.1+12)
Java HotSpot(TM) 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)

Python version: 3.8.2



Thanks in advance for your support

Regards,
Sarbashis


Re: Graph names accepted in Windows but not in linux

Posted by Andy Seaborne <an...@apache.org>.
Thanks - recorded as https://issues.apache.org/jira/browse/JENA-2156

The PR makes Linux work - I don't know why Windows is different.

In your original message:

 >> During handling of the above exception, another exception occurred:
 >>
 >> However it works with windows system

Was there some text missing after "occurred:"?

     Andy

On 07/09/2021 08:36, Sarbashis Das wrote:
> Hi Andy,
> 
>                  Thanks for the quick response.
> 
> Here are the logs:
> 
> *Test with windows (apache-jena-fuseki v4.1.0)*
> 
> 11:12:35 INFO  Fuseki          :: [2] POST 
> _http://localhost:3030/eva-dev/data?graph=http://www.ericsson.com/eva/graph%23backhaul 
> <http://localhost:3030/eva-dev/data?graph=http://www.ericsson.com/eva/graph%23backhaul>_
> 
> 11:12:37 INFO  Fuseki          :: [2] Body: Content-Length=18309874, 
> Content-Type=text/turtle, Charset=utf-8 => Turtle : Count=391385 
> Triples=391385 Quads=0
> 
> *Test with Linux (apache-jena-fuseki v4.1.0)*
> 
> 09:22:30 INFO  Fuseki          :: [1] POST 
> http://localhost:3030/eva-dev/data?graph=http://www.ericsson.com/eva/graph%23backhaul 
> <http://localhost:3030/eva-dev/data?graph=http://www.ericsson.com/eva/graph%23backhaul>
> 
> 09:22:30 INFO  Fuseki          :: [1] 400 Bad Request (15 ms)
> 
> I also attached complete log as well.
> 
> Thank you for your suggestion for the graph names
> 
> Regards,
> 
> Sarbashis
> 
> *From: *Andy Seaborne <an...@apache.org>
> *Date: *Monday, 6 September 2021 at 19:17
> *To: *users@jena.apache.org <us...@jena.apache.org>
> *Subject: *Re: Graph names accepted in Windows but not in linux
> 
> Hi there,
> 
> I can't explain the Linux/Windows difference.
> 
> Fuseki was wrong (it could double decode because the servlet API does
> decoding)
> 
> For Linux - looks like there is still a bug - it should work (I tried
> using using curl and a Fuseki server in Jetty).
> 
> What does the Fuseki log file say? The POST or PUT should be logged. Is
> it the same on Windows and Linux?
> 
> There seems to be missing text in your message - see below.
> 
> But.
> 
> Because "#" is fragment and there are several pieces of software that
> may be involved in %-encoding handling, it is best to not use '#' for a
> Graph Store Protocol graph name. You may find on other systems it
> remains as %23, which is not entirely wrong.
> 
>       Andy
> 
> On 06/09/2021 15:31, Sarbashis Das wrote:
>  > Hi Users,
>  >                   I have been testing apache-jena-fuseki version 
> 4.1.0. and found one issue with the graph name.
>  >
>  > Previously I was using apache-jena-fuseki 3.14.0 and upload ttl files 
> using python post request using graph names. As an example
>  >
>  > 
> http://localhost:3030/eva-dev/data?graph=http://www.mysite.com/eva/graph%23backhaul 
> <http://localhost:3030/eva-dev/data?graph=http://www.mysite.com/eva/graph%23backhaul>
>  >
>  > (Graph names has “#” which is encoded as %23)
>  >
>  > Now with fuseki v4.1.0, my python request failed with error as follow 
> in linux and Mac
>  >
>  > urllib3.exceptions.ProtocolError: ('Connection aborted.', 
> BrokenPipeError(32, 'Broken pipe'))
>  >
>  > During handling of the above exception, another exception occurred:
> 
> Is there something missing here?
> 
>  >
>  > However it works with windows system
>  >
>  > I am wondering what is the reason for this difference and how can I 
> fix that. Below are some info to reproduce the issue
>  >
>  > Apache-jena-fuseki-4.1.0
>  > Java version:
>  > java 12.0.1 2019-04-16
>  > Java(TM) SE Runtime Environment (build 12.0.1+12)
>  > Java HotSpot(TM) 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)
>  >
>  > Python version: 3.8.2
>  >
>  >
>  >
>  > Thanks in advance for your support
>  >
>  > Regards,
>  > Sarbashis
>  >
>  >
> 

Re: Graph names accepted in Windows but not in linux

Posted by Sarbashis Das <sa...@ericsson.com.INVALID>.
Hi Andy,
                Thanks for the quick response.

Here are the logs:

Test with windows (apache-jena-fuseki v4.1.0)

11:12:35 INFO  Fuseki          :: [2] POST http://localhost:3030/eva-dev/data?graph=http://www.ericsson.com/eva/graph%23backhaul
11:12:37 INFO  Fuseki          :: [2] Body: Content-Length=18309874, Content-Type=text/turtle, Charset=utf-8 => Turtle : Count=391385 Triples=391385 Quads=0

Test with Linux (apache-jena-fuseki v4.1.0)
09:22:30 INFO  Fuseki          :: [1] POST http://localhost:3030/eva-dev/data?graph=http://www.ericsson.com/eva/graph%23backhaul
09:22:30 INFO  Fuseki          :: [1] 400 Bad Request (15 ms)

I also attached complete log as well.

Thank you for your suggestion for the graph names

Regards,
Sarbashis



From: Andy Seaborne <an...@apache.org>
Date: Monday, 6 September 2021 at 19:17
To: users@jena.apache.org <us...@jena.apache.org>
Subject: Re: Graph names accepted in Windows but not in linux
Hi there,

I can't explain the Linux/Windows difference.

Fuseki was wrong (it could double decode because the servlet API does
decoding)

For Linux - looks like there is still a bug - it should work (I tried
using using curl and a Fuseki server in Jetty).

What does the Fuseki log file say? The POST or PUT should be logged. Is
it the same on Windows and Linux?

There seems to be missing text in your message - see below.

But.

Because "#" is fragment and there are several pieces of software that
may be involved in %-encoding handling, it is best to not use '#' for a
Graph Store Protocol graph name. You may find on other systems it
remains as %23, which is not entirely wrong.

     Andy

On 06/09/2021 15:31, Sarbashis Das wrote:
> Hi Users,
>                   I have been testing apache-jena-fuseki version 4.1.0. and found one issue with the graph name.
>
> Previously I was using apache-jena-fuseki 3.14.0 and upload ttl files using python post request using graph names. As an example
>
> http://localhost:3030/eva-dev/data?graph=http://www.mysite.com/eva/graph%23backhaul
>
> (Graph names has “#” which is encoded as %23)
>
> Now with fuseki v4.1.0, my python request failed with error as follow in linux and Mac
>
> urllib3.exceptions.ProtocolError: ('Connection aborted.', BrokenPipeError(32, 'Broken pipe'))
>
> During handling of the above exception, another exception occurred:

Is there something missing here?

>
> However it works with windows system
>
> I am wondering what is the reason for this difference and how can I fix that. Below are some info to reproduce the issue
>
> Apache-jena-fuseki-4.1.0
> Java version:
> java 12.0.1 2019-04-16
> Java(TM) SE Runtime Environment (build 12.0.1+12)
> Java HotSpot(TM) 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)
>
> Python version: 3.8.2
>
>
>
> Thanks in advance for your support
>
> Regards,
> Sarbashis
>
>

Re: Graph names accepted in Windows but not in linux

Posted by Andy Seaborne <an...@apache.org>.
Hi there,

I can't explain the Linux/Windows difference.

Fuseki was wrong (it could double decode because the servlet API does 
decoding)

For Linux - looks like there is still a bug - it should work (I tried 
using using curl and a Fuseki server in Jetty).

What does the Fuseki log file say? The POST or PUT should be logged. Is 
it the same on Windows and Linux?

There seems to be missing text in your message - see below.

But.

Because "#" is fragment and there are several pieces of software that 
may be involved in %-encoding handling, it is best to not use '#' for a 
Graph Store Protocol graph name. You may find on other systems it 
remains as %23, which is not entirely wrong.

     Andy

On 06/09/2021 15:31, Sarbashis Das wrote:
> Hi Users,
>                   I have been testing apache-jena-fuseki version 4.1.0. and found one issue with the graph name.
> 
> Previously I was using apache-jena-fuseki 3.14.0 and upload ttl files using python post request using graph names. As an example
> 
> http://localhost:3030/eva-dev/data?graph=http://www.mysite.com/eva/graph%23backhaul
> 
> (Graph names has “#” which is encoded as %23)
> 
> Now with fuseki v4.1.0, my python request failed with error as follow in linux and Mac
> 
> urllib3.exceptions.ProtocolError: ('Connection aborted.', BrokenPipeError(32, 'Broken pipe'))
> 
> During handling of the above exception, another exception occurred:

Is there something missing here?

> 
> However it works with windows system
> 
> I am wondering what is the reason for this difference and how can I fix that. Below are some info to reproduce the issue
> 
> Apache-jena-fuseki-4.1.0
> Java version:
> java 12.0.1 2019-04-16
> Java(TM) SE Runtime Environment (build 12.0.1+12)
> Java HotSpot(TM) 64-Bit Server VM (build 12.0.1+12, mixed mode, sharing)
> 
> Python version: 3.8.2
> 
> 
> 
> Thanks in advance for your support
> 
> Regards,
> Sarbashis
> 
>