|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
JESS: FYI: Confusing error messageJess throws an error at me that I don't really understand. The error
trace as attached. My code used to work earlier, but this has happened when I pulled up some common code from two related "...Track" classes into a common "Track" superclass. What confuses me most is that the IAE message specifically complains about '...modifiers "public"'. A quick Google search and some guessing led me to conclude that Jess requires that the superclass should have "public" rather than default visibility. That makes sense, but it would be nice if it said so. grtz -+- JW -+- Jess reported an error in routine DefinstanceList.updateMultipleSlots while executing (definstance SensorTrack (new platformcoverage.SensorTrack ?p ?task-sensor)) while executing defrule MAIN::create-SensorTrack while executing (call (engine) runUntilHalt) while executing deffunction run-until-halt while executing (run-until-halt). Message: Method is not accessible. Program text: ( run-until-halt ) at line 1 in file <eval pipe>. at jess.DefinstanceList.getSlotValueFromObject(DefinstanceList.java:326) at jess.DefinstanceList.setAllSlotValuesFromObject(DefinstanceList.java:303) at jess.DefinstanceList.createNewShadowFact(DefinstanceList.java:281) at jess.DefinstanceList.definstance(DefinstanceList.java:76) at jess.Rete.definstance(Rete.java:2268) at jess.Definstance.call(Definstance.java:54) at jess.FunctionHolder.call(FunctionHolder.java:35) at jess.Funcall.execute(Funcall.java:338) at jess.Defrule.fire(Defrule.java:395) at jess.Activation.fire(Activation.java:98) at jess.Agenda.run(Agenda.java:267) at jess.Agenda.run(Agenda.java:243) at jess.Agenda.runUntilHalt(Agenda.java:225) at jess.Rete.runUntilHalt(Rete.java:1889) at jess.Rete.runUntilHalt(Rete.java:1884) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at jess.Call.call(Call.java:185) at jess.FunctionHolder.call(FunctionHolder.java:35) at jess.Funcall.execute(Funcall.java:338) at jess.FuncallValue.resolveValue(FuncallValue.java:29) at jess.Deffunction.call(Deffunction.java:214) at jess.FunctionHolder.call(FunctionHolder.java:35) at jess.Funcall.execute(Funcall.java:338) at jess.Jesp.parseAndExecuteFuncall(Jesp.java:2309) at jess.Jesp.parseExpression(Jesp.java:459) at jess.Jesp.promptAndParseOneExpression(Jesp.java:309) at jess.Jesp.parse(Jesp.java:288) at jess.Rete.eval(Rete.java:2583) at jess.Rete.eval(Rete.java:2538) at jesskb.JessKB.cmd(JessKB.java:108) at Beans.UntilHalt$1.run(UntilHalt.java:22) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.IllegalAccessException: Class jess.SerializablePD can not access a member of class platformcoverage.Track with modifiers "public" at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65) at java.lang.reflect.Method.invoke(Method.java:588) at jess.SerializablePD.getPropertyValue(SerializablePD.java:51) at jess.DefinstanceList.getSlotValueFromObject(DefinstanceList.java:317) ... 34 more -------------------------------------------------------------------- To unsubscribe, send the words 'unsubscribe jess-users you@...' in the BODY of a message to majordomo@..., NOT to the list (use your own address!) List problems? Notify owner-jess-users@.... -------------------------------------------------------------------- |
|
|
Re: JESS: FYI: Confusing error messageOn Jun 17, 2009, at 7:48 AM, Jan Willem Lokin wrote: > Jess throws an error at me that I don't really understand. The error > trace as attached. My code used to work earlier, but this has happened > when I pulled up some common code from two related "...Track" classes > into a common "Track" superclass. What confuses me most is that the > IAE message specifically complains about '...modifiers "public"'. A > quick Google search and some guessing led me to conclude that Jess > requires that the superclass should have "public" rather than default > visibility. That makes sense, but it would be nice if it said so. Java's rules for accessibility via reflection in cases like this actually don't make much sense. That said, Jess understands and works around them to the extent possible. It sounds like you might have found a novel arrangement that's not being handled correctly; can you share the source for the base class and one of its children with me? (You can send it to me directly at ejfried@... ). > --------------------------------------------------------- Ernest Friedman-Hill Informatics & Decision Sciences, Sandia National Laboratories PO Box 969, MS 9012, Livermore, CA 94550 http://www.jessrules.com -------------------------------------------------------------------- To unsubscribe, send the words 'unsubscribe jess-users you@...' in the BODY of a message to majordomo@..., NOT to the list (use your own address!) List problems? Notify owner-jess-users@.... -------------------------------------------------------------------- |
| Free embeddable forum powered by Nabble | Forum Help |