Results 1 to 2 of 2
  1. #1
    Heather is offline Senior Member
    Join Date
    Jun 2007
    Posts
    164
    Rep Power
    8

    Default Security Violation:attempt to use Restricted Class: sun.jdbc.odbc.JdbcOdbcDriver

    I'm developing a web application with Eclipse as IDE, I want to connect database using jdbc-odbc (I use MS-Access)
    When I run the application an exception appears
    Java Code:
    Security Violation:attempt to use Restricted Class: sun.jdbc.odbc.JdbcOdbcDriver
    what's wrong ?

  2. #2
    paty is offline Member
    Join Date
    Jul 2007
    Posts
    41
    Rep Power
    0

    Default

    Try adding the following to the policy file:
    Java Code:
     grant {
        permission java.lang.RuntimePermission
           "accessClassInPackage.sun.jdbc.odbc";
        permission java.util.PropertyPermission
           "file.encoding", "read";
      };

    the policy file is located under JRE_HOME lib/security

Similar Threads

  1. Replies: 1
    Last Post: 03-14-2008, 03:51 PM
  2. Using JDBC-ODBC bridge
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 02-06-2008, 10:21 AM
  3. Time restricted method
    By toby in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 06:54 AM
  4. Replies: 1
    Last Post: 07-24-2007, 12:59 AM
  5. Replies: 1
    Last Post: 06-27-2007, 06:57 PM

Posting Permissions

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