From: Ignazio P. <ipa...@gm...> - 2011-08-26 13:08:15
|
2011/8/26 sabrina founi <sab...@ho...>: > > Thanks Lorenz > I try what you suggest. > > First I try the example enclosed to the mail and at run, i have this error > > Exception in thread "main" java.lang.NoClassDefFoundError: > That's saying you don't have all needed jars in the classpath. Pellet comes in a number of jars plus a few support libraries (well it did in 2.2.2 at least). Make sure they are all in the classpath. HTH, I. > org/mindswap/pellet/exceptions/PelletRuntimeException > > at com.clarkparsia.pellet.owlapiv3.PelletReasonerFactory.createReasoner( > > PelletReasonerFactory.java:61) > > at theseOwlAPIpackage.ReasonrPellet.RequestOntology( > > ReasonrPellet.java:12) > > at theseOwlAPIpackage.MainClasse.main( > > MainClasse.java:57) > > Caused by: > > java.lang.ClassNotFoundException: > org.mindswap.pellet.exceptions.PelletRuntimeException > > at java.net.URLClassLoader$1.run(Unknown Source) > > at java.security.AccessController.doPrivileged( > > Native Method) > > at java.net.URLClassLoader.findClass(Unknown Source) > > at java.lang.ClassLoader.loadClass(Unknown Source) > > at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) > > at java.lang.ClassLoader.loadClass(Unknown Source) > > ... 3 more > > ReasonerPellet.java: 12 match to > > PelletReasoner reasoner = > PelletReasonerFactory.getInstance().createReasoner(MainClasse. > > locaOntology ); > After, I try the example provide by Pellet package and I cast the object to > PelletReasoner, like you suggest, but I have this syntax error > > > The type org.mindswap.pellet.KnowledgeBase cannot be resolved. It is > indirectly referenced from required .class files > > 1. quick fix available > > Configure build path > > > > I am lost, could you please help me > > > > > > Best regards > > Nissam > > > > > > > From: Lorenz Bühmann > Sent: Friday, August 26, 2011 12:33 PM > To: owl...@li... > Subject: Re: [OWLAPI-developer] Using pellet reasoner with owlapi > On 26.08.2011 12:00, sabrina founi wrote: > > Hello > > I am beginner in using owlapi > > I use owlapi 3.2.3 and pellet 2.3.0 > > I tried to use Pellet in example8 provided here > > http://owlapi.svn.sourceforge.net/viewvc/owlapi/v3/trunk/examples/src/main/java/org/coode/owlapi/examples/Example8.java?revision=1830&view=markup > > But that not run > > I tried to use OWLAPI example proved by Pellet 2.3.0 zip > > But I have a syntax error in these lines > > reasoner.getKB().realize(); > reasoner.getKB().printClassTree(); > > > > > > I need please to know this > > Which package I must use > > Which code I must use > > Is there any problem with the version I use > > Do you please show me an OWLAPI example use Pellet reasoner > > Thank you very much > > Nissam > > ------------------------------------------------------------------------------ > EMC VNX: the world's simplest storage, starting under $10K > The only unified storage solution that offers unified management > Up to 160% more powerful than alternatives and 25% more efficient. > Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev > > _______________________________________________ > Owlapi-developer mailing list > Owl...@li... > https://lists.sourceforge.net/lists/listinfo/owlapi-developer > > Hi, > > this methods are not included in the interface OWLReasoner which is used in > this example. Why do you don't use the example from the Pellet package? > > If you want to use your example, than can either use > > PelletReasoner reasoner = > PelletReasonerFactory.getInstance().createReasoner( ontology ); > > to instantiate the reasoner ( copied from the Pellet examples) > > or you have to cast the object to PelletReasoner e.g. > > ((PelletReasoner) reasoner).getKB().realize(); > > Regards, > Lorenz > > > > ________________________________ > > ------------------------------------------------------------------------------ > EMC VNX: the world's simplest storage, starting under $10K > The only unified storage solution that offers unified management > Up to 160% more powerful than alternatives and 25% more efficient. > Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev > > ________________________________ > > _______________________________________________ > Owlapi-developer mailing list > Owl...@li... > https://lists.sourceforge.net/lists/listinfo/owlapi-developer > > ------------------------------------------------------------------------------ > EMC VNX: the world's simplest storage, starting under $10K > The only unified storage solution that offers unified management > Up to 160% more powerful than alternatives and 25% more efficient. > Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev > _______________________________________________ > Owlapi-developer mailing list > Owl...@li... > https://lists.sourceforge.net/lists/listinfo/owlapi-developer > > |