Re: Connection reset

2017-11-24 Thread Mohammad Noorani Bakerally
The same query:

PREFIX dcat: <http://www.w3.org/ns/dcat#>
PREFIX data: <http://opensensingcity.emse.fr/LDPDesign/data/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX : <http://opensensingcity.emse.fr/LDPDesignVocabulary/>
CONSTRUCT { <https://bistrotdepays.opendatasoft.com/id/theme/
Sport%2C%20Loisirs> ?p ?o . } WHERE {  <https://bistrotdepays.
opendatasoft.com/id/theme/Sport%2C%20Loisirs> ?p ?o . }

if %2C%20
<https://bistrotdepays.opendatasoft.com/id/theme/Sport%2C%20Loisirs> is
removed from https://bistrotdepays.opendatasoft.com/id/theme/Sport%2C%
20Loisirs, it works even with the prefix unexpanded


So, the query below works !!:

PREFIX dcat: <http://www.w3.org/ns/dcat#>
PREFIX data: <http://opensensingcity.emse.fr/LDPDesign/data/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX : <http://opensensingcity.emse.fr/LDPDesignVocabulary/>
CONSTRUCT { <https://bistrotdepays.opendatasoft.com/id/theme/SportLoisirs
<https://bistrotdepays.opendatasoft.com/id/theme/Sport%2C%20Loisirs>> ?p ?o
. } WHERE {  <https://bistrotdepays.opendatasoft.com/id/theme/SportLoisirs
<https://bistrotdepays.opendatasoft.com/id/theme/Sport%2C%20Loisirs>> ?p ?o
. }



‌

On Fri, Nov 24, 2017 at 2:02 PM, Mohammad Noorani Bakerally <
noorani.bakera...@gmail.com> wrote:

> A temporary solution for my problem, is that I expand the query and sends
> it, it's temporary because for logs or analysis of prefixes or whatever...
> it may not be the best thing to do
>
> Query gq = QueryFactory.create(Global.prefixes + queryStr);
> gq.setPrefixMapping(Global.prefixMap);
> gq.getPrologue().getPrefixMapping().clearNsPrefixMap();
> QueryExecution qe = QueryExecutionFactory.sparqlService(this.location, 
> gq.serialize());
>
>
>
>
> ‌
>
> On Fri, Nov 24, 2017 at 11:21 AM, Mohammad Noorani Bakerally <
> noorani.bakera...@gmail.com> wrote:
>
>> I think it's how the client is creating the request, since one client can
>> send it and get a reply and another cannot send or not properly creating it
>> such that low level programs cannot send the request, not sure though
>>
>> On 24 Nov 2017 10:58, "Andy Seaborne" <a...@apache.org> wrote:
>>
>>>
>>>
>>> On 24/11/17 09:30, Mohammad Noorani Bakerally wrote:
>>>
>>>> Just checked something, I've used the SPARQL Client YASGUI and the
>>>> sparql
>>>> query is answered properly, can we deduce that the issue is with the
>>>> client
>>>> ?
>>>>
>>>
>>> That would seem most likely, something on the network path from client
>>> to server - it is so hard to be definite about these low level errors.
>>>
>>> Andy
>>>
>>>
>>>>
>>>>
>>>> ‌
>>>>
>>>> On Fri, Nov 24, 2017 at 10:22 AM, Mohammad Noorani Bakerally <
>>>> noorani.bakera...@gmail.com> wrote:
>>>>
>>>> Yes, I'm going to check the logs, but so far, a query like SELECT *
>>>>> WHERE
>>>>> { ?s ?p ?o .} LIMIT 10 is properly handled and results is returned, I
>>>>> can
>>>>> share the sparql endpoint, it is http://opensensingcity.
>>>>> emse.fr/sparql/bistro, it's just for some testing purposes, so if I
>>>>> understand, if a query is answered, Fuseki must be properly configured
>>>>> with
>>>>> apache, the resets happens immediately and there is no delay, i've not
>>>>> checked the log but it seems the request doesn't even go to the server
>>>>>
>>>>>
>>>>> ‌
>>>>>
>>>>> On Fri, Nov 24, 2017 at 10:03 AM, Andy Seaborne <a...@apache.org>
>>>>> wrote:
>>>>>
>>>>> HttpException: -1 Unexpected error making the query:
>>>>>>> java.net.SocketException: Connection reset
>>>>>>>
>>>>>>
>>>>>> This is a problem at a low level in the networking stack (fake status
>>>>>> code -1 from Jena also says it's not an HTTP error).  The other end
>>>>>> responded with a TCP RST (the connection reset bit) which is attempt
>>>>>> to use
>>>>>> a connection the other end thinks is closed or does not exist.
>>>>>>
>>>>>> There are many reasons that can cause this - some kind of network
>>>>>> environmental issue between client and server.
>>>>>>
>>>>>> Having a reverse proxy (

Re: Connection reset

2017-11-24 Thread Mohammad Noorani Bakerally
A temporary solution for my problem, is that I expand the query and sends
it, it's temporary because for logs or analysis of prefixes or whatever...
it may not be the best thing to do

Query gq = QueryFactory.create(Global.prefixes + queryStr);
gq.setPrefixMapping(Global.prefixMap);
gq.getPrologue().getPrefixMapping().clearNsPrefixMap();
QueryExecution qe = QueryExecutionFactory.sparqlService(this.location,
gq.serialize());




‌

On Fri, Nov 24, 2017 at 11:21 AM, Mohammad Noorani Bakerally <
noorani.bakera...@gmail.com> wrote:

> I think it's how the client is creating the request, since one client can
> send it and get a reply and another cannot send or not properly creating it
> such that low level programs cannot send the request, not sure though
>
> On 24 Nov 2017 10:58, "Andy Seaborne" <a...@apache.org> wrote:
>
>>
>>
>> On 24/11/17 09:30, Mohammad Noorani Bakerally wrote:
>>
>>> Just checked something, I've used the SPARQL Client YASGUI and the sparql
>>> query is answered properly, can we deduce that the issue is with the
>>> client
>>> ?
>>>
>>
>> That would seem most likely, something on the network path from client to
>> server - it is so hard to be definite about these low level errors.
>>
>> Andy
>>
>>
>>>
>>>
>>> ‌
>>>
>>> On Fri, Nov 24, 2017 at 10:22 AM, Mohammad Noorani Bakerally <
>>> noorani.bakera...@gmail.com> wrote:
>>>
>>> Yes, I'm going to check the logs, but so far, a query like SELECT * WHERE
>>>> { ?s ?p ?o .} LIMIT 10 is properly handled and results is returned, I
>>>> can
>>>> share the sparql endpoint, it is http://opensensingcity.
>>>> emse.fr/sparql/bistro, it's just for some testing purposes, so if I
>>>> understand, if a query is answered, Fuseki must be properly configured
>>>> with
>>>> apache, the resets happens immediately and there is no delay, i've not
>>>> checked the log but it seems the request doesn't even go to the server
>>>>
>>>>
>>>> ‌
>>>>
>>>> On Fri, Nov 24, 2017 at 10:03 AM, Andy Seaborne <a...@apache.org>
>>>> wrote:
>>>>
>>>> HttpException: -1 Unexpected error making the query:
>>>>>> java.net.SocketException: Connection reset
>>>>>>
>>>>>
>>>>> This is a problem at a low level in the networking stack (fake status
>>>>> code -1 from Jena also says it's not an HTTP error).  The other end
>>>>> responded with a TCP RST (the connection reset bit) which is attempt
>>>>> to use
>>>>> a connection the other end thinks is closed or does not exist.
>>>>>
>>>>> There are many reasons that can cause this - some kind of network
>>>>> environmental issue between client and server.
>>>>>
>>>>> Having a reverse proxy (RP) in front of the Fuseki server is one
>>>>> possible
>>>>> cause e.g. when Fuseki isn't there but the reverse proxy is, there can
>>>>> be a
>>>>> rejection at the TCP level. Or the RP has rebooted reboot.
>>>>>
>>>>> There are many reasons (StackOverflow has many questions about this).
>>>>>
>>>>> Check the Fuseki server log - did the query even reach the server?
>>>>> Resets
>>>>> usually happen at the start (e.g after a long period of no use and the
>>>>> RP
>>>>> has timed the connection out (Fuseki, standalone, hasn't configured to
>>>>> Jetty to do this)..
>>>>>
>>>>> If it did reach the server, then some intermediate may have forcefully
>>>>> closed the connection.
>>>>>
>>>>>  Andy
>>>>>
>>>>>
>>>>> On 23/11/17 22:38, Mohammad Noorani Bakerally wrote:
>>>>>
>>>>> I am getting an exception when executing the following a valid
>>>>>> construct
>>>>>> query on Fuseki via jena. Any idea about this problem ?
>>>>>>
>>>>>> The query:
>>>>>> ==
>>>>>> PREFIX dcat: <http://www.w3.org/ns/dcat#>
>>>>>> PREFIX data: <http://opensensingcity.emse.fr/LDPDesign/data/>
>>>>>> PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
>>>>>> PREFIX : <http://opensensingcity.emse.fr/LDPDesignVocabulary/>

Re: Connection reset

2017-11-24 Thread Mohammad Noorani Bakerally
I think it's how the client is creating the request, since one client can
send it and get a reply and another cannot send or not properly creating it
such that low level programs cannot send the request, not sure though

On 24 Nov 2017 10:58, "Andy Seaborne" <a...@apache.org> wrote:

>
>
> On 24/11/17 09:30, Mohammad Noorani Bakerally wrote:
>
>> Just checked something, I've used the SPARQL Client YASGUI and the sparql
>> query is answered properly, can we deduce that the issue is with the
>> client
>> ?
>>
>
> That would seem most likely, something on the network path from client to
> server - it is so hard to be definite about these low level errors.
>
> Andy
>
>
>>
>>
>> ‌
>>
>> On Fri, Nov 24, 2017 at 10:22 AM, Mohammad Noorani Bakerally <
>> noorani.bakera...@gmail.com> wrote:
>>
>> Yes, I'm going to check the logs, but so far, a query like SELECT * WHERE
>>> { ?s ?p ?o .} LIMIT 10 is properly handled and results is returned, I can
>>> share the sparql endpoint, it is http://opensensingcity.
>>> emse.fr/sparql/bistro, it's just for some testing purposes, so if I
>>> understand, if a query is answered, Fuseki must be properly configured
>>> with
>>> apache, the resets happens immediately and there is no delay, i've not
>>> checked the log but it seems the request doesn't even go to the server
>>>
>>>
>>> ‌
>>>
>>> On Fri, Nov 24, 2017 at 10:03 AM, Andy Seaborne <a...@apache.org> wrote:
>>>
>>> HttpException: -1 Unexpected error making the query:
>>>>> java.net.SocketException: Connection reset
>>>>>
>>>>
>>>> This is a problem at a low level in the networking stack (fake status
>>>> code -1 from Jena also says it's not an HTTP error).  The other end
>>>> responded with a TCP RST (the connection reset bit) which is attempt to
>>>> use
>>>> a connection the other end thinks is closed or does not exist.
>>>>
>>>> There are many reasons that can cause this - some kind of network
>>>> environmental issue between client and server.
>>>>
>>>> Having a reverse proxy (RP) in front of the Fuseki server is one
>>>> possible
>>>> cause e.g. when Fuseki isn't there but the reverse proxy is, there can
>>>> be a
>>>> rejection at the TCP level. Or the RP has rebooted reboot.
>>>>
>>>> There are many reasons (StackOverflow has many questions about this).
>>>>
>>>> Check the Fuseki server log - did the query even reach the server?
>>>> Resets
>>>> usually happen at the start (e.g after a long period of no use and the
>>>> RP
>>>> has timed the connection out (Fuseki, standalone, hasn't configured to
>>>> Jetty to do this)..
>>>>
>>>> If it did reach the server, then some intermediate may have forcefully
>>>> closed the connection.
>>>>
>>>>  Andy
>>>>
>>>>
>>>> On 23/11/17 22:38, Mohammad Noorani Bakerally wrote:
>>>>
>>>> I am getting an exception when executing the following a valid construct
>>>>> query on Fuseki via jena. Any idea about this problem ?
>>>>>
>>>>> The query:
>>>>> ==
>>>>> PREFIX dcat: <http://www.w3.org/ns/dcat#>
>>>>> PREFIX data: <http://opensensingcity.emse.fr/LDPDesign/data/>
>>>>> PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
>>>>> PREFIX : <http://opensensingcity.emse.fr/LDPDesignVocabulary/>
>>>>> CONSTRUCT { <
>>>>> https://bistrotdepays.opendatasoft.com/id/theme/Sport%2C%20Loisirs> ?p
>>>>> ?o .
>>>>> } WHERE {  <
>>>>> https://bistrotdepays.opendatasoft.com/id/theme/Sport%2C%20Loisirs> ?p
>>>>> ?o .
>>>>> }
>>>>>
>>>>>
>>>>>
>>>>> The exception:
>>>>> 
>>>>> HttpException: -1 Unexpected error making the query:
>>>>> java.net.SocketException: Connection reset
>>>>>
>>>>> at org.apache.jena.sparql.engine.http.HttpQuery.rewrap(HttpQuer
>>>>> y.java:374)
>>>>> at org.apache.jena.sparql.engine.http.HttpQuery.execGet(HttpQue
>>>>> ry.java:337)
>>>>> at org.apache.jena.sparql.engine.http.HttpQuery.exec(HttpQuery.
>>>>> java:288)
>>>>> at
>>>>> org.apache.jena.sparql.engine.http.QueryEngineHTTP.execConst
>>>>> ructWorker(QueryEngineHTTP.java:465)
>>>>> at
>>>>> org.apache.jena.sparql.engine.http.QueryEngineHTTP.execModel
>>>>> (QueryEngineHTTP.java:428)
>>>>> at
>>>>> org.apache.jena.sparql.engine.http.QueryEngineHTTP.execConst
>>>>> ruct(QueryEngineHTTP.java:389)
>>>>> at
>>>>> org.apache.jena.sparql.engine.http.QueryEngineHTTP.execConst
>>>>> ruct(QueryEngineHTTP.java:384)
>>>>> at
>>>>> loader.configuration.SPARQLDataSource.executeGraphQuery(SPAR
>>>>> QLDataSource.java:43)
>>>>> at genPLDPD.Evaluation.evalRM(Evaluation.java:136)
>>>>>
>>>>>
>>>>
>>>
>>


Re: Connection reset

2017-11-24 Thread Mohammad Noorani Bakerally
Just checked something, I've used the SPARQL Client YASGUI and the sparql
query is answered properly, can we deduce that the issue is with the client
?



‌

On Fri, Nov 24, 2017 at 10:22 AM, Mohammad Noorani Bakerally <
noorani.bakera...@gmail.com> wrote:

> Yes, I'm going to check the logs, but so far, a query like SELECT * WHERE
> { ?s ?p ?o .} LIMIT 10 is properly handled and results is returned, I can
> share the sparql endpoint, it is http://opensensingcity.
> emse.fr/sparql/bistro, it's just for some testing purposes, so if I
> understand, if a query is answered, Fuseki must be properly configured with
> apache, the resets happens immediately and there is no delay, i've not
> checked the log but it seems the request doesn't even go to the server
>
>
> ‌
>
> On Fri, Nov 24, 2017 at 10:03 AM, Andy Seaborne <a...@apache.org> wrote:
>
>> > HttpException: -1 Unexpected error making the query:
>> > java.net.SocketException: Connection reset
>>
>> This is a problem at a low level in the networking stack (fake status
>> code -1 from Jena also says it's not an HTTP error).  The other end
>> responded with a TCP RST (the connection reset bit) which is attempt to use
>> a connection the other end thinks is closed or does not exist.
>>
>> There are many reasons that can cause this - some kind of network
>> environmental issue between client and server.
>>
>> Having a reverse proxy (RP) in front of the Fuseki server is one possible
>> cause e.g. when Fuseki isn't there but the reverse proxy is, there can be a
>> rejection at the TCP level. Or the RP has rebooted reboot.
>>
>> There are many reasons (StackOverflow has many questions about this).
>>
>> Check the Fuseki server log - did the query even reach the server? Resets
>> usually happen at the start (e.g after a long period of no use and the RP
>> has timed the connection out (Fuseki, standalone, hasn't configured to
>> Jetty to do this)..
>>
>> If it did reach the server, then some intermediate may have forcefully
>> closed the connection.
>>
>> Andy
>>
>>
>> On 23/11/17 22:38, Mohammad Noorani Bakerally wrote:
>>
>>> I am getting an exception when executing the following a valid construct
>>> query on Fuseki via jena. Any idea about this problem ?
>>>
>>> The query:
>>> ==
>>> PREFIX dcat: <http://www.w3.org/ns/dcat#>
>>> PREFIX data: <http://opensensingcity.emse.fr/LDPDesign/data/>
>>> PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
>>> PREFIX : <http://opensensingcity.emse.fr/LDPDesignVocabulary/>
>>> CONSTRUCT { <
>>> https://bistrotdepays.opendatasoft.com/id/theme/Sport%2C%20Loisirs> ?p
>>> ?o .
>>> } WHERE {  <
>>> https://bistrotdepays.opendatasoft.com/id/theme/Sport%2C%20Loisirs> ?p
>>> ?o .
>>> }
>>>
>>>
>>>
>>> The exception:
>>> 
>>> HttpException: -1 Unexpected error making the query:
>>> java.net.SocketException: Connection reset
>>>
>>> at org.apache.jena.sparql.engine.http.HttpQuery.rewrap(HttpQuer
>>> y.java:374)
>>> at org.apache.jena.sparql.engine.http.HttpQuery.execGet(HttpQue
>>> ry.java:337)
>>> at org.apache.jena.sparql.engine.http.HttpQuery.exec(HttpQuery.java:288)
>>> at
>>> org.apache.jena.sparql.engine.http.QueryEngineHTTP.execConst
>>> ructWorker(QueryEngineHTTP.java:465)
>>> at
>>> org.apache.jena.sparql.engine.http.QueryEngineHTTP.execModel
>>> (QueryEngineHTTP.java:428)
>>> at
>>> org.apache.jena.sparql.engine.http.QueryEngineHTTP.execConst
>>> ruct(QueryEngineHTTP.java:389)
>>> at
>>> org.apache.jena.sparql.engine.http.QueryEngineHTTP.execConst
>>> ruct(QueryEngineHTTP.java:384)
>>> at
>>> loader.configuration.SPARQLDataSource.executeGraphQuery(SPAR
>>> QLDataSource.java:43)
>>> at genPLDPD.Evaluation.evalRM(Evaluation.java:136)
>>>
>>
>


Re: Connection reset

2017-11-24 Thread Mohammad Noorani Bakerally
Yes, I'm going to check the logs, but so far, a query like SELECT * WHERE {
?s ?p ?o .} LIMIT 10 is properly handled and results is returned, I can
share the sparql endpoint, it is
http://opensensingcity.emse.fr/sparql/bistro, it's just for some testing
purposes, so if I understand, if a query is answered, Fuseki must be
properly configured with apache, the resets happens immediately and there
is no delay, i've not checked the log but it seems the request doesn't even
go to the server


‌

On Fri, Nov 24, 2017 at 10:03 AM, Andy Seaborne <a...@apache.org> wrote:

> > HttpException: -1 Unexpected error making the query:
> > java.net.SocketException: Connection reset
>
> This is a problem at a low level in the networking stack (fake status code
> -1 from Jena also says it's not an HTTP error).  The other end responded
> with a TCP RST (the connection reset bit) which is attempt to use a
> connection the other end thinks is closed or does not exist.
>
> There are many reasons that can cause this - some kind of network
> environmental issue between client and server.
>
> Having a reverse proxy (RP) in front of the Fuseki server is one possible
> cause e.g. when Fuseki isn't there but the reverse proxy is, there can be a
> rejection at the TCP level. Or the RP has rebooted reboot.
>
> There are many reasons (StackOverflow has many questions about this).
>
> Check the Fuseki server log - did the query even reach the server? Resets
> usually happen at the start (e.g after a long period of no use and the RP
> has timed the connection out (Fuseki, standalone, hasn't configured to
> Jetty to do this)..
>
> If it did reach the server, then some intermediate may have forcefully
> closed the connection.
>
> Andy
>
>
> On 23/11/17 22:38, Mohammad Noorani Bakerally wrote:
>
>> I am getting an exception when executing the following a valid construct
>> query on Fuseki via jena. Any idea about this problem ?
>>
>> The query:
>> ==
>> PREFIX dcat: <http://www.w3.org/ns/dcat#>
>> PREFIX data: <http://opensensingcity.emse.fr/LDPDesign/data/>
>> PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
>> PREFIX : <http://opensensingcity.emse.fr/LDPDesignVocabulary/>
>> CONSTRUCT { <
>> https://bistrotdepays.opendatasoft.com/id/theme/Sport%2C%20Loisirs> ?p
>> ?o .
>> } WHERE {  <
>> https://bistrotdepays.opendatasoft.com/id/theme/Sport%2C%20Loisirs> ?p
>> ?o .
>> }
>>
>>
>>
>> The exception:
>> 
>> HttpException: -1 Unexpected error making the query:
>> java.net.SocketException: Connection reset
>>
>> at org.apache.jena.sparql.engine.http.HttpQuery.rewrap(HttpQuer
>> y.java:374)
>> at org.apache.jena.sparql.engine.http.HttpQuery.execGet(HttpQue
>> ry.java:337)
>> at org.apache.jena.sparql.engine.http.HttpQuery.exec(HttpQuery.java:288)
>> at
>> org.apache.jena.sparql.engine.http.QueryEngineHTTP.execConst
>> ructWorker(QueryEngineHTTP.java:465)
>> at
>> org.apache.jena.sparql.engine.http.QueryEngineHTTP.execModel
>> (QueryEngineHTTP.java:428)
>> at
>> org.apache.jena.sparql.engine.http.QueryEngineHTTP.execConst
>> ruct(QueryEngineHTTP.java:389)
>> at
>> org.apache.jena.sparql.engine.http.QueryEngineHTTP.execConst
>> ruct(QueryEngineHTTP.java:384)
>> at
>> loader.configuration.SPARQLDataSource.executeGraphQuery(SPAR
>> QLDataSource.java:43)
>> at genPLDPD.Evaluation.evalRM(Evaluation.java:136)
>>
>


Connection reset

2017-11-23 Thread Mohammad Noorani Bakerally
I am getting an exception when executing the following a valid construct
query on Fuseki via jena. Any idea about this problem ?

The query:
==
PREFIX dcat: 
PREFIX data: 
PREFIX skos: 
PREFIX : 
CONSTRUCT { <
https://bistrotdepays.opendatasoft.com/id/theme/Sport%2C%20Loisirs> ?p ?o .
} WHERE {  <
https://bistrotdepays.opendatasoft.com/id/theme/Sport%2C%20Loisirs> ?p ?o .
}



The exception:

HttpException: -1 Unexpected error making the query:
java.net.SocketException: Connection reset

at org.apache.jena.sparql.engine.http.HttpQuery.rewrap(HttpQuery.java:374)
at org.apache.jena.sparql.engine.http.HttpQuery.execGet(HttpQuery.java:337)
at org.apache.jena.sparql.engine.http.HttpQuery.exec(HttpQuery.java:288)
at
org.apache.jena.sparql.engine.http.QueryEngineHTTP.execConstructWorker(QueryEngineHTTP.java:465)
at
org.apache.jena.sparql.engine.http.QueryEngineHTTP.execModel(QueryEngineHTTP.java:428)
at
org.apache.jena.sparql.engine.http.QueryEngineHTTP.execConstruct(QueryEngineHTTP.java:389)
at
org.apache.jena.sparql.engine.http.QueryEngineHTTP.execConstruct(QueryEngineHTTP.java:384)
at
loader.configuration.SPARQLDataSource.executeGraphQuery(SPARQLDataSource.java:43)
at genPLDPD.Evaluation.evalRM(Evaluation.java:136)
at genPLDPD.Evaluation.evalCM(Evaluation.java:53)
at genPLDPD.Evaluation.evalCM(Evaluation.java:67)
at genPLDPD.Evaluation.evalDD(Evaluation.java:33)
at Test7.virtualGraph(Test7.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at
com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
at
com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:237)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:210)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at
org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:139)
at
org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:155)
at
org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:284)
at
org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140)
at
org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
at
org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:261)
at
org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:165)
at
org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:167)
at
org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:272)
at
org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:124)
at
org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271)
at
org.apache.http.impl.client.cache.CachingExec.callBackend(CachingExec.java:592)
at
org.apache.http.impl.client.cache.CachingExec.handleCacheMiss(CachingExec.java:356)
at
org.apache.http.impl.client.cache.CachingExec.execute(CachingExec.java:275)
at
org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88)
at
org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at

SPARQL expand prefix

2017-11-23 Thread Mohammad Noorani Bakerally
Suppose I have a query like:

PREFIX  : 
PREFIX  data: 
PREFIX  dcat: \n\nCONSTRUCT \n  { \n<
https://bistrotdepays.opendatasoft.com/api/v2/catalog/datasets/animations_bistrots_de_pays>
?p ?o .\n  }\nWHERE\n  { <
https://bistrotdepays.opendatasoft.com/api/v2/catalog/datasets/animations_bistrots_de_pays>\n
 ?p  ?o\nFILTER ( ?p NOT IN (dcat:distribution) )\n  }


Is it possible to obtain a query where all prefixes have been expanded ? is
it not possible to load the query, expand it and serialize it ?

 I have tried the following which isn't working:

Query gq = QueryFactory.create(Global.prefixes + graphQuery);
gq.setPrefixMapping(Global.prefixMap);
Global.prefixMap.getNsPrefixMap().entrySet().stream().forEach(prefixEntry->{
gq.expandPrefixedName(prefixEntry.getKey());
});


‌


Re: Loading dataset with relative IRIs

2017-11-21 Thread Mohammad Noorani Bakerally
The link you gave I didn't, I was checking the RDFParser (
http://jena.apache.org/documentation/javadoc/arq/org/apache/jena/riot/RDFParser.html
),

thanks for the link,




‌

On Tue, Nov 21, 2017 at 4:03 PM, Martynas Jusevičius <marty...@atomgraph.com
> wrote:

> Yes. Did you look at the JavaDoc?
> https://jena.apache.org/documentation/javadoc/arq/org/
> apache/jena/riot/RDFDataMgr.html#read-org.apache.jena.
> query.Dataset-java.lang.String-java.lang.String-org.apache.jena.riot.Lang-
>
> On Tue, Nov 21, 2017 at 3:54 PM, Mohammad Noorani Bakerally <
> noorani.bakera...@gmail.com> wrote:
>
> > is it possible to explicitly set a base when loading the dataset ?
> >
> >
> >
> > ‌
> >
> > On Tue, Nov 21, 2017 at 3:46 PM, Martynas Jusevičius <
> > marty...@atomgraph.com
> > > wrote:
> >
> > > You cannot. RDF data model is based on absolute URIs.
> > >
> > > On Tue, Nov 21, 2017 at 3:35 PM, Mohammad Noorani Bakerally <
> > > noorani.bakera...@gmail.com> wrote:
> > >
> > > > I have a dataset in a trig file with resources having relative iris,
> > when
> > > > loading them with the method RDFDataMgr.loadDataset, all the relative
> > > IRIs
> > > > are converted to absolute iris, how can I prevent this, I want them
> to
> > > > retain their relative IRIs ? ‌
> > > >
> > >
> >
>


Re: Loading dataset with relative IRIs

2017-11-21 Thread Mohammad Noorani Bakerally
is it possible to explicitly set a base when loading the dataset ?



‌

On Tue, Nov 21, 2017 at 3:46 PM, Martynas Jusevičius <marty...@atomgraph.com
> wrote:

> You cannot. RDF data model is based on absolute URIs.
>
> On Tue, Nov 21, 2017 at 3:35 PM, Mohammad Noorani Bakerally <
> noorani.bakera...@gmail.com> wrote:
>
> > I have a dataset in a trig file with resources having relative iris, when
> > loading them with the method RDFDataMgr.loadDataset, all the relative
> IRIs
> > are converted to absolute iris, how can I prevent this, I want them to
> > retain their relative IRIs ? ‌
> >
>


Loading dataset with relative IRIs

2017-11-21 Thread Mohammad Noorani Bakerally
I have a dataset in a trig file with resources having relative iris, when
loading them with the method RDFDataMgr.loadDataset, all the relative IRIs
are converted to absolute iris, how can I prevent this, I want them to
retain their relative IRIs ? ‌


Re: Loading trig file directly with Fuseki

2017-11-19 Thread Mohammad Noorani Bakerally
no, there is no specific reason, was just asking if it is possible,


‌

On Sun, Nov 19, 2017 at 8:25 PM, ajs6f <aj...@apache.org> wrote:

> Did you have a reason to get Fuseki to serve directly from a file? If not,
> you might do better (depending on your use) to load your file into either
> an in-memory or TDB (persistent) store and let Fuseki work from that.
>
>
> ajs6f
>
> > On Nov 19, 2017, at 1:10 PM, Mohammad Noorani Bakerally <
> noorani.bakera...@gmail.com> wrote:
> >
> > I have a trig file containing a default graph and several named graphs.
> Can
> > Fuseki directly consume the file, because in the documentation [1], I see
> > that the default and named graph should be described.
> >
> > I have tried to load it in the two followings way but it doesn't work
> and I
> > get an exception
> >
> > Way1
> > ==
> > <#dataset1>rdf:type ja:RDFDataset ;
> >rdfs:label "Dataset 1: RDF LinkGeoData for Strasbourg" ;
> >ja:content [ja:externalContent  ] ;
> >
> >
> > How to write the configuration so that the dataset of a service is a trig
> > file containing one default graph and several named graphs ?
> >
> > 1. https://jena.apache.org/documentation/serving_data/
> >
> > ‌
>
>


Loading trig file directly with Fuseki

2017-11-19 Thread Mohammad Noorani Bakerally
I have a trig file containing a default graph and several named graphs. Can
Fuseki directly consume the file, because in the documentation [1], I see
that the default and named graph should be described.

I have tried to load it in the two followings way but it doesn't work and I
get an exception

Way1
==
<#dataset1>rdf:type ja:RDFDataset ;
rdfs:label "Dataset 1: RDF LinkGeoData for Strasbourg" ;
ja:content [ja:externalContent  ] ;


How to write the configuration so that the dataset of a service is a trig
file containing one default graph and several named graphs ?

1. https://jena.apache.org/documentation/serving_data/

‌


Re: Core dump

2017-11-19 Thread Mohammad Noorani Bakerally
Ok, thanks for the insights,




‌

On Sun, Nov 19, 2017 at 2:38 PM, Andy Seaborne <a...@apache.org> wrote:

> Hi there,
>
> If you get a core dump, the JVM has crashed and it's a platform issue.
> There isn't anything in Jena that can cause this - it's pure java.  All the
> event log seems to say is that some parts of Jena were JIT'ed just prior to
> the crash.
>
> Andy
>
>
> On 19/11/17 09:41, Mohammad Noorani Bakerally wrote:
>
>> I am getting a core dump. It is not always occurring. I am doing a
>> performance test on a java application. A python script is executing the
>> jar several times and the dump start to occur after the 5th occurence. I
>> cannot say for sure if its because of Jena but this is what appears in the
>> compilation events:
>>
>>
>> Compilation events (10 events):
>> Event: 11,376 Thread 0x7f2290209000 nmethod 4045 0x7f2281eb3390
>> code [0x7f2281eb3500, 0x7f2281eb3718]
>> Event: 11,450 Thread 0x7f229020c000 4046   4
>>  org.apache.jena.sparql.algebra.AlgebraGenerator:: (20 bytes)
>> Event: 11,454 Thread 0x7f229020c000 nmethod 4046 0x7f2281eb2d50
>> code [0x7f2281eb2ee0, 0x7f2281eb3188]
>> Event: 11,484 Thread 0x7f229020d800 4047   4
>>  org.apache.jena.sparql.engine.QueryExecutionBase::startQueryIterator
>> (191 bytes)
>> Event: 11,494 Thread 0x7f2290209000 4048   4
>> java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync:: (5
>> bytes)
>> Event: 11,494 Thread 0x7f229020c000 4049   4
>> java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock:: (13
>> bytes)
>> Event: 11,494 Thread 0x7f229020c000 nmethod 4049 0x7f2281eb5890
>> code [0x7f2281eb59e0, 0x7f2281eb5a78]
>> Event: 11,494 Thread 0x7f229020c000 4050   4
>> java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock:: (13
>> bytes)
>> Event: 11,495 Thread 0x7f229020c000 nmethod 4050 0x7f2281ec3850
>> code [0x7f2281ec39a0, 0x7f2281ec3a38]
>> Event: 11,496 Thread 0x7f2290209000 nmethod 4048 0x7f2281ec3490
>> code [0x7f2281ec35e0, 0x7f2281ec3718]
>>
>> The entire log can be found in the attached file. Any reason why this is
>> occuring ?
>>
>> thanks
>> Noor
>> ‌
>>
>


Core dump

2017-11-19 Thread Mohammad Noorani Bakerally
I am getting a core dump. It is not always occurring. I am doing a
performance test on a java application. A python script is executing the
jar several times and the dump start to occur after the 5th occurence. I
cannot say for sure if its because of Jena but this is what appears in the
compilation events:


Compilation events (10 events):
Event: 11,376 Thread 0x7f2290209000 nmethod 4045 0x7f2281eb3390
code [0x7f2281eb3500, 0x7f2281eb3718]
Event: 11,450 Thread 0x7f229020c000 4046   4
org.apache.jena.sparql.algebra.AlgebraGenerator:: (20 bytes)
Event: 11,454 Thread 0x7f229020c000 nmethod 4046 0x7f2281eb2d50
code [0x7f2281eb2ee0, 0x7f2281eb3188]
Event: 11,484 Thread 0x7f229020d800 4047   4
org.apache.jena.sparql.engine.QueryExecutionBase::startQueryIterator (191
bytes)
Event: 11,494 Thread 0x7f2290209000 4048   4
java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync:: (5
bytes)
Event: 11,494 Thread 0x7f229020c000 4049   4
java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock:: (13
bytes)
Event: 11,494 Thread 0x7f229020c000 nmethod 4049 0x7f2281eb5890
code [0x7f2281eb59e0, 0x7f2281eb5a78]
Event: 11,494 Thread 0x7f229020c000 4050   4
java.util.concurrent.locks.ReentrantReadWriteLock$WriteLock:: (13
bytes)
Event: 11,495 Thread 0x7f229020c000 nmethod 4050 0x7f2281ec3850
code [0x7f2281ec39a0, 0x7f2281ec3a38]
Event: 11,496 Thread 0x7f2290209000 nmethod 4048 0x7f2281ec3490
code [0x7f2281ec35e0, 0x7f2281ec3718]

The entire log can be found in the attached file. Any reason why this is
occuring ?

thanks
Noor
‌
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x7f2295df7a40, pid=1790, tid=0x7f227fd45700
#
# JRE version: Java(TM) SE Runtime Environment (8.0_151-b12) (build 1.8.0_151-b12)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.151-b12 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V  [libjvm.so+0x906a40]  ObjArrayKlass::oop_follow_contents(ParCompactionManager*, oopDesc*)+0x160
#
# Core dump written. Default location: /media/noor/e8578437-49dc-4f76-94c0-62bb54b4ae60/tests/stats/core or core.1790
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
#

---  T H R E A D  ---

Current thread (0x7f2290024800):  GCTaskThread [stack: 0x7f227fc45000,0x7f227fd46000] [id=1798]

siginfo: si_signo: 11 (SIGSEGV), si_code: 128 (SI_KERNEL), si_addr: 0x

Registers:
RAX=0x7f2277bd1000, RBX=0x7f22964baf80, RCX=0x0001, RDX=0x007ffc9c7000
RSP=0x7f227fd447f0, RBP=0x7f227fd44860, RSI=0x0002, RDI=0x0006cbc629a0
R8 =0x0006cbc629a0, R9 =0x0010, R10=0x002a, R11=0x7f22964b6f60
R12=0x0008, R13=0x0006cbc62ad0, R14=0x0006cc61df20, R15=0x7f22901032a0
RIP=0x7f2295df7a40, EFLAGS=0x00010202, CSGSFS=0x0033, ERR=0x
  TRAPNO=0x000d

Top of Stack: (sp=0x7f227fd447f0)
0x7f227fd447f0:   0006cbc629a0 0006cbc62aec
0x7f227fd44800:   004f 0006cbc62980
0x7f227fd44810:   0007c018a5d8 7f22901032e0
0x7f227fd44820:   7f229645e7c0 004f
0x7f227fd44830:   0006ca402370 7f22964b6f60
0x7f227fd44840:   7f22901032a0 7f22964baf80
0x7f227fd44850:   0006cc61df20 0003
0x7f227fd44860:   7f227fd449f0 7f2295e70ea2
0x7f227fd44870:   0007c0001940 0006cc61df20
0x7f227fd44880:   7f22901032b0 7f227fd449a0
0x7f227fd44890:   7f227fd44970 7f227fd44950
0x7f227fd448a0:   7f227fd44940 7f227fd44930
0x7f227fd448b0:   7f227fd44920 7f227fd44910
0x7f227fd448c0:   7f22964abeb9 7f2290103360
0x7f227fd448d0:   0006cc5ba710 0006cd54f928
0x7f227fd448e0:   7f22901032b0 7f227fd44a00
0x7f227fd448f0:   00026c81 00018e00
0x7f227fd44900:   7f22901032e0 7f227fd449b8
0x7f227fd44910:   7f227fd44980 7f227fd44970
0x7f227fd44920:   7f22964abeb9 7f2290103360
0x7f227fd44930:   0006cd54efb8 0006d2d26c90
0x7f227fd44940:   0006cc5ba710 00018e00
0x7f227fd44950:   0006cc5ba710 00018c00
0x7f227fd44960:   7f22901032e0 7f227fd44a18
0x7f227fd44970:   03a30013 7f2295e57890
0x7f227fd44980:   03a40013 7f22901c3f00
0x7f227fd44990:   011b 0400
0x7f227fd449a0:   093c0488 0400
0x7f227fd449b0:   093d0488 0006cbc629a0
0x7f227fd449c0:   7f22901c3f00 7f227fd44ad0
0x7f227fd449d0:   7f22964baf80 0003
0x7f227fd449e0:   7f22901032a0 0006cc61c720 

Instructions: (pc=0x7f2295df7a40)
0x7f2295df7a20:   

java.lang.ExceptionInInitializerError when running jar

2017-11-07 Thread Mohammad Noorani Bakerally
My java application perfectly fine. But when running it, i am getting the
following error:

Exception in thread "main" java.lang.ExceptionInInitializerError
at 
fr.emse.opensensingcity.configuration.ConfigurationFactory.createConfiguration(ConfigurationFactory.java:25)
at fr.emse.opensensingcity.main.main(main.java:75)Caused by:
java.lang.NullPointerException
at 
org.apache.jena.tdb.sys.EnvTDB.processGlobalSystemProperties(EnvTDB.java:33)
at org.apache.jena.tdb.TDB.init(TDB.java:248)
at org.apache.jena.tdb.sys.InitTDB.start(InitTDB.java:29)
at org.apache.jena.system.JenaSystem.lambda$init$43(JenaSystem.java:119)
at java.util.ArrayList.forEach(ArrayList.java:1249)
at org.apache.jena.system.JenaSystem.forEach(JenaSystem.java:194)
at org.apache.jena.system.JenaSystem.forEach(JenaSystem.java:171)
at org.apache.jena.system.JenaSystem.init(JenaSystem.java:117)
at org.apache.jena.riot.RDFDataMgr.(RDFDataMgr.java:79)
... 2 more


I am having the same problem as documented in this question [1] but the
solution does not solve my problem. The solution says to add some details
with the Shade plugin, below is an extract of my pom file about the Shade
plugin. The entire pom file can be found here:
https://github.com/noorbakerally/LDPizer/blob/master/pom.xml

‌1.
https://stackoverflow.com/questions/36755846/jena-tdb-java-lang-exceptionininitializererror/36769519?noredirect=1#comment80526243_36769519

This seems to be a configuration problem and I don't know much how to solve
this, the referenced question is the only documentation i've found
regarding this problem,
any idea of how I can solve this ?

Thanks
Noor