I'm trying to connect to a mySQL database in my Applet and I get this Exception on the line that connects to it:
java.sql.SQLException: Unable to connect to any hosts due to exception: java.security.AccessControlException: access denied (java.util.PropertyPermission file.encoding read)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1797)
at com.mysql.jdbc.Connection.<init>(Connection.java:562)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:361)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at unknown.DBConn.<init>(DBConn.java:25)
at unknown.Unknown.init(Unknown.java:22)
at sun.applet.AppletPanel.run(AppletPanel.java:353)
at java.lang.Thread.run(Thread.java:534)
The applet is trying to connect to a database at localhost:3306, and the user I'm trying to connect with has all priveledges. The program seems to work when I run it as the local filesystem (through applet viewer), but it gives this exception when loading through an HTML file on my webserver (same machine).
Any help is appreciated.
[ August 17, 2004: Message edited by: Paul Houser ]