Hi,
None of Jess's defclass/definstance/new/call/get-member functions will
work in unsigned applets. As the exception says, Netscape considers
the Java Reflection API Jess is using to be a security problem.
I will say this one more time:
*** Don't use Applets. ***
*** Applets are only good for dancing elf animations. ***
*** Use Jess on the server side, perhaps in a servlet. ***
It is exceedingly likely that Jess 5.0 final will come with a servlet
example but -without- an applet example.
If you absolutely must use Jess in an applet, you're going to need to
use digital signatures. Here's a web page with a lot of good info
about this process:
http://www.suitable.com/Doc_CodeSigning.shtml
I think Fang Liu wrote:
>
> Hi, jess-users:
>
> I am having a problem with applet and security. What I want to do is to
> create an object inside an applet and I can later on use the object as a
> fact or template to fire some rules. However, I can not do it. I got
> stuck with "defclass" (see the following code). What did I do wrong? I
> need some help here. Any comments are appreciated.
>
> By the way, I already added all the userpackages for the rete engine to
> avoid any "function not implemented" error .
>
> ...
> rete.executeCommand("(store Mytank (new jess.examples.pumps.Tank
> \"MMM\"))");
> rete.executeCommand("(printout t (fetch Mytank) crlf crlf)");
> rete.executeCommand("(defclass mytank
> jess.examples.pumps.Tank)");
>
> rete.executeCommand("(definstance mytank (fetch Mytank))");
> ...
>
> The following is the error message in Netscape 4.51 java
> console:
>
>
> Tank MMM level now 495
> <External-Address:jess.examples.pumps.Tank>
>
> netscape.security.AppletSecurityException: security.member access at
> netscape.security.AppletSecurity.checkMemberAccess(AppletSecurity.java:1155)
> at
> netscape.security.AppletSecurity.checkMemberAccess(AppletSecurity.java:1143)
> at java.lang.Class.checkMemberAccess(Class.java:698)
> at java.lang.Class.getDeclaredMethods(Class.java:555)
> at java.beans.Introspector.getTargetEventInfo(Introspector.java:444)
> at java.beans.Introspector.getBeanInfo(Introspector.java:200)
> at java.beans.Introspector.getBeanInfo(Introspector.java:83)
> at java.beans.Introspector.<init>(Introspector.java:178)
> at java.beans.Introspector.getBeanInfo(Introspector.java:83)
> at jess.reflect.Defclass.call(ReflectFunctions.java:869)
> at jess.Funcall.simpleExecute(Funcall.java:336)
> at jess.Funcall.execute(Funcall.java:297)
> at jess.Funcall.execute(Funcall.java:196)
> at jess.Jesp.parseAndExecuteFuncall(Jesp.java:1386)
> at jess.Jesp.parseSexp(Jesp.java:161)
> at jess.Jesp.parse(Jesp.java:61)
> at jess.Rete.executeCommand(Rete.java:1091)
> ....
> Thanks.
>
> Fang Liu
> ---------------------------------------------------------------------
> 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]
> ---------------------------------------------------------------------
>
>
---------------------------------------------------------
Ernest Friedman-Hill
Distributed Systems Research Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
Org. 8920, MS 9214 [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]
---------------------------------------------------------------------