Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: Access Control Exception

  1. #1
    Junior Member
    Join Date
    May 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Access Control Exception

    Hi everyone,
    I attempted to search the web on Access Control Exceptions but still haven't fully found what I am looking for.... and I wanted to see if you guys could offer me some help!

    I am trying to attach an applet to an html file and display it on the web. I'm having trouble with the permissions somewhere. From the information I have gathered, it seems I can access the java.policy somewhere and make adjustments but I want to make it universal for any computer I display my html file on.

    Do I add code to my .class file or my html file?
    How do I make my applet run??


    Here is the error:
    AccessControlException.JPG

    Thank you so much for the help!


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,162
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: Access Control Exception

    The .java.policy file is for one PC. To allow many PCs to use your applet it needs to be signed.
    I don't have a link for the specifics. Here is a link that might help:
    https://blogs.oracle.com/java-platfo...ments_for_rias
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3

    Default Re: Access Control Exception

    A java.security.AccessControlException exception is created when certain classes on the call stack are missing the required permissions during a java.security.AccessController.checkPermission method.

  4. #4
    Junior Member
    Join Date
    Jul 2021
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Access Control Exception

    I've created a Web Service user and a Web Service role, to which the Web Service user is assigned. This role has every single possible permission enabled. Yet, when I do a simple call to moodle_user_get_users_by_id using Zend's XML-RPC client, it fails. I get back a Zend_Xml_Rpc_Client_FaultException with the message property that says "Access control exception"
    Thanks.
    Aakil Working at Active Noon
    Thanks Aaki Working at Active Noon

  5. #5
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,162
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: Access Control Exception

    Please post the full text of the error message and the java code where the exception happened so we can see it.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Java hashmap access without exception
    By Bingo90 in forum Exceptions
    Replies: 5
    Last Post: October 18th, 2013, 05:57 AM
  2. Replies: 21
    Last Post: November 27th, 2012, 10:58 PM
  3. java.net.URL Access Exception
    By MistaWizurd in forum Java Networking
    Replies: 5
    Last Post: April 3rd, 2011, 02:18 AM
  4. no data found ms -access sql exception
    By jatinrai199 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: February 16th, 2011, 03:22 PM
  5. Default Access (package access) confusion
    By gauravrajbehl in forum Java Theory & Questions
    Replies: 1
    Last Post: November 18th, 2009, 04:11 AM