DL-Learner icon indicating copy to clipboard operation
DL-Learner copied to clipboard

Question: command line error

Open sunyi000 opened this issue 4 years ago • 5 comments

Hi, I'm new to dllearner and I was trying to use dllearner commandline cli to run my own ontology.

I have got an error below. 'op' is a controlled vocabulary created and available locally.

java.lang.RuntimeException: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'op': Unsatisfied dependency expressed through method 'setReasoner' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reasoner': Initialization of bean failed; nested exception is java.lang.RuntimeException: java.lang.NullPointerException: entity cannot be null

I tried to debug the ontology, but it looks fine without issue. (Protege say it is coherent and consistent)

I have spent a long time trying to debug but could not find out why.

Any pointers are much appreciated.

Thank you

sunyi000 avatar Jul 30 '20 14:07 sunyi000

hi @sunyi000 can you tell us more about your command line and config file? what command line did you use? what is the content of the your config file? maybe you have not configured a reasoner?

SimonBin avatar Jul 30 '20 14:07 SimonBin

thank you @SimonBin

It is my very first attempt to use dllearner. I just download it and used the 'cli' utility in dllearner-1.4.0's bin folder.

I used the father_oe_inv.conf as the template and just changing the values for my own ontology.

I noticed the reasoner in that file is {ks} but not sure what does it mean..basically I wanted to use pallet reasoner.

Thanks again for your help. Probably I will need more reading on dllearner :)

sunyi000 avatar Jul 30 '20 14:07 sunyi000

can you first verify, does the original father_oe_inv.conf work :-)

if it does, you have to understand better the config. we can better help you if you show your config. you can also look at some more conf files and/or refer the configOptions documentation

SimonBin avatar Jul 30 '20 14:07 SimonBin

yes the original father_oe_inv.conf works..

I'm trying different config options and hopefully to find out what was wrong...

my conf file looks like below.. thanks

// declare some prefixes to use as abbreviations
prefixes = [ ("wo","file:///home/ubuntu/water-data/water-training/") ]

// knowledge source definition
ks.type = "OWL File"
ks.fileName = "water.ttl"

// reasoner
reasoner.type = "closed world reasoner"
reasoner.sources = { ks }

// learning problem
lp.type = "clp"
lp.classToDescribe = "wo:IndustryDischarge"
accuracyMethod.type = "fmeasure"

// refinement operator
op.type = "rho"
op.useInverse = true
op.useHasValueConstructor = true

// create learning algorithm to run
alg.type = "celoe"
alg.writeSearchTree = true
alg.replaceSearchTree = true
alg.searchTreeFile = "/tmp/celoe-water.txt"

sunyi000 avatar Jul 31 '20 09:07 sunyi000

the immediate cause for the error you get, is that the ssn and sosa ontologies define anonymous foaf:Agent instances, and pellet will error out with this error when encountering anonymous (blank node) individuals.

SimonBin avatar Aug 12 '20 09:08 SimonBin