I think David Firmin wrote: > I'm trying to create shadow facts that subclass a deftemplate that's > already been added to the Rete. When I try and add the java bean using > definstance I get a ClassCastException as follows: > > java.lang.ClassCastException > at jess.DefinstanceList.createNewShadowFact(DefinstanceList.java:206) > at jess.DefinstanceList.definstance(DefinstanceList.java:275)
Jess is assuming that the given class "looks like" a subclass of the deftemplate -- i.e., if the template has slots foo and bar, then the class had better have getFoo() and getBar() methods. It can have additional properties as well, of course, as befits a subclass. In any case, this is a lousy error message -- Jess should explicitly detect and report this problem. --------------------------------------------------------- Ernest Friedman-Hill Advanced Software Research Phone: (925) 294-2154 Sandia National Labs FAX: (925) 294-2234 PO Box 969, MS 9012 [EMAIL PROTECTED] Livermore, CA 94550 http://herzberg.ca.sandia.gov -------------------------------------------------------------------- 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] --------------------------------------------------------------------