On 11/10/11 11:21, Paolo Castagna wrote:
Jérôme wrote:
Le 11/10/11 11:36, Paolo Castagna a écrit :
Jérôme wrote:
Le 11/10/11 11:14, Paolo Castagna a écrit :
Jérôme wrote:
Le 11/10/11 10:08, Andy Seaborne a écrit :
Jérôme,
Sorry if you've said this before in previous emails but what's the
query and what's the data like? When did you last update LARQ?
Hi Andy,
I did my last LARQ update 2 days ago. The problem is not about datas,
because the result is the same with the books.ttl file: 0 result
with a
very simple query like:
PREFIX pf:<http://jena.hpl.hp.com/ARQ/property#>
SELECT ?doc
{
?lit pf:textMatch 'Potter' .
?doc ?p ?lit
}
I'm trying to find out if something in the chain of packages has
changed and whether we've introduced a a regression in ARQ or LARQ.
The only ARQ change I can think of relates to named graphs but you're
not using named graphs and the change to correctly handle property
functions would only go from 0 to some results.
You have the same data available via<#books> and via<#dataset> --
does the query work one route and not the other or are both now
showing 0 results?
No, simple SPARQL queries works fine. I only have problem on the
lucene
indexed datas with LARQ queries.
The problem is that somehow your Lucene index is empty or non existing.
If the /tmp/lucene directory exists and it's empty or it contains an
empty Lucene index when you start Fuseki. LARQ will *not* index your
data.
LARQ will index your data if and only if you point it at a non existing
directory. When you start Fuseki, LARQ should create the /tmp/lucene
directory for you and index your data.
When I need to debug problems involving Lucene indexes I use:
http://www.getopt.org/luke/luke-0.9.9/lukemin-0.9.9.jar
... it's very useful to inspect a Lucene index. I suspect yours is
empty or non-existing.
You can also try to use larq.larqbuilder to build your Lucene index
manually at the beginning, but it would be much better if LARQ does
automatically this for you (as it should be). Try this:
1. make sure Fuseki or your app is not running
2. java -cp fuseki-0.2.1-SNAPSHOT-sys.jar larq.larqbuilder \
--allow-duplicates --larq=/tmp/lucene \
--desc=/path/to/your/fuseki/config.ttl
(one line!)
3. check your Lucene index in the /tmp/lucene directory
4. start Fuseki as usual
The larqbuilder command-line failed:
java -cp target/fuseki-0.2.1-SNAPSHOT-sys.jar larq.larqbuilder
--allow-duplicates --larq=/tmp/lucene --desc=config.ttl
com.hp.hpl.jena.sparql.ARQException: More than one: var ?root
at
com.hp.hpl.jena.sparql.util.QueryExecUtils.getOne(QueryExecUtils.java:354)
at
com.hp.hpl.jena.sparql.util.graph.GraphUtils.findRootByType(GraphUtils.java:191)
at
com.hp.hpl.jena.sparql.core.assembler.AssemblerUtils.build(AssemblerUtils.java:97)
at arq.cmdline.ModAssembler.create(ModAssembler.java:67)
at
arq.cmdline.ModDatasetAssembler.createDataset(ModDatasetAssembler.java:43)
at arq.cmdline.ModDataset.getDataset(ModDataset.java:34)
at larq.larqbuilder.exec(larqbuilder.java:84)
at arq.cmdline.CmdMain.mainMethod(CmdMain.java:97)
at arq.cmdline.CmdMain.mainRun(CmdMain.java:59)
at arq.cmdline.CmdMain.mainRun(CmdMain.java:46)
at larq.larqbuilder.main(larqbuilder.java:50)
Ok, this is because larq.larqbuilder command does not support multiple
datasets
(as they have been introduced only recently in Fuseki's config format).
Could you try to remove this from your config.ttl:
<#books> rdf:type ja:RDFDataset ;
rdfs:label "Books" ;
ja:defaultGraph
[ rdfs:label "discours_de_la_methode.rdf" ;
a ja:MemoryModel ;
ja:content [ja:externalContent<file:Data/file.rdf> ] ;
] ;
.
And, make sure you have only one dataset (i.e.<#dataset> rdf:type
tdb:DatasetTDB)?
Try again:
1. make sure Fuseki or your app is not running
2. rm -rf /tmp/lucene
3. java -cp fuseki-0.2.1-SNAPSHOT-sys.jar larq.larqbuilder \
--allow-duplicates --larq=/tmp/lucene \
--desc=/path/to/your/fuseki/config.ttl
(one line!)
4. check your Lucene index in the /tmp/lucene directory
5. start Fuseki as usual
I think it's really better: my /tmp/lucene contains files. One new
problem...(sorry...),
I'm not able to test it because before running all my application, i've
tried a mvn install of LARQ (to compile and install my own changes) - i
get a dependency error:
Failed to execute goal on project jena-larq: Could not resolve
dependencies for project
org.apache.jena:jena-larq:jar:0.2.2-incubating-SNAPSHOT: Could not find
artifact org.apache.jena:jena-tdb:jar:0.8.11-SNAPSHOT in
apache.snapshots (http://repository.apache.org/snapshots)
What are goupId and artefactId for TDB? Have they changed...?
At Apache, the artifact is:
org.apache.jena:jena-tdb 0.9.0-incubating-SNAPSHOT
To smooth the transition I've been building things under their old name
and location on openjena:
com.hp.hpl.jena:tdb 0.9.0-SNAPSHOT
I think LARQ uses the Apache versions of everything.
Andy
Hi Jérôme,
you can browse any Maven repository, to check what are the SNAPSHOTs available:
https://repository.apache.org/content/groups/snapshots/org/apache/jena/jena-tdb/
If you do that, you'll see that the version you need to use now is:
0.9.0-incubating-SNAPSHOT
In general, the first thing I do when Maven fail to retrieve a dependency is
to double check manually with a browser if the artifact is actually there.
Most of the time, the problem is because I have an error or a typo in my pom.xml
file. Check groupId, check artifactId, check version. This is what I do.
Hopefully, we are getting there!
Paolo
The