java.security.AccessControlException: access denied
Hej, jeg får følgende fejl når jeg forsøger at lægge min applet op på en server.appletten bliver lagt op således at den ligger på samme host som MySql serveren.
jeg har implementeret mysql driveren i min manifest fil.
det hele virker så længe det ikke kører over http... hvad kan der være galt og hvordan kan jeg rette det?
Exception: Unable to connect to any hosts due to exception: java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:3306 connect,resolve)
** BEGIN NESTED EXCEPTION **
java.security.AccessControlException
MESSAGE: access denied (java.net.SocketPermission 127.0.0.1:3306 connect,resolve)
STACKTRACE:
java.security.AccessControlException: access denied (java.net.SocketPermission 127.0.0.1:3306 connect,resolve)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:269)
at java.security.AccessController.checkPermission(AccessController.java:401)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
at java.lang.SecurityManager.checkConnect(SecurityManager.java:1026)
at java.net.Socket.connect(Socket.java:446)
at java.net.Socket.connect(Socket.java:402)
at java.net.Socket.<init>(Socket.java:309)
at java.net.Socket.<init>(Socket.java:124)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:124)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:225)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:1779)
at com.mysql.jdbc.Connection.<init>(Connection.java:450)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at Forespoergsel.udvaelg(Forespoergsel.java:59)
at DBHaandtering.hentAlleHundeProfiler(DBHaandtering.java:270)
at DomaeneKontrol.hentAlleHundeProfiler(DomaeneKontrol.java:120)
at LytOgKontrol.hentAlleHundeprofiler(LytOgKontrol.java:41)
at HovedMenu.initierHundeListe(HovedMenu.java:226)
at HovedMenu.<init>(HovedMenu.java:30)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:617)
at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1946)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:546)
at sun.applet.AppletPanel.run(AppletPanel.java:298)
at java.lang.Thread.run(Thread.java:552)
** END NESTED EXCEPTION **
java.lang.NullPointerException
at DBHaandtering.hentAlleHundeProfiler(DBHaandtering.java:273)
at DomaeneKontrol.hentAlleHundeProfiler(DomaeneKontrol.java:120)
at LytOgKontrol.hentAlleHundeprofiler(LytOgKontrol.java:41)
at HovedMenu.initierHundeListe(HovedMenu.java:226)
at HovedMenu.<init>(HovedMenu.java:30)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:617)
at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1946)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:546)
at sun.applet.AppletPanel.run(AppletPanel.java:298)
at java.lang.Thread.run(Thread.java:552)