Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-dev] SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

Matthew Horridge matthew.horridge at stanford.edu
Mon Dec 7 09:53:16 PST 2015


Hi,

How are you building and running this?

You get the warning because you don’t have an SLF4J logging implementation on your class path.  See this link for more information:

http://www.slf4j.org/manual.html

Cheers,

Matthew




On 7 Dec 2015, at 00:25, Jake <micro_wf at outlook.com<mailto:micro_wf at outlook.com>> wrote:

Hello, i just happen to a problem.  The program appears error like this.

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further
details.

this is the code as the following:

import org.semanticweb.owlapi.apibinding.OWLManager;
import org.semanticweb.owlapi.model.IRI;
import org.semanticweb.owlapi.model.OWLOntology;
import org.semanticweb.owlapi.model.OWLOntologyCreationException;
import org.semanticweb.owlapi.model.OWLOntologyManager;
import org.semanticweb.owlapi.reasoner.OWLReasoner;
import org.swrlapi.exceptions.SWRLRuleEngineException;
import org.swrlapi.factory.SWRLAPIFactory;
import org.swrlapi.parser.SWRLParseException;
import org.swrlapi.sqwrl.SQWRLQueryEngine;
import org.swrlapi.sqwrl.SQWRLResult;
import org.swrlapi.sqwrl.exceptions.SQWRLException;

public class test {
public static OWLOntologyManager manager;
public static OWLOntology ontology;
public static OWLReasoner reasoner;


public static void main(String[] args) {
try {
// System.out.println("=================");
manager = OWLManager.createOWLOntologyManager();
ontology = manager.loadOntology(IRI.create("file:/d:/animal.owl"));
SQWRLQueryEngine queryEngine = SWRLAPIFactory
.createSQWRLQueryEngine(ontology);

SQWRLResult result = queryEngine.runSQWRLQuery("Q1",
"Animal(?a)  -> sqwrl:select(?a)");

// System.out.println("----------------------------------");
while (result.next()) {
System.out.println(result.getColumnNames());


System.out.println("Name: "
+ result.getLiteral("name").getString());
System.out.println("Salary: "
+ result.getLiteral("salary").getInt());
}
} catch (SWRLRuleEngineException | SQWRLException | SWRLParseException
| OWLOntologyCreationException e) {
e.printStackTrace();
}

}

}


could you tell me why?thank you very much!



--
View this message in context: http://protege-project.136.n4.nabble.com/SLF4J-Failed-to-load-class-org-slf4j-impl-StaticLoggerBinder-tp4664113.html
Sent from the Protege Developer mailing list archive at Nabble.com<http://nabble.com>.
_______________________________________________
protege-dev mailing list
protege-dev at lists.stanford.edu<mailto:protege-dev at lists.stanford.edu>
https://mailman.stanford.edu/mailman/listinfo/protege-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.stanford.edu/pipermail/protege-dev/attachments/20151207/44e06a7d/attachment.html>


More information about the protege-dev mailing list