Hi,
Well, I bet this is a similar kind of thing to the previously-reported
problem. I'll give you a patch for Jess, you rerun your problem, and
see if any previously-unreported exceptions show up. Note to casual
readers: this is -not- a patch I'm recommending that everyone make:
this is just a debugging hack.
In jess/ReflectFunctions.java, at around line 1025, there is a finally
block. Modify it to look like this:
finally
{
// Regardless of what happens, we need to assert this now, since
// we retracted it before!
if (keepID)
fact = m_engine.assertKeepID(fact);
else
fact = m_engine.assert(fact);
}
// Note: add this line outside the finally block
return fact;
Recompile Jess, try your example again, and let me know what happens.
I think [EMAIL PROTECTED] wrote:
>
> Hello,
>
> I am having trouble a rule that has multiple objects on the LHS of a rule.
>
> Here is the rule:
> (defrule maturity-breakdown
> (matBreakdown
> (_lt_1_MktVal ?__lt_1_MktVal)
> (_btw1_5_MktVal ?__btw1_5_MktVal)
> (_btw5_10_MktVal ?__btw5_10_MktVal)
> (_btw10_20_MktVal ?__btw10_20_MktVal)
> (_btw20_30_MktVal ?__btw20_30_MktVal)
> (_gt_30_MktVal ?__gt_30_MktVal)
> (OBJECT ?matBreakDown))
>
> (credit
> (TIER_1_MKT_VAL ?__TIER_1_MKT_VAL) )
>
> =>
>
> (printout t "****JESS ENGINE**** started maturity-breakdown" crlf)
> (printout t "****JESS ENGINE**** ?__lt_1_MktVal " ?__lt_1_MktVal " ***" crlf)
> (printout t "****JESS ENGINE**** CREDIT:?__TIER_1_MKT_VAL " ?__TIER_1_MKT_VAL
>" ***" crlf)
> (printout t "****JESS ENGINE**** ?__lt_1_MktVal " ?__lt_1_MktVal " ***" crlf)
>
>**************************************************************************************************************
> Here is the java code:
> ........
> Rete rete = new Rete();
> rete.addUserpackage(new MiscFunctions());
> rete.addUserpackage(new jess.ReflectFunctions());
>
> // Read in the rules
> rete.executeCommand("(batch \"/rules/rules.clp\")");
> rete.executeCommand("(reset)");
>
> // Import objects into JESS
> Funcall f = new Funcall("definstance", rete);
> f.add(new Value("matBreakdown", RU.ATOM));
> f.add(new Value(matBreak));
> f.add(new Value("static", RU.ATOM));
> f.execute(rete.getGlobalContext());
>
> f = new Funcall("definstance", rete);
> f.add(new Value("credit", RU.ATOM));
> f.add(new Value(credit));
> f.add(new Value("static", RU.ATOM));
> f.execute(rete.getGlobalContext());
>
> rete.executeCommand("(run)");
> .........
>
>**************************************************************************************************************
>
> I get the following output:
>
> ****JESS ENGINE**** started maturity-breakdown
> ****JESS ENGINE**** ?__lt_1_MktVal
><External-Address:jess.SerializablePropertyDescriptor> ***
> ****JESS ENGINE**** CREDIT:?__TIER_1_MKT_VAL 2.3066504E7 ***
> ****JESS ENGINE**** ?__lt_1_MktVal
><External-Address:jess.SerializablePropertyDescriptor> ***
> ****JESS ENGINE**** completed maturity-breakdown
>
>
> The problem is in line 2. The variable " ?__lt_1_MktVal" should evaluate to a
>number. Instead, JESS
> responds with: "External-Address:jess.SerializablePropertyDescriptor". The really
>strange thing is that if I have
> one rule for each object separately everything works fine. I saw the previous msg.
>about a similar problem where
> an exception was being thrown and that is not the case here. There are no
>exceptions being thrown. Also, I can sucessfully
> call the in question methods of the object via java code (on the same instance of
>the object that is passed into jess) before
> and after passing the object into JESS. For some reason JESS cannot access the
>object in question. Furthermore this is
> not isolated to one object in particular.
>
> Does anybody have any ideas???
>
>
> Thanks,
>
> -Marijan
>
>
>
> ---------------------------------------------------------------------
> 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]
> ---------------------------------------------------------------------
>
---------------------------------------------------------
Ernest Friedman-Hill
Distributed Systems Research Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
Org. 8920, MS 9012 [EMAIL PROTECTED]
PO Box 969 http://herzberg.ca.sandia.gov
Livermore, CA 94550
---------------------------------------------------------------------
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]
---------------------------------------------------------------------