You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@ws.apache.org by Anton Litvinenko <sh...@math.ut.ee> on 2002/03/13 15:59:17 UTC

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.


Re: AccessControlException in applet

Posted by Scott Duclos <sd...@fulfill-net.com>.
Anton,

Sorry if I stated the obvious before.  Heres another possibility for it not
working.   Taken from the sun faq on java applets.

----------------------------------------------------------------------------
------------------------------
How can an applet open a network connection to its originating host?
Be sure to name the originating host exactly as it was specified when the
applet was loaded into the browser.

That is, if you load an HTML page using the URL

http://foo.state.edu/~me/appletPage.html

then your applet will be able to connect to its host only by using the name
foo.state.edu.
Using the IP address for foo.state.edu won't work, and using a "shorthand"
form
of the host name, like foo.state instead of foo.state.edu, won't work.
----------------------------------------------------------------------------
-------------------------------

Do you think that this is the problem?

Scott Duclos


----- Original Message -----
From: "Anton Litvinenko" <sh...@math.ut.ee>
To: <rp...@xml.apache.org>
Sent: Wednesday, March 13, 2002 10:30 AM
Subject: Re: AccessControlException in applet


> HEllo!
>
> yes, xmlrpc server runs on the same machine that my applet loads from.
>
> is there any other possibilities except Signing the applet???
>
> Anton.
>
> On Wed, 13 Mar 2002, Scott Duclos wrote:
>
> > 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" <sh...@math.ut.ee>
> > To: <rp...@xml.apache.org>
> > 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.
> > >
> > >
> > >
> >
>
> Lugupidamisega,
>  ANTON Litvinenko.
>
>
>


Re: AccessControlException in applet

Posted by Scott Duclos <sd...@fulfill-net.com>.
Anton,

Sorry if I stated the obvious before.  Heres another possibility for it not
working.   Taken from the sun faq on java applets.

----------------------------------------------------------------------------
------------------------------
How can an applet open a network connection to its originating host?
Be sure to name the originating host exactly as it was specified when the
applet was loaded into the browser.

That is, if you load an HTML page using the URL

http://foo.state.edu/~me/appletPage.html

then your applet will be able to connect to its host only by using the name
foo.state.edu.
Using the IP address for foo.state.edu won't work, and using a "shorthand"
form
of the host name, like foo.state instead of foo.state.edu, won't work.
----------------------------------------------------------------------------
-------------------------------

Do you think that this is the problem?

Scott Duclos


----- Original Message -----
From: "Anton Litvinenko" <sh...@math.ut.ee>
To: <rp...@xml.apache.org>
Sent: Wednesday, March 13, 2002 10:30 AM
Subject: Re: AccessControlException in applet


> HEllo!
>
> yes, xmlrpc server runs on the same machine that my applet loads from.
>
> is there any other possibilities except Signing the applet???
>
> Anton.
>
> On Wed, 13 Mar 2002, Scott Duclos wrote:
>
> > 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" <sh...@math.ut.ee>
> > To: <rp...@xml.apache.org>
> > 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.
> > >
> > >
> > >
> >
>
> Lugupidamisega,
>  ANTON Litvinenko.
>
>
>


Re: AccessControlException in applet

Posted by Anton Litvinenko <sh...@math.ut.ee>.
HEllo!

yes, xmlrpc server runs on the same machine that my applet loads from.

is there any other possibilities except Signing the applet???

Anton.

On Wed, 13 Mar 2002, Scott Duclos wrote:

> 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" <sh...@math.ut.ee>
> To: <rp...@xml.apache.org>
> 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.
> >
> >
> >
>

Lugupidamisega,
 ANTON Litvinenko.


Re: AccessControlException in applet

Posted by Anton Litvinenko <sh...@math.ut.ee>.
HEllo!

yes, xmlrpc server runs on the same machine that my applet loads from.

is there any other possibilities except Signing the applet???

Anton.

On Wed, 13 Mar 2002, Scott Duclos wrote:

> 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" <sh...@math.ut.ee>
> To: <rp...@xml.apache.org>
> 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.
> >
> >
> >
>

Lugupidamisega,
 ANTON Litvinenko.


Re: AccessControlException in applet

Posted by Scott Duclos <sd...@fulfill-net.com>.
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" <sh...@math.ut.ee>
To: <rp...@xml.apache.org>
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.
>
>
>


Re: AccessControlException in applet

Posted by Scott Duclos <sd...@fulfill-net.com>.
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" <sh...@math.ut.ee>
To: <rp...@xml.apache.org>
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.
>
>
>


Re: AccessControlException in applet

Posted by Anton Litvinenko <sh...@math.ut.ee>.
Hi!

I am completely stuck :-(

Could anyone be so kind and provide me with workin example of applet, that
uses XML-RPC for connection with server???



Sincerely Yours,
 ANTON Litvinenko.


Re: AccessControlException in applet

Posted by Anton Litvinenko <sh...@math.ut.ee>.
Hi!

I am completely stuck :-(

Could anyone be so kind and provide me with workin example of applet, that
uses XML-RPC for connection with server???



Sincerely Yours,
 ANTON Litvinenko.


Re: AccessControlException in applet

Posted by Gereanu Raul <ra...@fiba.ro>.
For the Internet Explorer to bypass the security manager, set from the menu:

Tools\Internet Option\Security\Trusted Sites\Custom Level\Microsoft Vm\Java
Custom Settings button\Edit Permision\Run Unsigned content Enable and Run
signed content Enable.

Add the site from where you running the applet in the trusted sites list.
----- Original Message -----
From: "Anton Litvinenko" <sh...@math.ut.ee>
To: <rp...@xml.apache.org>
Sent: Wednesday, March 13, 2002 4:59 PM
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.


Re: AccessControlException in applet

Posted by Gereanu Raul <ra...@fiba.ro>.
For the Internet Explorer to bypass the security manager, set from the menu:

Tools\Internet Option\Security\Trusted Sites\Custom Level\Microsoft Vm\Java
Custom Settings button\Edit Permision\Run Unsigned content Enable and Run
signed content Enable.

Add the site from where you running the applet in the trusted sites list.
----- Original Message -----
From: "Anton Litvinenko" <sh...@math.ut.ee>
To: <rp...@xml.apache.org>
Sent: Wednesday, March 13, 2002 4:59 PM
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.


Re: AccessControlException in applet

Posted by Anton Litvinenko <sh...@ut.ee>.
WOOW!!!

thanks!!! seems to be working now!!!

This is due to the fact the 1.0 distribution of XML-RPC uses the
> sun.misc Base64 encoder/decoder classes so as to encode/decode binary
> parts of XML-RPC messages in the applet package.
YEAP, that was the problem... i changed JAR files to those from
http://www.activemath.org/~ilo/revisions/xmlrpc/
and now applet works, at least under SUN JVM 1.3.1_01

huge thanks!!!

Anton Litvinenko.
----- Original Message -----
From: "Paul Libbrecht" <pa...@activemath.org>
To: <rp...@xml.apache.org>
Sent: Thursday, March 14, 2002 12:39 AM
Subject: Re: AccessControlException in applet


> Hey, hey,
>
>
> That's our famous one.
> This is due to the fact the 1.0 distribution of XML-RPC uses the
> sun.misc Base64 encoder/decoder classes so as to encode/decode binary
> parts of XML-RPC messages in the applet package.
> This exception has been noticed, by us at least, as SecurityException,
> using appletviewer and all non-internet-explorer related applet engines
> on MacOSX and Linux.
>
> The workaround ? Use the base64 encoding classes that are under LGPL in
> the org.apache.xmlrpc package (not the applet one).
>
> I have made this fix, together with a few others and have suggested
> these to the mailing list about a week ago. It is published (under the
> same licenses) at:
>
> http://www.activemath.org/~ilo/revisions/xmlrpc/
>
> Using this should fix your problem.
> (we're using the applet parameters for port number and other such as
> applet-params, i.e. not an absolute or computed URL which makes sure
> that the host is the same and it works fine with us)
> Tell me (the list I guess) of any problem you encounter as we cannot
> eternally debug on all flavours of browsers/platforms combinations.
>
> Paul
>
>
> On Mercredi, mars 13, 2002, at 03:59 , Anton Litvinenko wrote:
>
> > 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.
> >
> >
>



Re: AccessControlException in applet

Posted by Anton Litvinenko <sh...@ut.ee>.
WOOW!!!

thanks!!! seems to be working now!!!

This is due to the fact the 1.0 distribution of XML-RPC uses the
> sun.misc Base64 encoder/decoder classes so as to encode/decode binary
> parts of XML-RPC messages in the applet package.
YEAP, that was the problem... i changed JAR files to those from
http://www.activemath.org/~ilo/revisions/xmlrpc/
and now applet works, at least under SUN JVM 1.3.1_01

huge thanks!!!

Anton Litvinenko.
----- Original Message -----
From: "Paul Libbrecht" <pa...@activemath.org>
To: <rp...@xml.apache.org>
Sent: Thursday, March 14, 2002 12:39 AM
Subject: Re: AccessControlException in applet


> Hey, hey,
>
>
> That's our famous one.
> This is due to the fact the 1.0 distribution of XML-RPC uses the
> sun.misc Base64 encoder/decoder classes so as to encode/decode binary
> parts of XML-RPC messages in the applet package.
> This exception has been noticed, by us at least, as SecurityException,
> using appletviewer and all non-internet-explorer related applet engines
> on MacOSX and Linux.
>
> The workaround ? Use the base64 encoding classes that are under LGPL in
> the org.apache.xmlrpc package (not the applet one).
>
> I have made this fix, together with a few others and have suggested
> these to the mailing list about a week ago. It is published (under the
> same licenses) at:
>
> http://www.activemath.org/~ilo/revisions/xmlrpc/
>
> Using this should fix your problem.
> (we're using the applet parameters for port number and other such as
> applet-params, i.e. not an absolute or computed URL which makes sure
> that the host is the same and it works fine with us)
> Tell me (the list I guess) of any problem you encounter as we cannot
> eternally debug on all flavours of browsers/platforms combinations.
>
> Paul
>
>
> On Mercredi, mars 13, 2002, at 03:59 , Anton Litvinenko wrote:
>
> > 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.
> >
> >
>



Re: AccessControlException in applet

Posted by Paul Libbrecht <pa...@activemath.org>.
Hey, hey,


That's our famous one.
This is due to the fact the 1.0 distribution of XML-RPC uses the 
sun.misc Base64 encoder/decoder classes so as to encode/decode binary 
parts of XML-RPC messages in the applet package.
This exception has been noticed, by us at least, as SecurityException, 
using appletviewer and all non-internet-explorer related applet engines 
on MacOSX and Linux.

The workaround ? Use the base64 encoding classes that are under LGPL in 
the org.apache.xmlrpc package (not the applet one).

I have made this fix, together with a few others and have suggested 
these to the mailing list about a week ago. It is published (under the 
same licenses) at:

	http://www.activemath.org/~ilo/revisions/xmlrpc/

Using this should fix your problem.
(we're using the applet parameters for port number and other such as 
applet-params, i.e. not an absolute or computed URL which makes sure 
that the host is the same and it works fine with us)
Tell me (the list I guess) of any problem you encounter as we cannot 
eternally debug on all flavours of browsers/platforms combinations.

Paul


On Mercredi, mars 13, 2002, at 03:59 , Anton Litvinenko wrote:

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


Re: AccessControlException in applet

Posted by Paul Libbrecht <pa...@activemath.org>.
Hey, hey,


That's our famous one.
This is due to the fact the 1.0 distribution of XML-RPC uses the 
sun.misc Base64 encoder/decoder classes so as to encode/decode binary 
parts of XML-RPC messages in the applet package.
This exception has been noticed, by us at least, as SecurityException, 
using appletviewer and all non-internet-explorer related applet engines 
on MacOSX and Linux.

The workaround ? Use the base64 encoding classes that are under LGPL in 
the org.apache.xmlrpc package (not the applet one).

I have made this fix, together with a few others and have suggested 
these to the mailing list about a week ago. It is published (under the 
same licenses) at:

	http://www.activemath.org/~ilo/revisions/xmlrpc/

Using this should fix your problem.
(we're using the applet parameters for port number and other such as 
applet-params, i.e. not an absolute or computed URL which makes sure 
that the host is the same and it works fine with us)
Tell me (the list I guess) of any problem you encounter as we cannot 
eternally debug on all flavours of browsers/platforms combinations.

Paul


On Mercredi, mars 13, 2002, at 03:59 , Anton Litvinenko wrote:

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