> 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 unexpectedly, etc.

These kinds of exception bubble up to the top level exception handler, which will always be Jess if you are instantiating object or calling methods from jess script. This doesn't mean Jess has a "problem" with the underlying library, Jess is simply the messenger of bad news.

My SWAG is that the repast library or something it depends on is not in your classpath or that a static initializer is failing somewhere along the way.

Good luck!

alan



Scott Moss wrote:
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.markets.User))
  (multislot attribute_demands)
  (slot class)
  (multislot location)
  (slot name)
  (slot OBJECT))
Jess reported an error in routine new
       while executing (new User "harvey")
       while executing (bind ?user-agent (new User "harvey"))
       while executing (batch testing.clp).
 Message: Constructor threw an exception.
 Program text: ( batch testing.clp )  at line 1.

Nested exception is:
uchicago/src/sim/util/Random

So from Eclipse, the nexted exception is reported as null -- I guess it isn't picking up the actual error -- while from the command line call it reports the class giving rise to the exception -- though not the exception itself. So I dropped the random number generator I was using (from RePast) and substituted from the standard Java Random class and this solved the problem.

regards
scott

friedman_hill ernest j wrote:

I think Scott Moss wrote:

Jess reported an error in routine new
   while executing (new User "harvey")
   while executing (bind ?user-agent (new User "harvey")).
 Message: Constructor threw an exception.
 Program text: ( bind ?user-agent ( new User "harvey" ) )  at line 16.

Nested exception is:
null



Run Jess like this:

 java jess.Main -stacktrace myfile.clp

and you'll get a more detailed traceback. You should see the actual
stack trace of the exception the constructor throws. That will surely
give us a clue.




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

Reply via email to