Re: JESS: code works from java but not clp file

2005-10-11 Thread Scott Moss
Thanks, Alan. That's a very useful trick. Interestingly, adding "(?ERROR getStackTrace)" to your code caused me another error :-D that I won't bother to follow up for the moment. To get the full stacktrace in 7.0 using the shell or batch files, Dr Friedman-Hill suggests "jess -stacktrace fil

Re: JESS: code works from java but not clp file

2005-10-11 Thread Alan Moore
> I wonder if anyone else running Jess with RePast has encountered a > similar problem. When people have trouble using Jess with one java library or another, such as repast, the problems tend to be generic java problems, e.g. missing library on the classpath, methods throwing exceptions unexpe

Re: JESS: code works from java but not clp file

2005-10-11 Thread Alan Moore
Also, in testing.clp, you can place the following code to help you debug the exception: ;; untested...ymmv (try (bind ?user-agent (new User "harvey")) catch ;; ?ERROR will be the caught throwable (printout t "ERROR = " (?ERROR toString) crlf) (printout t "cause = " ((?ERROR getCause)

Re: JESS: code works from java but not clp file

2005-10-11 Thread Scott Moss
Hi. In starting to sort out how to run Jess from Java as you suggested, I first ran the test file from Jess command line in a bash shell. The error message was now: Jess> (batch testing.clp) (deftemplate MAIN::agent "$JAVA-OBJECT$ org.cfpm.markets.User" (declare (from-class org.cfpm.mark

Re: JESS: code works from java but not clp file

2005-10-11 Thread ejfried
I think Scott Moss wrote: > The setter and getter are: > > public void setAttributedemands(ValueVector attributes) { > attributedemands = attributes; > } > > public ValueVector getAttributedemands() { > return attributedemands; > } > Don't define JavaBean proper

JESS: code works from java but not clp file

2005-10-11 Thread Scott Moss
I have been building an agent based model in parallel directly from Jess (in Eclipse) and from Java. The method that causes the jess (but not Java) error is inherited from the MarketAgent superclass. Code that works in Java but not Jess is this: public class User extends MarketAgent { Val