ontologyportal / sigmakee

Sigma Knowledge Engineering Environment
https://www.ontologyportal.org
GNU General Public License v3.0
103 stars 35 forks source link

Sigmakee has been initializing for 2h #74

Closed alkis05 closed 2 years ago

alkis05 commented 2 years ago

The webapp was built successfully and running the test result seems to finish in success:

KBmanager.serializedOld(config): returning false (not old) KBmanager.loadSerialized(): KBmanager has been deserialized WordNet.initOnce(): 'disable' is: true Info in KBmanager.initializeOnce(): initialized is true KBmanager.initializeOnce(): total init time in seconds: 95 KB.main() term depth of Object : 2 KB.main() term depth of Transaction : 6 KB.main() eqrel -1 KB.main() Object is shallower than Transaction

But it has been two ours than the webapp says it is initializing sigma and that wordnet is not initialized. Is this normal? My question is: if it is having trouble initializing, is it possible that it is stuck in a loop and that it doesn't give a warning or error saying what is the problem?

EDIT: catalina.out says:

Error reading configuration file in KBmanager.initializeOnce() java.lang.Exception: Error reading configuration file in KBmanager.initializeOnce()

Am I right in supposing he is talking about config.xml that should be in the .sigmakee/KBs folder? Cause it is there, together with the content from the sumo repository. Hmm, it is looking for sigmakee/null/KBs instead of sigmakee/KBs. Don't know what is that about.

apease commented 2 years ago

if you're seeing a null that would explain the problem. I'd suggest checking that you've set the environment variables as specified in the readme. If you do that and you're still stuck, send me or post your .bashrc and your config.xml

alkis05 commented 2 years ago

I did declare the env variables correctly, although I didn't put SIGMA_HOME at ~/.sigmakee, because I don't like having things there. So I pointed it to ~/.local/share/sigmakee. This is what those env variables look like, while I'm running ant (the following is the result of running $ export):

declare -x SIGMA_HOME="/home/vinic/.local/share/sigmakee/" declare -x SIGMA_SRC="/home/vinic/abs/sigmakeeBuild/sigmakee" declare -x ONTOLOGYPORTAL_GIT="/home/vinic/abs/sigmakeeBuild" declare -x `CATALINA_HOME="/usr/share/tomcat8/" declare -x CATALINA_OPTS="-Xmx10g"

I don't know how to paste xml code here, so here is a pastebin of my config.xml

I deleted everything and installed it back, but it was still looking at that "null" path was still there. So as a work around, I created a null directory and linked null/KBs to sigmakee/KBs and now it was able to finish initialization. I can browse the ontology now.

By the way, it seems there is a problem with the people.kif ontology.

Warning in KIF.parse() Parsing error in /home/vinic/.local/share/sigmakee/KBs/People.kif possible missed closing parenthesis near start line&58;

Is that a known issue? Anyway, thanks for the answer

apease commented 2 years ago

glad you found a workaround although there's something wrong that's generating the null path. Are you on Mac or Linux? I'm not a proper Mac user but seem to recall that one needs to set the .bash-profile on mac instead of .bashrc . The issue in People is just a typo. Was there a line number provided in the error after what you've copied?

alkis05 commented 2 years ago

line 58, it seems. Here is the full error:

Warning in KIF.parse() Parsing error in /home/vinic/.local/share/sigmakee/KBs/People.kif possible missed closing parenthesis near start line&58; 372 end line 0 for formula (<=> (and (instance ?Y (YearFn ?YEAR) (equal (MaleLifeExpectancyAtBirthFn ?AREA ?Y) ?REALNUMBER) (exists (?LIST) (and (instance ?LIST List) (instance (ListLengthFn ?LIST) ?COUNT) (forall (?LISTITEM) (=> (inList ?LISTITEM ?LIST) (and (instance ?LISTITEM ?LIFEEXPECTANCYAGE) (not (exists (?NUMBER) (and (instance ?NUMBER ?LIFEEXPECTANCYAGE) (not (inList ?NUMBER ?LIST))))) (equal ?COUNT (CardinalityFn (KappaFn ?LIFEEXPECTANCYAGE (and (instance ?BIRTH Birth) (experiencer ?BIRTH ?INDIVIDUAL) (instance ?INDIVIDUAL Human) (attribute ?INDIVIDUAL Male) (during (WhenFn ?BIRTH) ?Y) (equal (WhereFn ?BIRTH (WhenFn ?BIRTH)) ?AREA) (instance ?DEATH Death) (experiencer ?DEATH ?INDIVIDUAL) (holdsDuring (WhenFn ?DEATH) (age ?INDIVIDUAL (MeasureFn ?LIFEEXPECTANCYAGE YearDuration)))))))))) (average ?LIST ?REALNUMBER)))) and key [ant-WhereFn, ant-instance, ant-forall, ant-Male, ant-not, ant-KappaFn, ant-YearDuration, ant-=>, ant-experiencer, arg-0-<=>, ant-MeasureFn, ant-inList, ant-Death, ant-and, ant-average, ant-equal, ant-CardinalityFn, ant-Human, ant-exists, ant-during, ant-Birth, ant-MaleLifeExpectancyAtBirthFn, ant-List, ant-YearFn, ant-WhenFn, ant-age, ant-holdsDuring, ant-ListLengthFn, ant-attribute] keyset size 29 exp length 809 comment lines 75

I'm a linux user.

apease commented 2 years ago

ah, line 372, will fix shortly

apease commented 2 years ago

many thanks for the bug report, fixed and pushed to GitHub

apease commented 2 years ago

by the way, I see you are using "declare" rather than "export" in your .bashrc. I'm not familiar with that so it could be unrelated to the issues, but you might try using the commands as specified in the readme

alkis05 commented 2 years ago

Those declare are what appear when you just type $ export. It shows the state of the env variables. In the .bashrc I use just $ export VAR=/path/to/dir. I was just showing that the variables were set and I didn't forget to execute the .bashrc script or anything. If I had to guess, you can reproduce this problem by trying to install it setting a different path to ~/.sigmakee/KBs folder. I imagine there is something in the code to search for the default folder, but fail to use the correct KBs folder when using a non-default path to KBs. Maybe a typo on the variables. If you can't reproduce the issue by setting SIGMA_HOME to something different than ~/.sigmakee, than just write it off as incompetence on my part.

apease commented 2 years ago

many thanks for explaining. I'm eager to help if your workaround fails or something else goes wrong.