When Javascript call applet method, applet throw security exception.

Discussion in 'Java' started by crazytazo, Oct 6, 2008.

  1. crazytazo

    crazytazo Guest

    My test applet was signed and work well on applet viewer.
    In browser, when javascript call applet method f(), the applet throw
    java.security.AccessControlException
    But if call f() through Java code, it works well.
    f() method must called by javascript for arguments that created
    webpage.
    Give a solution please.

    java.security.AccessControlException: access denied
    (java.util.PropertyPermission xml.catalog.ignoreMissing read)
    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.checkPropertyAccess(Unknown Source)
    at java.lang.System.getProperty(Unknown Source)
    at
    com.sun.org.apache.xml.internal.resolver.CatalogManager.<init>(Unknown
    Source)
    at
    com.sun.xml.internal.ws.util.xml.XmlUtil.createDefaultCatalogResolver(Unknown
    Source)
    at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(Unknown
    Source)
    at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
    Source)
    at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(Unknown
    Source)
    at
    com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(Unknown
    Source)
    at javax.xml.ws.Service.<init>(Unknown Source)
    at org.tempuri.ICFSWebServices.<init>(ICFSWebServices.java:46)
    at bizapplet.ICFSClient.<init>(ICFSClient.java:12)
    at bizapplet.Main.t(Main.java:117)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at sun.plugin.javascript.JSInvoke.invoke(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at sun.plugin.javascript.JSClassLoader.invoke(Unknown Source)
    at sun.plugin.com.MethodDispatcher.invoke(Unknown Source)
    at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
    at sun.plugin.com.DispatchImpl$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.plugin.com.DispatchImpl.invoke(Unknown Source)
    java.lang.Exception: java.security.AccessControlException: access
    denied (java.util.PropertyPermission xml.catalog.ignoreMissing read)
    at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
    at sun.plugin.com.DispatchImpl$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.plugin.com.DispatchImpl.invoke(Unknown Source)
     
    crazytazo, Oct 6, 2008
    #1
    1. Advertising

  2. crazytazo

    Daniel Pitts Guest

    Please don't multi-post. If you must, you should cross-post, but anyone
    likely to read clj.gui is probably reading clj.programmer as well, so no
    need.

    crazytazo wrote:
    a multi-posted post

    I have already answered your question on clj.gui
    --
    Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
     
    Daniel Pitts, Oct 6, 2008
    #2
    1. Advertising

  3. crazytazo

    crazytazo Guest

    Re: When Javascript call applet method, applet throw securityexception.

    On Oct 6, 11:37 pm, Daniel Pitts
    <> wrote:
    > Please don't multi-post.  If you must, you should cross-post, but anyone
    > likely to read clj.gui is probably reading clj.programmer as well, so no
    > need.
    >
    > crazytazo wrote:
    >
    > a multi-posted post
    >
    > I have already answered your question on clj.gui
    > --
    > Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>


    Thanks Daniel.
    I didn't know that multi posting is illegal(?). Sorry.
     
    crazytazo, Oct 6, 2008
    #3
  4. crazytazo

    Daniel Pitts Guest

    Re: When Javascript call applet method, applet throw security exception.

    crazytazo wrote:
    > Thanks Daniel.
    > I didn't know that multi posting is illegal(?). Sorry.
    >

    No need to apologize, just make sure to follow this "dogma" in the
    future :).

    It's not illegal, but it does tend to fragment discussions.
    cross-posting is often better if you truly can't find a single
    appropriate group, although cross-posting can be dangerous if it is a
    "debate" question to groups with differing prevalent opinions.

    In other-words, it depends. for comp.lang.java.*, use cross-posting, or
    only post to comp.lang.java.programmer.

    Hope this helps,
    Daniel.

    --
    Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>
     
    Daniel Pitts, Oct 7, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kerri
    Replies:
    2
    Views:
    13,114
    Kevin Spencer
    Oct 27, 2003
  2. VisionSet
    Replies:
    51
    Views:
    4,342
    Tony Morris
    Jul 14, 2004
  3. Replies:
    15
    Views:
    7,754
    Roedy Green
    Sep 8, 2005
  4. Replies:
    3
    Views:
    1,189
  5. Emanuele D'Arrigo

    To throw or to throw not?

    Emanuele D'Arrigo, Nov 14, 2008, in forum: Python
    Replies:
    6
    Views:
    349
    Emanuele D'Arrigo
    Nov 15, 2008
Loading...

Share This Page