I think I'm using the last version of Marmotta, i retrieved the git project as explain at marmotta website and checked out the develop branch. Then I fetched. However i still have the same errors. Maybe i made a mistake doing that, i'm not really familiar with git.
I realised that I simplify a bit too much the query i gave in the previous mail. In fact, that's when you try to put several UNION together that the error appears. Sorry about that. I tried to turn on SPARQL Logging configuration but it seems that the program stop before writting anything into the log file so I can't get the SQL translation of the query. Regards, Lucas WAGNER > > > Hi Lucas, > > > > do you use the latest version of Marmotta 3.3.0-SNAPSHOT? There are almost > daily updates, especially to the SPARQL code. I just tried the query locally > (of course without your data and with proper URLs for those you anonymized), > but I cannot reproduce that error. In any case, you should turn on SPARQL > debug logging in the logging configuration by setting the log level for > SPARQL to "debug" and adding the Marmotta debug log to the SPARQL component. > In the marmotta-debug.log you can then see how the query is translated to > SQL and maybe send this to me? > > > > Your Eclipse problem might come from the fact that you have old versions of > Marmotta 3.3.0 SNAPSHOT in your local Maven repository. You should first run > a "mvn clean install -DskipTests" in the most recent local checkout of the > Marmotta GIT repository. > > > > Greetings, > > > > Sebastian > > > > 2014-11-04 11:43 GMT+01:00 Lucas Wagner <lucas.wag...@webdrone.fr>: > > Hi, > > > > We are trying to ask a remote marmotta 3.3.0 triplestore using sparql > requests. In order to do that, we tried to use kiwi-triplestore and > kiwi-sparql to get connection. > > > > However,when we retieved the kiwi-triplestore 3.3.0 version, eclipse found > an error in KiWiConnection class. It seems that the createCachKey function > in LiteralsCommons class ask a Local type parameter instead of a null > parameter cast into string which is used. > > > > We also noticed that when we try to send a sparql request with clauses like > PREFIX, we get a NullPointerException in SQLBuilder.buildWhereClause() from > kiwi-sparql. In fact when the program try to retrieve SQLVariable sv from > variables attribute, it ask for a key like "-const-2" which does not exist. > I tried to add test on sv to execute the rest of the code only when sv is > not null and it seems to solve the problem. > > > > Are these problems come from code errors or did we make mistakes when we > retieved the project? > > > > When we try to execute the following sparql request, we also got an error. > Do you have any idea of the problem source? > > > > PREFIX webdrone:<url> > > PREFIX xsd:<http://www.w3.org/2001/XMLSchema#> > > PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> > > SELECT * > > FROM <graph> > > WHERE { > > {?a rdf:type webdrone:typeA1 .} UNION {?a rdf:type webdrone:typeA2 .} > > OPTIONAL { ?a webdrone:prop1 ?att1 . } > > OPTIONAL { ?a webdrone:prop2 ?b . } > > FILTER NOT EXISTS { ?a webdrone:prop3 webdrone:att3 . } . > > OPTIONAL { ?a webdrone:prop4 ?att4a . } > > OPTIONAL { ?b webdrone:prop4 ?att4b . } > > FILTER((!bound(?att4a) || ?att4a !=\"false\"^^xsd:boolean) && > (!bound(?att4b) || ?att4b !=\"false\"^^xsd:boolean)) > > } > > > > > > org.openrdf.query.QueryEvaluationException: > org.postgresql.util.PSQLException: ERREUR: erreur de syntaxe sur ou près de > « FROM » > > Position : 889 > > at > org.openrdf.repository.sail.SailTupleQuery.evaluate(SailTupleQuery.java:67) > > at > fr.webdrone.api.db.triplestore.dao.TestKiWiSparql.execSelectSparql(TestKiWiSparql.java:152) > > at > fr.webdrone.api.db.triplestore.dao.TestKiWiSparql.main(TestKiWiSparql.java:84) > > Caused by: org.openrdf.sail.SailException: > org.postgresql.util.PSQLException: ERREUR: erreur de syntaxe sur ou près de > « FROM » > > Position : 889 > > at > org.apache.marmotta.kiwi.sparql.sail.KiWiSparqlSailConnection.evaluate(KiWiSparqlSailConnection.java:96) > > at > org.openrdf.repository.sail.SailTupleQuery.evaluate(SailTupleQuery.java:60) > > ... 2 more > > Caused by: org.openrdf.query.QueryEvaluationException: > org.postgresql.util.PSQLException: ERREUR: erreur de syntaxe sur ou près de > « FROM » > > Position : 889 > > at > org.apache.marmotta.kiwi.sparql.evaluation.KiWiEvaluationStrategyImpl.evaluateNative(KiWiEvaluationStrategyImpl.java:222) > > at > org.apache.marmotta.kiwi.sparql.evaluation.KiWiEvaluationStrategyImpl.evaluate(KiWiEvaluationStrategyImpl.java:178) > > at > org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:583) > > at > org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:197) > > at > org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:662) > > at > org.apache.marmotta.kiwi.sparql.evaluation.KiWiEvaluationStrategyImpl.evaluate(KiWiEvaluationStrategyImpl.java:123) > > at > org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:577) > > at > org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:197) > > at > org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:607) > > at > org.openrdf.query.algebra.evaluation.impl.EvaluationStrategyImpl.evaluate(EvaluationStrategyImpl.java:197) > > at > org.apache.marmotta.kiwi.sparql.sail.KiWiSparqlSailConnection.evaluate(KiWiSparqlSailConnection.java:93) > > ... 3 more > > Caused by: org.postgresql.util.PSQLException: ERREUR: erreur de syntaxe sur > ou près de « FROM » > > Position : 889 > > at > org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161) > > at > org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890) > > at > org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) > > at > org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:560) > > at > org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417) > > at > org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:302) > > at > org.apache.marmotta.kiwi.sparql.persistence.KiWiSparqlConnection$1.call(KiWiSparqlConnection.java:101) > > at > org.apache.marmotta.kiwi.sparql.persistence.KiWiSparqlConnection$1.call(KiWiSparqlConnection.java:1) > > at java.util.concurrent.FutureTask.run(FutureTask.java:266) > > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > > at java.lang.Thread.run(Thread.java:744) > > > > Regards, > > > > Lucas WAGNER > >