Well, hmmm. Never seen this before.
Are you sure the (definstance) call that creates this isn't throwing
an exception? Looking at the code, I see I've written such that it's
possible for definstance to abort with an exception but still put a
new fact on the fact list (which is definitely a Jess bug, whether
it's the root of your problems or not.) Is it possible that
getCurweight() throws an exception?
I think alan littleford wrote:
> I'm using Jess 5.1 and I have a javabean UserProfile that I am defclassing. If I
> (ppdeftemplate) the result I get the following:
>
> Reaper:RETE:(deftemplate UserProfile extends __fact "$JAVA-OBJECT$
> com.hi.model.UserProfile"
> (slot class (default <External-Address:jess.SerializablePropertyDescriptor>)
> (slot creationdate (default
> <External-Address:jess.SerializablePropertyDescriptor>)
> (slot curweight (default <External-Address:jess.SerializablePropertyDescriptor>)
> (slot dob (default <External-Address:jess.SerializablePropertyDescriptor>)
> (slot gender (default <External-Address:jess.SerializablePropertyDescriptor>)
> (slot height (default <External-Address:jess.SerializablePropertyDescriptor>)
> (slot id (default <External-Address:jess.SerializablePropertyDescriptor>)
> (slot implInfo (default <External-Address:jess.SerializablePropertyDescriptor>)
> (slot lastaccesstime (default
> <External-Address:jess.SerializablePropertyDescriptor>)
> (slot log (default <External-Address:jess.SerializablePropertyDescriptor>)
> (slot profileData (default <External-Address:jess.SerializablePropertyDescriptor>)
>
> (slot regweight (default <External-Address:jess.SerializablePropertyDescriptor>)
> (slot user (default <External-Address:jess.SerializablePropertyDescriptor>)
> (slot userInfo (default <External-Address:jess.SerializablePropertyDescriptor>)
> (slot valid (default <External-Address:jess.SerializablePropertyDescriptor>)
> (slot OBJECT (type 2048))
>
> which looks correct. I now definstance an instance of the bean and do a (facts)
> where I get the following:
>
> :f-3 (UserProfile (class <External-Address:java.lang.Class>)
> (creationdate <External-Address:java.sql.Timestamp>)
> (curweight <External-Address:jess.SerializablePropertyDescriptor>)
> (dob <External-Address:jess.SerializablePropertyDescriptor>)
> (gender <External-Address:jess.SerializablePropertyDescriptor>)
> (height <External-Address:jess.SerializablePropertyDescriptor>)
> (id <External-Address:jess.SerializablePropertyDescriptor>)
> (implInfo <External-Address:jess.SerializablePropertyDescriptor>)
> (lastaccesstime <External-Address:jess.SerializablePropertyDescriptor>)
> (log <External-Address:jess.SerializablePropertyDescriptor>)
> (profileData <External-Address:jess.SerializablePropertyDescriptor>)
> (regweight <External-Address:jess.SerializablePropertyDescriptor>)
> (use <External-Address:jess.SerializablePropertyDescriptor>)
> (userInfo <External-Address:jess.SerializablePropertyDescriptor>)
> (valid <External-Address:jess.SerializablePropertyDescriptor>)
> (OBJECT <External-Address:com.hi.model.UserProfile>
>
> The problem here is that ther than the slots OBJECT and creationdate the slots
> don't seem to have values - rather they are still SerializablePropertyDescriptors.
> For instance the slot height is coming from public double getHeight() and public
> void setHeight(double height) so I would expect to be seeing (height 6.1) or some
> such. Indeed when I use the fact in the LHS of a rule and attempt to (test..) the
> value of slot height I explode (here ?ht is the variable used in the height slot in
> the rules's LHS):
> ----
> Jess reported an error in routine Value.numericValue while executing (< ?ht 4.5)
> while executing (or (< ?ht 4.5)) while executing 'test' CE while executing rule LHS
> (Node2) while executing rule LHS (TECT) while executing (definstance
> GoalTargetWeightEvent ?obj dynamic) while executing defrule sanity-check-setup-1
> while executing (run). Message: Not a number:
> "<External-Address:jess.SerializablePropertyDescriptor>" (type = EXTERNAL_ADDRESS).
>
> ----
> The odd thing about this is I have other defclass/definstance beans which are all
> working just fine. The UserProfile JavaBean seems just fine.
>
> Sign me "stumped in California"
>
> Tnx
> Alan Littleford
>
---------------------------------------------------------
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]
---------------------------------------------------------------------