-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with QueryReasoner #4
Comments
I might need some more info to help you but here are my 2 cents from quickly looking at this.
As far as I can tell (mind that I was not the main developer of PAGOdA) Also, can you try an run the example? |
Thanks for the additional info! Where did you find that particular version of RDFox? What happens if you use the copy shipped with PAGOdA, instead? With this I mean to copy the |
If i used the copy of RDFox shipped with PAGOdA then I get the following error. The other copy of RDFox build2213 I get it from MoRE repository and I use this because it also uses PAGodA and for testing purpose. But failed to do so. I don't know what I am doing wrong? |
If this is not a problem, would you mind sharing the project here? If this is in a public repo, even better. I'll try and find some time to reproduce the error. This might take a bit since I am a bit busy atm and only have access to linux machines (while you seem to be running things under Windows) |
Yes, sure. I have attached 2 projects (1) pagoda with all dependencies and (2) pagoda with no dependency, files I am using. PagodawithDependencies.zip Currently, I am trying Pagoda with Linux to see whether it's a problem with OS or not. |
Hi. I have tested with Linux and I get the same issue as before. Did you find some time to reproduce the error? |
Sorry, I have been a quite busy these weeks but this is still on my radar. I'll get back to you asap. |
Hey, sorry for the delay (had to submit my thesis 😬) I tried the following:
<dependency>
<groupId>net.sourceforge.owlapi</groupId>
<artifactId>owlapi-distribution</artifactId>
<version>5.1.20</version>
</dependency>
<dependency>
<groupId>uk.ox.ac.uk.pagoda</groupId>
<artifactId>pagoda</artifactId>
<version>2.1.2</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/pagoda-2.1.2-jar-with-dependencies.jar</systemPath>
</dependency> This also tells Maven where to find the local PAGOdA library. Note that there are better ways to do it...we can discuss that later.
package com.hmq.aau.PagodawithDependencies;
String query = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>\n"
+ "PREFIX ub: <http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#>\n"
+ "SELECT ?X\n"
+ "WHERE {\n"
+ " ?X rdf:type ub:GraduateStudent .\n"
+ " ?X ub:takesCourse <http://www.Department0.University0.edu/GraduateCourse0>\n"
+ "}\n";
String[] queryTexts = { query };
mvn compile
mvn package
java -cp lib/pagoda-2.1.2-jar-with-dependencies.jar:target/PagodawithDependencies-0.0.1-SNAPSHOT.jar App passing both PAGOdA's JAR and the generated one in the classpath ( Can you reproduce these steps? If you can try under Linux, that would be great. I don't have a Windows machine available. |
Sorry I couldn't get back to you. As I am occupied with some deadlines. Thank you for your response. I will try and get back to you as soon as possible. |
Sorry for the delay. I had two paper deadlines to meet. Anyway, I have tried to follow your suggestion but on windows, because this is what is available to me. I could not make it run and get this error now |
Here is the project I'm using: https://mega.nz/file/HwMQUaaA#1O-vQQrq3MbsYJnGxUW1zTsQw9tWg-kYvxMe4YAY738
Compiled and packaged with
For reference
|
I am trying to create a query reasoner (for testing purposes) and I have written 2 lines for it but I am getting the below exception if I pass query reasoner the ontology file.
2022-04-13 16:09:33 PagodaProperties - Unable to find user-defined configuration file ("pagoda.properties" in classpath) 2022-04-13 16:09:33 PagodaProperties - Using default configuration 2022-04-13 16:09:33 PagodaProperties - Debugging mode is enabled 2022-04-13 16:09:33 PagodaProperties - The directory where statistics are saved is: "statistics" Exception in thread "main" java.lang.NoSuchFieldError: NarrowParallelHead at uk.ac.ox.cs.pagoda.reasoner.light.RDFoxQueryEngine.createDataStore(RDFoxQueryEngine.java:35) at uk.ac.ox.cs.pagoda.reasoner.light.BasicQueryEngine.<init>(BasicQueryEngine.java:30) at uk.ac.ox.cs.pagoda.reasoner.RLQueryReasoner.<init>(RLQueryReasoner.java:22) at uk.ac.ox.cs.pagoda.reasoner.QueryReasoner.getInstance(QueryReasoner.java:65) at uk.ac.ox.cs.pagoda.reasoner.QueryReasoner.getInstance(QueryReasoner.java:53) at testingModularity.test0.checkPagoda(test0.java:113) at testingModularity.test0.main(test0.java:107)
And if I pass the pagoda.properties file then I get the following below error. even though the class is able to find the .properties file. I have used the "pagoda.properties" from your repository with some changes to value but the syntax is the same. But the changes like debugging are off etc I don't see as it is unable to read the new property files. Also, I tried using a different name for the property file but of no use.
2022-04-13 16:14:17 PagodaProperties - Unable to find user-defined configuration file ("pagoda.properties" in classpath) 2022-04-13 16:14:17 PagodaProperties - Using default configuration 2022-04-13 16:14:17 PagodaProperties - Debugging mode is enabled 2022-04-13 16:14:17 PagodaProperties - The directory where statistics are saved is: "statistics" Exception in thread "main" java.lang.NullPointerException at java.io.File.<init>(File.java:277) at uk.ac.ox.cs.pagoda.owl.OWLHelper.loadOntology(OWLHelper.java:69) at uk.ac.ox.cs.pagoda.owl.OWLHelper.loadOntology(OWLHelper.java:81) at uk.ac.ox.cs.pagoda.reasoner.QueryReasoner.getInstance(QueryReasoner.java:36) at testingModularity.test0.checkPagoda(test0.java:113) at testingModularity.test0.main(test0.java:107)
I am using the Pagoda jar file without dependencies (also I get the same error on the jar with dependency as well). I am also attaching the code that i i am trying to execute.
public static void checkPagoda(OWLOntology ontology) throws IOException { PagodaProperties properties = new PagodaProperties("../chainsawTesting/src/main/java/resource/pagoda.properties"); QueryReasoner pagoda = QueryReasoner.getInstance(properties); System.out.println("Done" + pagoda); }
I don't know what is going wrong. Any help would be appreciated. Thank you!
The text was updated successfully, but these errors were encountered: