Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2003
    Posts
    5

    Unanswered: java.security.AccessControlException

    Hi

    I am trying to access a mySql database at localhost from a servlet on Tomcat 4 running on Redhat Linux 7.2. I am using a user name & password with the mySql prvileges set to % (access any host)

    I keep getting the following error message

    java.security.AccessControlException: access denied (java.util.PropertyPermission file.encoding read)

    I saw something on one of the forums that suggested that I have to add a permission to catalina.policy but what they suggested Tomcat didn't like and wouldn't start up. It was

    grant all privileges on mysql.* to root@'%' identified by 'root'; (obviously with my username etc)

    Can anyone tell me what I need to add and where. Also do I need to grant specific permission to my database driver?

    Thanks for your help

    Waaabbly
    Last edited by waaabbly; 08-22-03 at 06:17.

  2. #2
    Join Date
    Aug 2003
    Posts
    5

    Re: java.security.AccessControlException

    Hiya

    I think I have it sorted. If you add

    permission java.util.PropertyPermission "file.encoding", "read";

    to either java.policy or catalina.policy (whichever is determining your permissions) the error goes away.

    Regards

    Waaabbly

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •