Hi, The rule below is giving the error shown because you're calling Enumeration method on an object, but it's an Iterator (AbstractList$Itr). The return type of (run-query) was changed during the early Jess 6 alpha period. The problem is just that you're using an older version of the manual with a newer version of Jess. Make sure to use the manual that actually came with your software, not one from the Jess Web site (those are just there for prospective Jess users to browse, they're not intended as a reference for actual users.) Anyway, the relevant section of the latest Jess 6 manual has been vastly improved, so check it out. I think Dr. Laurence Leff wrote: > (defrule exrule1 > "show Problem" > (tag (text "root") (value "blah") (elementid ?start) (parent 0) ) > => > (bind ?e (run-query search ?start)) > (while (?e hasMoreElements) > (printout t (call (call ?e nextElement) fact 1)) > ) ... > > This generates an error from java: > > Jess reported an error in routine call > while executing (call ?e hasMoreElements) > while executing (while (call ?e hasMoreElements) (printout t (call (call ?e >nextElement) fact 1))) > while executing defrule exrule1 > while executing (run). > Message: No method named 'hasMoreElements' found in class >java.util.AbstractList$Itr. > Program text: ( run ) at line 40. > --------------------------------------------------------- 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] ---------------------------------------------------------------------
