I think Satish boggavarapu wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> 
> Hi All,
> 
> I am trying to create definstances on a set of beans which has an ArrayList
> in it with out much success. I am enclosing the error log and the code
> snippets here. I appreciate any help indicating where i am going wrong.
> 
> public interface Test1Intf {
...
>     public ArrayList getLinks();
>     public void setLinks(ArrayList aList);
...
> public class Test2 extends Test1 implements Test2Intf {
> ...................
> }
> 
...
> (defclass test1 jess.examples.pumps.Test1Intf)
> (defclass test2 jess.examples.pumps.Test2Intf extends test1)
> 
...
> 
> (defrule testbeans2 
>       (test2 (name ?name) (clli ?clli) (netPlane 1) (link ?link)
>       =>
>       (printout t "The NE matched is :" ?name ?link crlf)
> )
> 
> 
> I am getting the following error. Where am i going wrong?
> 

Sorry that Jess doesn't do a better job of reporting this error in a
sensible way. The message "Bad index -3 in call to get() on this
vector..." when defining a rule always means you've tried to match a
nonexistent slot; usually it's a typo. The rule testbeans2 above is
trying to match a slot named "link", but there is no such slot in any
of your defclasses: there is, though, one named "links", as I've shown
in Test1Intf above.

> java jess.examples.pumps.Test
> Exception in thread "main" Jess reported an error in routine ValueVector.get
>       while executing (batch jess/examples/pumps/test.clp).
>   Message: Bad index -3 in call to get() on this vector:  (clli
> <External-Address:jess.SerializablePropertyDescriptor> -1 links
> <External-Address:jess.SerializablePropertyDescriptor> -1 location
> <External-Address:jess.SerializablePropertyDescriptor> -1 name
> <External-Address:jess.SerializablePropertyDescriptor> -1 netPlane
> <External-Address:jess.SerializablePropertyDescriptor> -1 OBJECT nil 2048).




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