From: Ignazio P. <ipa...@gm...> - 2013-04-22 12:25:33
|
On 22 Apr 2013 13:19, "Alejandro Rodríguez González" < ale...@gm...> wrote: > > Hello all, > > I'm writing a code which, basically, do the next steps: > > - Create a set of pairs (input/output) URIs of classes > - For each pair, I create two OWLOntology objects and I load the ontology which correspondo to each class using loadOntologyFromOntologyDocument() method (I create the IRI from a String) > - In one of the ontologies (input one), I create several individuals under one of the classess, merge both and perform reasoning using HermiT to see if the indiviuals are classified under a concrete class of the output ontology. > > This process should be executed about 25.000 times (because I create 25k pairs in-out). My problem is, that my program is getting freeze randomly. Sometimes get freeze with pair 77, others with pair 300, others with the pair 3.452.. I mean, the number of pair always (or near always change). > It's a bit hard to tell what's wrong. One thing you can try is to use separate managers for different pairs. Are you calling dispose() on the reasoner when you are done with an ontology? Hth, I. > I debug my program and I find that the problem is that it enters in the line of code where I load the ontology using loadOntologyFromOntologyDocument() method, but never exit. > > So I understand that something is happenning with this method which is getting freeze (memory problem? connection error?) but is not returning anything, so I can't continue the process. > > I can upload some parts of the code if necessary but I would like to know if someone can give me an explanation about why can be happening this. The code is too large to upload it entirely (I've summarized the process but several other things are done, and there are several classes and objects involved). However, the problem is isolated in the execution of this method. > > Hoping someone can help me. I don't know if it can be some bug on OWL API.. > > The concretely code is the following: > > private Result loadInputOntologyOWLAPI() { > try { > inputNamespace = IRI.create(this.outputInputPair.getInput() > .getObject()); > logger.log("inputNamespace created.. OWL API [ " + inputNamespace.toString() + " ]"); > inputOntology = manager > .loadOntologyFromOntologyDocument(inputNamespace); > logger.log("Input ontology loaded in the object.. OWL API"); > } catch (Exception e) { > return new Result(false, e.getMessage()); > } > return new Result(true); > } > > I can get the message "inputNamespace created.." but when gets freeze, never execute the next one ("Input ontology loaded.."). > > Thanks > > -- > Dr. Alejandro Rodríguez González - PhD > > Bioinformatics at Centre for Plant Biotechnology and Genomics UPM-INIA > Polytechnic University of Madrid > http://www.alejandrorg.com > Phone: +34 914524900 . Ext: 25550 > > > Once the game is over, the king and the pawn go back in the same box. - Italian proverb > > ------------------------------------------------------------------------------ > Precog is a next-generation analytics platform capable of advanced > analytics on semi-structured data. The platform includes APIs for building > apps and a phenomenal toolset for data science. Developers can use > our toolset for easy data analysis & visualization. Get a free account! > http://www2.precog.com/precogplatform/slashdotnewsletter > _______________________________________________ > Owlapi-developer mailing list > Owl...@li... > https://lists.sourceforge.net/lists/listinfo/owlapi-developer > |