Note that the line that you say gives you an error --
"rete.assertString(...)" -- couldn't possibly give you the error that
says "Bad index... while executing (batch test.clp)", since it's a
line of Java code, not a line in a batch file. Perhaps you've defined
the deftemplate in test.clp, but that file contains an error, such
that the later line in your program that asserts the cust_order fact
simple never gets executed.

As always, my advice remains: try all batch files from the Jess>
prompt first. Make sure they work. Do some testing. Using
(watch). Then make sure that running the batch file from Java
works. Then add one line of Java code at a time. This is how to do
programming in general: always make sure that you do things one step
at a time, so that when something breaks, you know without a doubt
that it was the last thing you did that was wrong.


I think Archana Raghavendra wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Hi,    
>      I have a question about asserting facts in a jess engine from a java program. I 
>have this template with me :
> 
> (deftemplate cust_order (slot order-num) (slot item-id) (slot qty) (slot 
>date-of-order))
> 
> and I assert a fact as:
> 
> rete.assertString("(cust_order (order-num 10) (item-id 2) (qty 25) (date-of-order 
>21))");
> 
> however, the above fact does not get inserted. I get an error message saying 
> 
> "Bad index in Value Vector.get()" while executing (batch test.clp)
> 
> test.clp is a file which has the template I defined above.
> 
> I am unable to understand this problem. Would really appreciate if you could help me 
>with this..
> 
>  Waiting to hear from you,
> 
> Thanks,
> Archana



---------------------------------------------------------
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]
---------------------------------------------------------------------

Reply via email to