Re: [Owlim-discussion] OWLIM/Sesame and Query parsing
I misspoke. I have my application which is compiled and put in a JAR. I launch my application from this JAR. This application works if I don't use BigOWLIM. Now, if I use BigOWLIM, i launch my application JAR by link in the classpath the BigOWLIM and Sesame JAR. At this time, I get the previous error. If i unzip the Sesame JAR, there is the META-INF/services and it associated files. I finally found a temporary solution : I link the unzipped sesame JAR folder in my application classpath and it works. So, is there a problem with the provides Sesame JAR ? I have tried with the lastest version of Sesame and the problem is the same. Thanks. Regards, Laurent Le 30 juil. 09 à 11:54, Damyan Ognyanoff a écrit : Hi Laurent, since you are building a single jar out of few other (if I got it right) - could you check the contents of the MATE-INF/service subfolders of the final jar for all the parsing service specific definitions - text files named by the service interface with lines stating specific interface implementations i.e. specifically for a file named META-INF/services/ org.openrdf.query.parser.QueryParserFactory with contents: org.openrdf.query.parser.sparql.SPARQLParserFactory if you merge several jars where there is a such file, the last one will override the one from other jars hope this is of some help regards, Damyan - Original Message - From: Laurent PELLEGRINO laurent.pellegr...@sophia.inria.fr To: owlim-discussion@ontotext.com Sent: Monday, July 27, 2009 8:15 PM Subject: Re: [Owlim-discussion] OWLIM/Sesame and Query parsing Thanks for your response. I do same and it works in a JunitTest. However, when I test it in my global application which link jar and create a JAR of all my classes, i get the previous Exception. JAR are in classpath and the problem seems to be the same that the link I previously referenced. RepositoryConnection conn = null; boolean result = false; try { conn = this.repository.getConnection(); try { result = conn.prepareBooleanQuery(language, query).evaluate(); } finally { conn.close(); } } catch (Exception e) { e.printStackTrace(); } return new Boolean(result); Where language is QueryLanguage.SPARQL and query is equals to ASK { ? s ?p ?o } Regards, Laurent Le 27 juil. 09 à 16:13, Damyan Ognyanoff a écrit : Hi, how do you parse the query? The following code works just fine ... BooleanQuery q = repository .getConnection().prepareBooleanQuery(QueryLanguage.SPARQL, ASK { ? S a ?C} ); System.out.println(result is + q.evaluate()); regards, Damyan - Original Message - From: Laurent PELLEGRINO laurent.pellegr...@sophia.inria.fr To: owlim-discussion@ontotext.com Sent: Monday, July 27, 2009 4:25 PM Subject: [Owlim-discussion] OWLIM/Sesame and Query parsing Dear all, I am trying to parse and to execute a SPARQL ASK query in my application. When I do that, I get the following exception : org.openrdf.query.UnsupportedQueryLanguageException: No factory available for query language SPARQL However all the JAR are in the classpath. It is a known problem ? I have searched on the web and I have found a similar subject but it dates back to 2007 : http://www.openrdf.org/forum/mvnforum/viewthread?thread=1410 The solution is to use a more recent Sesame version which corrects this bug. So i have tried with the Sesame 2.3-pr1 version but the problem is always the same. Does someone has an idea ? Thanks. Kind Regards Laurent ___ OWLIM-discussion mailing list OWLIM-discussion@ontotext.com http://ontotext.com/mailman/listinfo/owlim-discussion ___ OWLIM-discussion mailing list OWLIM-discussion@ontotext.com http://ontotext.com/mailman/listinfo/owlim-discussion ___ OWLIM-discussion mailing list OWLIM-discussion@ontotext.com http://ontotext.com/mailman/listinfo/owlim-discussion
Re: [Owlim-discussion] OWLIM/Sesame and Query parsing
Hi Laurent, since you are building a single jar out of few other (if I got it right) - could you check the contents of the MATE-INF/service subfolders of the final jar for all the parsing service specific definitions - text files named by the service interface with lines stating specific interface implementations i.e. specifically for a file named META-INF/services/org.openrdf.query.parser.QueryParserFactory with contents: org.openrdf.query.parser.sparql.SPARQLParserFactory if you merge several jars where there is a such file, the last one will override the one from other jars hope this is of some help regards, Damyan - Original Message - From: Laurent PELLEGRINO laurent.pellegr...@sophia.inria.fr To: owlim-discussion@ontotext.com Sent: Monday, July 27, 2009 8:15 PM Subject: Re: [Owlim-discussion] OWLIM/Sesame and Query parsing Thanks for your response. I do same and it works in a JunitTest. However, when I test it in my global application which link jar and create a JAR of all my classes, i get the previous Exception. JAR are in classpath and the problem seems to be the same that the link I previously referenced. RepositoryConnection conn = null; boolean result = false; try { conn = this.repository.getConnection(); try { result = conn.prepareBooleanQuery(language, query).evaluate(); } finally { conn.close(); } } catch (Exception e) { e.printStackTrace(); } return new Boolean(result); Where language is QueryLanguage.SPARQL and query is equals to ASK { ? s ?p ?o } Regards, Laurent Le 27 juil. 09 à 16:13, Damyan Ognyanoff a écrit : Hi, how do you parse the query? The following code works just fine ... BooleanQuery q = repository.getConnection().prepareBooleanQuery(QueryLanguage.SPARQL, ASK { ?S a ?C} ); System.out.println(result is + q.evaluate()); regards, Damyan - Original Message - From: Laurent PELLEGRINO laurent.pellegr...@sophia.inria.fr To: owlim-discussion@ontotext.com Sent: Monday, July 27, 2009 4:25 PM Subject: [Owlim-discussion] OWLIM/Sesame and Query parsing Dear all, I am trying to parse and to execute a SPARQL ASK query in my application. When I do that, I get the following exception : org.openrdf.query.UnsupportedQueryLanguageException: No factory available for query language SPARQL However all the JAR are in the classpath. It is a known problem ? I have searched on the web and I have found a similar subject but it dates back to 2007 : http://www.openrdf.org/forum/mvnforum/viewthread?thread=1410 The solution is to use a more recent Sesame version which corrects this bug. So i have tried with the Sesame 2.3-pr1 version but the problem is always the same. Does someone has an idea ? Thanks. Kind Regards Laurent ___ OWLIM-discussion mailing list OWLIM-discussion@ontotext.com http://ontotext.com/mailman/listinfo/owlim-discussion ___ OWLIM-discussion mailing list OWLIM-discussion@ontotext.com http://ontotext.com/mailman/listinfo/owlim-discussion ___ OWLIM-discussion mailing list OWLIM-discussion@ontotext.com http://ontotext.com/mailman/listinfo/owlim-discussion
Re: [Owlim-discussion] OWLIM/Sesame and Query parsing
Thanks for your response. I do same and it works in a JunitTest. However, when I test it in my global application which link jar and create a JAR of all my classes, i get the previous Exception. JAR are in classpath and the problem seems to be the same that the link I previously referenced. RepositoryConnection conn = null; boolean result = false; try { conn = this.repository.getConnection(); try { result = conn.prepareBooleanQuery(language, query).evaluate(); } finally { conn.close(); } } catch (Exception e) { e.printStackTrace(); } return new Boolean(result); Where language is QueryLanguage.SPARQL and query is equals to ASK { ? s ?p ?o } Regards, Laurent Le 27 juil. 09 à 16:13, Damyan Ognyanoff a écrit : Hi, how do you parse the query? The following code works just fine ... BooleanQuery q = repository.getConnection().prepareBooleanQuery(QueryLanguage.SPARQL, ASK { ?S a ?C} ); System.out.println(result is + q.evaluate()); regards, Damyan - Original Message - From: Laurent PELLEGRINO laurent.pellegr...@sophia.inria.fr To: owlim-discussion@ontotext.com Sent: Monday, July 27, 2009 4:25 PM Subject: [Owlim-discussion] OWLIM/Sesame and Query parsing Dear all, I am trying to parse and to execute a SPARQL ASK query in my application. When I do that, I get the following exception : org.openrdf.query.UnsupportedQueryLanguageException: No factory available for query language SPARQL However all the JAR are in the classpath. It is a known problem ? I have searched on the web and I have found a similar subject but it dates back to 2007 : http://www.openrdf.org/forum/mvnforum/viewthread?thread=1410 The solution is to use a more recent Sesame version which corrects this bug. So i have tried with the Sesame 2.3-pr1 version but the problem is always the same. Does someone has an idea ? Thanks. Kind Regards Laurent ___ OWLIM-discussion mailing list OWLIM-discussion@ontotext.com http://ontotext.com/mailman/listinfo/owlim-discussion ___ OWLIM-discussion mailing list OWLIM-discussion@ontotext.com http://ontotext.com/mailman/listinfo/owlim-discussion
[Owlim-discussion] OWLIM/Sesame and Query parsing
Dear all, I am trying to parse and to execute a SPARQL ASK query in my application. When I do that, I get the following exception : org.openrdf.query.UnsupportedQueryLanguageException: No factory available for query language SPARQL However all the JAR are in the classpath. It is a known problem ? I have searched on the web and I have found a similar subject but it dates back to 2007 : http://www.openrdf.org/forum/mvnforum/viewthread?thread=1410 The solution is to use a more recent Sesame version which corrects this bug. So i have tried with the Sesame 2.3-pr1 version but the problem is always the same. Does someone has an idea ? Thanks. Kind Regards Laurent ___ OWLIM-discussion mailing list OWLIM-discussion@ontotext.com http://ontotext.com/mailman/listinfo/owlim-discussion
Re: [Owlim-discussion] OWLIM/Sesame and Query parsing
Hi, how do you parse the query? The following code works just fine ... BooleanQuery q = repository.getConnection().prepareBooleanQuery(QueryLanguage.SPARQL, ASK { ?S a ?C} ); System.out.println(result is + q.evaluate()); regards, Damyan - Original Message - From: Laurent PELLEGRINO laurent.pellegr...@sophia.inria.fr To: owlim-discussion@ontotext.com Sent: Monday, July 27, 2009 4:25 PM Subject: [Owlim-discussion] OWLIM/Sesame and Query parsing Dear all, I am trying to parse and to execute a SPARQL ASK query in my application. When I do that, I get the following exception : org.openrdf.query.UnsupportedQueryLanguageException: No factory available for query language SPARQL However all the JAR are in the classpath. It is a known problem ? I have searched on the web and I have found a similar subject but it dates back to 2007 : http://www.openrdf.org/forum/mvnforum/viewthread?thread=1410 The solution is to use a more recent Sesame version which corrects this bug. So i have tried with the Sesame 2.3-pr1 version but the problem is always the same. Does someone has an idea ? Thanks. Kind Regards Laurent ___ OWLIM-discussion mailing list OWLIM-discussion@ontotext.com http://ontotext.com/mailman/listinfo/owlim-discussion ___ OWLIM-discussion mailing list OWLIM-discussion@ontotext.com http://ontotext.com/mailman/listinfo/owlim-discussion