ProtegeReasoner (Pellet Jena ) not connected

View: New views
1 Messages — Rating Filter:   Alert me  

ProtegeReasoner (Pellet Jena ) not connected

by Pablo Avila :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,
I am writing an application in Java where I have to query some
information from an ontology created with Protege. For this reason I
have decided to use the Pellet reasoner.
The problem is that after creating the reasoner when I call it (for
example: reasoner.getSubclasses) an error of reasoner not connected or
conexion refused.
I have also opened the port in windows for the reasoner... just in case.
Here I write you my code maybe someone can give an idea or suggest
other way to do it.

ReasonerManager reasonerManager = ReasonerManager.getInstance();
ProtegeOWLReasoner reasoner = reasonerManager.getReasoner(owlModel);
reasoner.setURL("http://localhost:8081");
if (!reasoner.isConnected()) {
                     System.out.println("not Connected to reasoner");
                 }

Thank you in advance!

Best Regards

Pablo