You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Andrea Turbati <tu...@info.uniroma2.it> on 2018/06/21 14:43:28 UTC
problem with SPARQL query with GROUP_CONCAT
Hi everyone,
I've found a strange behaviour when executing a SPARQL query having
GROUP_CONCAT on a Jena-Fuseki SPARQL endpoint.
Executing, for example, the following query:
SELECT DISTINCT ?resource (GROUP_CONCAT( ?singleLabel; separator=",")
AS ?multiLabel )
WHERE {
?resource a <http://www.w3.org/2004/02/skos/core#Concept> .
?resource (<http://www.w3.org/2008/05/skos-xl#prefLabel> |
<http://www.w3.org/2008/05/skos-xl#altLabel>) ?skosxlLabel .
?skosxlLabel <http://www.w3.org/2008/05/skos-xl#literalForm>
?singleLabel .
FILTER regex(str(?singleLabel), 'dog', 'i')
}
GROUP BY ?resource
on the AGROVOC SPARQL endpoint at
http://agrovoc.uniroma2.it:3030/agrovoc/sparql (it's using
apache-jena-fuseki-3.6.0 and it has no GUI, so you need to use another
GUI, for example http://yasgui.org/ ) you get no answer, unless you do
such query from one of Tor Vergata IPs (Tor Vergata is hosting such
SPARQL endpoint).
If I remove
(GROUP_CONCAT( ?singleLabel; separator=",") AS ?multiLabel )
then I'm able to execute such query from every where.
Does any of you know why I get such strange behaviour? How can I fix the
problem (apart from doing a SPARQL query without the GROUP )
Thank you for your answer
Cheers
Andrea
--
-------------------------------------------------
Dott. Andrea Turbati, PhD
AI Research Group,
Dept. of Enterprise Engineering
University of Roma, Tor Vergata
Via del Politecnico 1 00133 ROMA (ITALY)
tel: +39 06 7259 7334
lab: +39 06 7259 7332
e_mail: turbati@info.uniroma2.it
home page: http://art.uniroma2.it/turbati/
--------------------------------------------------
Re: problem with SPARQL query with GROUP_CONCAT
Posted by Rob Vesse <rv...@dotnetrdf.org>.
On 22/06/2018, 10:04, "turbati@disp.uniroma2.it" <tu...@disp.uniroma2.it> wrote:
I do not understand what do you mean with the last sentence:
"Connection reset by peer" is something to take up with the operators
of the service as is the different behaviour from different places
This is a low-level error from the Java networking stack meaning that the remote server forcibly closed the connection. Usually this happens because something went wrong at the remote end. Therefore you would need to talk to the operators of the service because any error reporting/logging would happen at their end.
Essentially we as the developers of Apache Jena are not able to debug other people's usage of our software. As Andy was implying we don't know the details of their environment nor whether they have customised Fuseki in any way or put proxies, caches or other software layers in front of it that might be interfering. The fact that behaviour differs depending on your originating IP would tend to imply some kind of network filtering being involved.
Therefore you need to report this problem to the operators of that service so that they can investigate appropriately.
Rob
Re: problem with SPARQL query with GROUP_CONCAT
Posted by tu...@disp.uniroma2.it.
Hi Andy,
thank you for the answer.
Yes, it seems that if in the query there is the string GROUP_CONCAT
(so even if it is commented and not executed), Fuseki stop the
connection (maybe a preprocessing searching for such construct?).
I do not understand what do you mean with the last sentence:
"Connection reset by peer" is something to take up with the operators
of the service as is the different behaviour from different places
Cheers
Andrea
Def. Quota Andy Seaborne <an...@apache.org>:
> Andrea,
>
> It does not appear to be the GROUP_CONCAT.
>
> I get "Connection reset by peer" when its commented out. Maybe there
> is some sort of intermediate process - if the GROUP_CONCAT with ()
> is in a comment, it does not work; if it is omitted completely it
> does.
>
> "Connection reset by peer" is something to take up with the
> operators of the service as is the different behaviour from
> different places.
>
> Andy
>
> On 21/06/18 15:43, Andrea Turbati wrote:
>> Hi everyone,
>>
>> I've found a strange behaviour when executing a SPARQL query having
>> GROUP_CONCAT on a Jena-Fuseki SPARQL endpoint.
>>
>> Executing, for example, the following query:
>>
>>
>> SELECT DISTINCT ?resource (GROUP_CONCAT( ?singleLabel;
>> separator=",") AS ?multiLabel )
>>
>> WHERE {
>> ?resource a <http://www.w3.org/2004/02/skos/core#Concept> .
>> ?resource (<http://www.w3.org/2008/05/skos-xl#prefLabel> |
>> <http://www.w3.org/2008/05/skos-xl#altLabel>) ?skosxlLabel .
>> ?skosxlLabel <http://www.w3.org/2008/05/skos-xl#literalForm>
>> ?singleLabel .
>> FILTER regex(str(?singleLabel), 'dog', 'i')
>>
>> }
>> GROUP BY ?resource
>>
>>
>> on the AGROVOC SPARQL endpoint at
>> http://agrovoc.uniroma2.it:3030/agrovoc/sparql (it's using
>> apache-jena-fuseki-3.6.0 and it has no GUI, so you need to use
>> another GUI, for example http://yasgui.org/ ) you get no answer,
>> unless you do such query from one of Tor Vergata IPs (Tor Vergata
>> is hosting such SPARQL endpoint).
>>
>> If I remove
>>
>> (GROUP_CONCAT( ?singleLabel; separator=",") AS ?multiLabel )
>>
>> then I'm able to execute such query from every where.
>>
>>
>> Does any of you know why I get such strange behaviour? How can I
>> fix the problem (apart from doing a SPARQL query without the GROUP )
>>
>>
>> Thank you for your answer
>>
>>
>> Cheers
>>
>>
>> Andrea
>>
>>
Re: problem with SPARQL query with GROUP_CONCAT
Posted by Andy Seaborne <an...@apache.org>.
Andrea,
It does not appear to be the GROUP_CONCAT.
I get "Connection reset by peer" when its commented out. Maybe there is
some sort of intermediate process - if the GROUP_CONCAT with () is in a
comment, it does not work; if it is omitted completely it does.
"Connection reset by peer" is something to take up with the operators of
the service as is the different behaviour from different places.
Andy
On 21/06/18 15:43, Andrea Turbati wrote:
> Hi everyone,
>
> I've found a strange behaviour when executing a SPARQL query having
> GROUP_CONCAT on a Jena-Fuseki SPARQL endpoint.
>
> Executing, for example, the following query:
>
>
> SELECT DISTINCT ?resource (GROUP_CONCAT( ?singleLabel; separator=",")
> AS ?multiLabel )
>
> WHERE {
> ?resource a <http://www.w3.org/2004/02/skos/core#Concept> .
> ?resource (<http://www.w3.org/2008/05/skos-xl#prefLabel> |
> <http://www.w3.org/2008/05/skos-xl#altLabel>) ?skosxlLabel .
> ?skosxlLabel <http://www.w3.org/2008/05/skos-xl#literalForm>
> ?singleLabel .
> FILTER regex(str(?singleLabel), 'dog', 'i')
>
> }
> GROUP BY ?resource
>
>
> on the AGROVOC SPARQL endpoint at
> http://agrovoc.uniroma2.it:3030/agrovoc/sparql (it's using
> apache-jena-fuseki-3.6.0 and it has no GUI, so you need to use another
> GUI, for example http://yasgui.org/ ) you get no answer, unless you do
> such query from one of Tor Vergata IPs (Tor Vergata is hosting such
> SPARQL endpoint).
>
> If I remove
>
> (GROUP_CONCAT( ?singleLabel; separator=",") AS ?multiLabel )
>
> then I'm able to execute such query from every where.
>
>
> Does any of you know why I get such strange behaviour? How can I fix the
> problem (apart from doing a SPARQL query without the GROUP )
>
>
> Thank you for your answer
>
>
> Cheers
>
>
> Andrea
>
>