简体   繁体   English

Java Applet与Mysql ExceptionInInitializerError

[英]Java Applet with Mysql ExceptionInInitializerError

I'm using java applet with mysql connection. 我正在将Java applet与mysql连接一起使用。 I used Netbeans to build paths. 我使用Netbeans构建路径。 When my applet works in localhost, I got an error. 当我的applet在本地主机上工作时,出现错误。

Exception in thread "Abandoned connection cleanup thread" java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "setContextClassLoader")
    at java.security.AccessControlContext.checkPermission(Unknown Source)
    at java.security.AccessController.checkPermission(Unknown Source)
    at java.lang.SecurityManager.checkPermission(Unknown Source)
    at sun.plugin2.applet.AWTAppletSecurityManager.checkPermission(Unknown Source)
    at java.lang.Thread.setContextClassLoader(Unknown Source)
    at com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:38)

I just use mysql-applet Netbeans . 我只是使用mysql-applet Netbeans Can you help me ? 你能帮助我吗 ?

If you upgrade your MySQL Connector/J to 5.1.26 this should be fixed. 如果将MySQL Connector / J升级到5.1.26,则应修复此问题。 Previously there was a call to 'setContextClassLoader()' which was removed for other reasons. 以前有一个对“ setContextClassLoader()”的调用,由于其他原因,该调用已被删除。 See http://bugs.mysql.com/bug.php?id=68556 参见http://bugs.mysql.com/bug.php?id=68556

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM