Thanks for the suggestion, I expanded the errormessage function and found out 
that nothing went wrong in Jess. Because the getCause() was null.
The error was in my own java code which was processed after the insertion of 
the fact.

Teun


-----Oorspronkelijk bericht-----
Van: [email protected] [mailto:[email protected]] Namens 
Ernest Friedman-Hill
Verzonden: donderdag 19 februari 2009 17:24
Aan: jess-users
Onderwerp: Re: JESS: Problem with adding a fact to the rete engine in Java

If we had the whole stack trace (including the getCause() exception,
if there is one) it would tell us where you are in Jess when you get
the exception. As it is, we can't tell where things might be going
wrong.


On Feb 19, 2009, at 10:31 AM, Theunissen, Teun wrote:

>
>
> I am creating a fact in a java method. When I add this fact to the
> rete engine I get the following error:
>
> An error occurred at line: -1
> which look like: null
> Errormessage: No slot __data in deftemplate  MAIN::answer
>
>
> The problem is that the answer fact is an unordered fact and the
> deftemplate is defined in the MAIN module.
> It seems that the rete engine handles this fact as an ordered fact.
> What can I do to solve this problem?
>
> The java code that builds the fact:
>
> public void assertAnswer(String identifier, String answer, int
> valuetype)  {
>   try {
>     Fact afct = new Fact("answer", m_rete);
>
>     afct.setSlotValue("ident", new Value(identifier,RU.SYMBOL));
>     afct.setSlotValue("text", new Value(answer,valuetype));
>     System.out.println(afct.toString());
>     m_rete.assertFact(afct);
>
> The messages on the console:
>
> Focus: MAIN
> (MAIN::answer (ident IL1_1) (text NEE))
> JessEvent: [JessEvent: a fact was asserted]
> An error occurred at line: -1
> which look like: null
> Errormessage: No slot __data in deftemplate  MAIN::answer
>
> Kind regards
> Teun Theunissen
>
>

---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences          Phone: (925) 294-2154
Sandia National Labs
PO Box 969, MS 9012                            [email protected]
Livermore, CA 94550                             http://www.jessrules.com





--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [email protected]'
in the BODY of a message to [email protected], NOT to the list
(use your own address!) List problems? Notify [email protected].
--------------------------------------------------------------------



--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [email protected]'
in the BODY of a message to [email protected], NOT to the list
(use your own address!) List problems? Notify [email protected].
--------------------------------------------------------------------

Reply via email to