[Mulgara-general] Unable to load a Krule file into Mulgara

Ghazzaoui, Ramez (NIH/NLM/LHC) [C] ghazzaouir at mail.nih.gov
Thu Mar 27 08:49:26 PDT 2008


Paul, 

 

Thank you for your suggestion. 

 

I have verified that the file I updated (removed empty argument and
added self-trigger) is the same one that I am loading. 

 

However, it turns out that I was deleting the entailed graph but not the
rules graph. So, per these commands: 

 

    create <rmi://localhost/server1#krm_nida_sameAs>;

    create <rmi://localhost/server1#nida_1_ent_sameAs>;

 

    load <file:/export/home/moradmin/mulgara/rules/krm_nida_sameAs.rdf>

    into <rmi://localhost/server1#krm_nida_sameAs>;

 

    apply <rmi://localhost/server1#krm_nida_sameAs>

    to <rmi://localhost/server1#nida_1>

       <rmi://localhost/server1#nida_1_ent_sameAs>;

 

I was dropping <krm_nida_sameAs> and I even tried dropping
<nida_1_ent_sameAs> which I knew was not necessary, but I did not bother
to drop <krm_nida_sameAs>!! 

 

This was the problem, and combined with the empty argument, it was
causing the KruleLoader NullPointerException with Mulgara 1.1.1 

 

So now I'm past that error and I can see the "not enough insertion
elements" error. With that fixed, and THANK YOU SO MUCH for pointing it
out, the rule finally loaded with no error! 

 

In summary, you have found three problems with what I did: 

 

1-  The empty argument in the rule, 

2-  The need to delete the graph model, not just the entailed model, and


3-  The missing # sign in the resource reference name within the SELECT.


 

Problem solved. You are a good man.  I cannot thank you enough. 

 

This said, 

 

Getting the latest Mulgara seems to require the use of a Subversion
client which apparently only comes packaged with the Subversion server.
The other option I see is to download all the files in the trunk one by
one using a web browser. Both of these options are cumbersome. Can you
think of another option? Would it be possible for you maybe to post a
ZIP of the trunk for download from your web site? 

 

-Ramez 

 

 

 

________________________________

From: Paul Gearon [mailto:gearon at ieee.org] 
Sent: Wednesday, March 26, 2008 3:57 PM
To: Mulgara General
Subject: Re: [Mulgara-general] Unable to load a Krule file into Mulgara

 

We probably are in different environments, as I use the latest SVN
checkout, and I'm guessing that you are in the latest "released" code.
The trunk from SVN is actually a better option, as it MUST pass all
tests to be checked in, and it has numerous bug fixes and a couple of
features beyond the latest release.  So I'd recommend updating to that
if you can.

 

That said, there had not been any changes in the rules code for some
time, so this should have been identical.  Yesterday I checked in a
couple of changes - to accept some empty arguments without giving null
pointer exceptions, and to give some more meaningful messages on errors,
but that is it. Other than that, the code I've been running should be
identical to yours. I even unwound my changes to confirm that removing
the empty <argument> was making it get past the null pointer exception.

 

So, can I please confirm the following:

1.  Are you sure that the file you updated is the same one that you are
loading?

2.  Are you dropping the graph that contains the rules before you load
the updated rules? There will be no warnings if you add updated rules to
an existing set of rules.  Because of the use of blank nodes, the old
rule data will not be over written - you will end up with a second set
of data.

 

Regards,

Paul

 

On Mar 26, 2008, at 12:57 PM, Ghazzaoui, Ramez (NIH/NLM/LHC) [C] wrote:



Thank you for all this. I am sort of at a loss regarding the NullPointer
Exception now. I've cleaned up the file, removed the empty argument and
added a trigger to the rule itself, yet I still get the same error.
Clearly you and I are working in different environments. I don't know
how we can move forward productively now...

 

Cheers,

 

-Ramez

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mulgara.org/pipermail/mulgara-general/attachments/20080327/60cf0349/attachment-0001.html 


More information about the Mulgara-general mailing list