Hi Anton.

Is the xmlrpc server on the same machine that your loading the applet from?
I believe that the only sockets that are allowed from within an applet are
ones
that connect to the originating server that the applet was downloaded from.
If this is not the case, then you will have to create a jar achieve for your
applet
and sign it.  This will allow the client user to state whether or not to let
your applet
run in an unrestricted jvm, one without a security manager.

I can't tell you how to do this.  I have never created a signed applet
before, but
I'm sure there are plenty of sites out there that do a step-by-step walk
thru.

Hope this helps you find a solution.
Scott Duclos


----- Original Message -----
From: "Anton Litvinenko" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 13, 2002 9:59 AM
Subject: AccessControlException in applet


> Hello,
>
> I am trying to run applet, that connects to Server and tries to execute
> methods via xmlrpc.
>
> The connecion establishes, but when applet tries to call a method a
> java.security.AccessControlException appears....
>
> please help me to solve this problem
>
> Exception TRace:
> java.security.AccessControlException: access denied
> (java.lang.RuntimePermission accessClassInPackage.sun.misc)
> at java.security.AccessControlContext.checkPermission(Unknown Source)
> at java.security.AccessController.checkPermission(Unknown Source)
> at java.lang.SecurityManager.checkPermission(Unknown Source)
> at java.lang.SecurityManager.checkPackageAccess(Unknown Source)
> at sun.applet.AppletSecurity.checkPackageAccess(Unknown Source)
> at sun.applet.AppletClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClassInternal(Unknown Source)
> at
org.apache.xmlrpc.applet.SimpleXmlRpcClient.execute(SimpleXmlRpcClient.java)
> at org.apache.xmlrpc.applet.XmlRpcApplet.execute(XmlRpcApplet.java)
> at xmlrpc.init(xmlrpc.java:29)
> at sun.applet.AppletPanel.run(Unknown Source)
> at java.lang.Thread.run(Unknown Source)
>
> Applet Code:
>
> public void init() {
>     try {
>       jbInit();
> System.out.println("client init ");
>       initClient(6666);
>       Vector params = new Vector ();
>       params.addElement ("Hello World");
>       // this method returns a string
> System.out.println("executin the query");
>       String result = (String) execute ("echo", params);
>       System.out.println(result);
>       textField1.setText("result");
>
>     }
>     catch(Exception e) {
>       e.printStackTrace();
>     }
>   }
>
>
>
> sincerely Yours,
> ANTON Litvinenko.
>
>
>

Reply via email to