You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@marmotta.apache.org by Fabian Cretton <Fa...@hevs.ch> on 2014/09/08 15:50:20 UTC

Marmotta 3.2.1 - Having problem to trigger the LDCache

Hi,
 
Today I tried without success to setup the LDCache from the Marmotta interface.
 
A first thing is that it is not clearly stated, in my opinion, when the LDCache is triggered.
 
The only further information I found was here:
http://markmail.org/message/m3ft65du5kbuzy5z#query:+page:1+mid:j347sjyegwshvhc7+state:results
and thus I understood that the SPARQL interface don't interact with LDCache, but the LDPath functionality does.
Is there anything else then running a LPath that would trigger the cache ?
 
First of all, I see this error when launching Marmotta 3.2.1, could it be related to my problems ?
INFO: Server startup in 11332 ms
15:25:45.495 WARN  - pattern (C:\marmotta_inst\marmotta-home/resources|http://wh55650:8080/marmotta/resource/|urn:).* is not a valid regular expression; disabling reader/writer filesystem (message was Illegal/unsupported escape sequence near index 4
(C:\marmotta_inst\marmotta-home/resources|http://wh55650:8080/marmotta/resource/|urn:).*    ^)
 
My "ldcache.enabled" parameter is checked.
 
I guess my problem is with setting up the end-point correctly.
 
I first tried the provided sample "load sample -> dbpedia", which gives in the interface:
kind: ld cache
Prefix: http://dbpedia\.org.*
Endpoint: http://dbpedia.org/sparql
 
But a few things are already not clear for me:
* kind: ld cache
When referring to a sparql end-point, shouldn't the kind be "sparkl" ? (I did try changing this, but with no success)
By the way, what is the meaning of the "cache" mode, I can't understand from reading the explanation. Is it a server that servers "linked data" ? if so, what is the difference with "linked data".
* prefix: 
What are the "rules" to define those prefixes ? for instance I see in the example that "." are escaped ?
Defining a prefix as "http://dbpedia\.org ( http://dbpedia/.org ).*" will thus mean that a URI as http://dbpedia.org/resource/Europe is bound to that end-point, right ?
*endpoint:
The explanation says that for a SPARQL end-point, some parameters have to be specified:
"http://sparql.sindice.com/sparql?default-graph-uri=&query={query}&format={contenttype}"
Is this mandatory ? (as the provided sample don't specify them but just specifies "http://dbpedia.org/sparql"), are there default values ?
*mimetype:
Not filled by the sample, are their default values depending on the "mode of operation" ?
 
If it is possible to get a few full examples of those settings, for the different operation modes, it would be very helpful I guess.
 
Than, after trying different configurations, I tried from the LDPath interface to add the URI "http://dbpedia.org/resource/Europe" and the LDPath "rdfs:label :: xsd:string".
When hitting "Test", a message appears next to the button: resource http://dbpedia.org/resource/Europe does not exist.
 
It seems I don't see any corresponding message neither in the console nor in the marmotta-main.log.
 
I tried so many different configurations, on different SPARQL end-point, also trying a "linked data" as DBPedia does provide the content negociation mecanism,  but without success.
 
Finally I tried to run a:

curl http://wh55650:8080/marmotta/cache/live?uri=http://dbpedia.org/resource/Europe
and it did return the rdf/xml file. But what I discovered then is that even without configuring any 'end-point' in Marmotta, this command was succeeding every time, so I think this command is not a sign that my end-point is well configured ? Except maybe if I was dealing with data that are not provided as derefencable "linked data" ?
I also tried on my local version 3.3.0, but with the same results. And also with the same WARNING when starting Marmotta.
Thank you for any help.
Fabian
 
 
 

Rép. : Marmotta 3.2.1 - Having problem to trigger the LDCache

Posted by Fabian Cretton <Fa...@hevs.ch>.
One more information.
Today I tried from scratch, reinstalling Marmotta, creating the end-point from the load sample.
And then querying "http://dbpedia.org/resource/Europe" with LDPath.
 
LDPath result was: resource http://dbpedia.org/resource/Europe does not exist
 
But I had one error message in the console:

07:38:52.962 ERROR - the HTTP request failed (status: HTTP/1.1 406 Unacceptable)
07:38:52.963 ERROR - HTTP client error while trying to retrieve resource http://dbpedia.org/resource/Europe: the HTTP request failed (status: HTTP/1.1 406 Unacceptable)
 
After that I tried again, but this message didn't come up again.
 
I don't think it comes from some firewall settings we have internally, but I'll check about that.
 
Thank you for any help
Fabian
 
 

>>> "Fabian Cretton" <Fa...@hevs.ch> 08.09.2014 15:50 >>>
Hi,
 
Today I tried without success to setup the LDCache from the Marmotta interface.
 
A first thing is that it is not clearly stated, in my opinion, when the LDCache is triggered.
 
The only further information I found was here:
http://markmail.org/message/m3ft65du5kbuzy5z#query:+page:1+mid:j347sjyegwshvhc7+state:results
and thus I understood that the SPARQL interface don't interact with LDCache, but the LDPath functionality does.
Is there anything else then running a LPath that would trigger the cache ?
 
First of all, I see this error when launching Marmotta 3.2.1, could it be related to my problems ?
INFO: Server startup in 11332 ms
15:25:45.495 WARN  - pattern (C:\marmotta_inst\marmotta-home/resources|http://wh55650:8080/marmotta/resource/|urn:).* is not a valid regular expression; disabling reader/writer filesystem (message was Illegal/unsupported escape sequence near index 4
(C:\marmotta_inst\marmotta-home/resources|http://wh55650:8080/marmotta/resource/|urn:).*    ^)
 
My "ldcache.enabled" parameter is checked.
 
I guess my problem is with setting up the end-point correctly.
 
I first tried the provided sample "load sample -> dbpedia", which gives in the interface:
kind: ld cache
Prefix: http://dbpedia\.org.*
Endpoint: http://dbpedia.org/sparql
 
But a few things are already not clear for me:
* kind: ld cache
When referring to a sparql end-point, shouldn't the kind be "sparkl" ? (I did try changing this, but with no success)
By the way, what is the meaning of the "cache" mode, I can't understand from reading the explanation. Is it a server that servers "linked data" ? if so, what is the difference with "linked data".
* prefix: 
What are the "rules" to define those prefixes ? for instance I see in the example that "." are escaped ?
Defining a prefix as "http://dbpedia\.org ( http://dbpedia/.org ).*" will thus mean that a URI as http://dbpedia.org/resource/Europe is bound to that end-point, right ?
*endpoint:
The explanation says that for a SPARQL end-point, some parameters have to be specified:
"http://sparql.sindice.com/sparql?default-graph-uri=&query={query}&format={contenttype}"
Is this mandatory ? (as the provided sample don't specify them but just specifies "http://dbpedia.org/sparql"), are there default values ?
*mimetype:
Not filled by the sample, are their default values depending on the "mode of operation" ?
 
If it is possible to get a few full examples of those settings, for the different operation modes, it would be very helpful I guess.
 
Than, after trying different configurations, I tried from the LDPath interface to add the URI "http://dbpedia.org/resource/Europe" and the LDPath "rdfs:label :: xsd:string".
When hitting "Test", a message appears next to the button: resource http://dbpedia.org/resource/Europe does not exist.
 
It seems I don't see any corresponding message neither in the console nor in the marmotta-main.log.
 
I tried so many different configurations, on different SPARQL end-point, also trying a "linked data" as DBPedia does provide the content negociation mecanism,  but without success.
 
Finally I tried to run a:

curl http://wh55650:8080/marmotta/cache/live?uri=http://dbpedia.org/resource/Europe
and it did return the rdf/xml file. But what I discovered then is that even without configuring any 'end-point' in Marmotta, this command was succeeding every time, so I think this command is not a sign that my end-point is well configured ? Except maybe if I was dealing with data that are not provided as derefencable "linked data" ?
I also tried on my local version 3.3.0, but with the same results. And also with the same WARNING when starting Marmotta.
Thank you for any help.
Fabian
 
 
 

Re: Marmotta 3.2.1 - Having problem to trigger the LDCache

Posted by Jakob Frank <ja...@apache.org>.
Hi Fabian,

On 2014-09-08 15:50, Fabian Cretton wrote:
> A first thing is that it is not clearly stated, in my opinion, when the
> LDCache is triggered.
>  
> The only further information I found was here:
> http://markmail.org/message/m3ft65du5kbuzy5z#query:+page:1+mid:j347sjyegwshvhc7+state:results
> and thus I understood that the SPARQL interface don't interact with
> LDCache, but the LDPath functionality does.
> Is there anything else then running a LPath that would trigger the cache ?
LDCache is triggered everytime a triple-pattern like "<uri> * *" is
requested from the triple store. Then LDCache tries to load <uri> from
remote.

LDPath is using such queries quite often, SPARQL only in few cases
because many requests are directly issued to the database for performance.
Even viewing the resource in the resource browser
(http://wh55650:8080/marmotta/resource/*) should trigger LDCaching.


> First of all, I see this error when launching Marmotta 3.2.1, could it
> be related to my problems ?
> INFO: Server startup in 11332 ms
> 15:25:45.495 WARN  - pattern
> (C:\marmotta_inst\marmotta-home/resources|http://wh55650:8080/marmotta/resource/|urn:).*
> is not a valid regular expression; disabling reader/writer filesystem
> (message was Illegal/unsupported escape sequence near index 4
> (C:\marmotta_inst\marmotta-home/resources|http://wh55650:8080/marmotta/resource/|urn:).*   
> ^)
As the log says, it's only a warning and should not affect you unless
you are storing (binary) content in Marmotta.
Background and workaround for this issue was discussed on
users@marmotta.a.o [1]

> My "ldcache.enabled" parameter is checked.
>  
> I guess my problem is with setting up the end-point correctly.
>  
> I first tried the provided sample "load sample -> dbpedia", which gives
> in the interface:
> kind: ld cache
> Prefix: http://dbpedia\.org.*
> Endpoint: http://dbpedia.org/sparql

Looks like there is an error in the sample: Provider (kind) "ld cache"
does not work with an SPARQL endpoint - for that you need to select
"sparql" as kind.

But as you noticed: since DBPedia provides valid Linked Data, no extra
configuation is required - just request the resource and it will be fetched:
<http://wh55650:8080/marmotta/resource/?uri=http://dbpedia.org/resource/Europe>


> But a few things are already not clear for me:
> * kind: ld cache
> When referring to a sparql end-point, shouldn't the kind be "sparkl" ?
> (I did try changing this, but with no success)
> By the way, what is the meaning of the "cache" mode, I can't understand
> from reading the explanation. Is it a server that servers "linked data"
> ? if so, what is the difference with "linked data".
> * prefix:
> What are the "rules" to define those prefixes ? for instance I see in
> the example that "." are escaped ?
> Defining a prefix as "http://dbpedia\.org <http://dbpedia/.org>.*" will
> thus mean that a URI as http://dbpedia.org/resource/Europe is bound to
> that end-point, right ?
> *endpoint:
> The explanation says that for a SPARQL end-point, some parameters have
> to be specified:
> "http://sparql.sindice.com/sparql?default-graph-uri=&query={query}&format={contenttype}"
> Is this mandatory ? (as the provided sample don't specify them but just
> specifies "http://dbpedia.org/sparql"), are there default values ?
> *mimetype:
> Not filled by the sample, are their default values depending on the
> "mode of operation" ?
>  
> If it is possible to get a few full examples of those settings, for the
> different operation modes, it would be very helpful I guess.
Sergio just now updated the documentation for the LDCache module [2],
please have a look and check if anything is missing or unclear.


Best,
Jakob

[1]
http://mail-archives.apache.org/mod_mbox/marmotta-users/201409.mbox/%3C730127A8D040CB4A976BE07F089997068BCBB097@EXC-MBX03.tsn.tno.nl%3E
[2] http://marmotta.apache.org/platform/ldcache-module.html