Current Position:Home > Java.policy setting

Java.policy setting

Update:11-30Source: network consolidation
Advertisement
Hi,
I am writing an web based application using applets nadn eed to contact a MYSql database.
I am getting Access Denied exception.
In my java.policy file I added the following two lines :
grant codeBase "http://mywebpage/"{
permission java.security.AllPermission;
I am still getting the following exception : Any help will be greatly appreciated since I have a demo tomorrow. (Is there anyway to confugure the java.policy or java.security file to allow the jar that contains my applet(dvt.jar) to access the underlying database.)
Is there some place I need to specify explicitly where to find this java.policy file.
Platform is UNIX.
Thx
Karthik
Thx
Karthik
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.AccessControlExceptionMESSAGE: 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(Unknown Source)at java.security.AccessController.checkPermission(Unknown Source)at java.lang.SecurityManager.checkPermission(Unknown Source)at java.lang.SecurityManager.checkConnect(Unknown Source)at java.net.Socket.connect(Unknown Source)at java.net.Socket.connect(Unknown Source)at java.net.Socket.<init>(Unknown Source)at java.net.Socket.<init>(Unknown Source)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:1783)at com.mysql.jdbc.Connection.<init>(Connection.java:450)at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:411)at java.sql.DriverManager.getConnection(Unknown Source)at java.sql.DriverManager.getConnection(Unknown Source)at vdt.VdtModuleApplet.getConnection(VdtModuleApplet.java:444)at vdt.VdtModuleApplet.init(VdtModuleApplet.java:105)at sun.applet.AppletPanel.run(Unknown Source)at java.lang.Thread.run(Unknown Source)** END NESTED EXCEPTION ** System = Inited, gotParameters, init propertiesGetting Connection Posts: 30 | Registered: Feb 2005 | IP: Logged

The Best Answer

Advertisement
Hi Folks, I am also facing the same kind of
problem...when I am trying to open notepad by
clicking on New option of my Frame's menu.. I am
getting the message Access Denied...some permission
problem is there...Please help me in directing about
setting the policies...https://www.support.storagetek.com/LibraryAdminHelp/lsa/setting_up_java_policy_permissions.htm
http://www.exciton.cs.rice.edu/JavaResources/security/policy.htm
  • How can I change java.policy at runtim on client machines using java webst? Update:10-11

    Hi, I have to change java.policy to launch my application through webstart to provide one RuntimePermission "permission java.lang.RuntimePermission "getClassLoader";" Its because of a bug in java bug "_http://bugs.sun.com/bugdatab

  • How to handle the java.policy file ? Update:10-11

    Can somebody tell me how to handle the java.policy file? I always get java.net.SocketExceptions and java.security.AccessControlExceptions while connecting to an appserver from an applet. What do I have to write in the java.policy file, where do I hav

  • File Access with unsigned Applet through editing the java.policy file Update:10-11

    I'am starting to lose my hair on this... I am trying to get an applet to run so that it can access the file system to move files on my local maschin. Because this applet is only running on my VM i can change the java.policy to avoid the signing of th

  • How add grant permission in java.policy Update:10-11

    hi master sir serch in my system C:\Program Files\j2sdk_nb\j2sdk1.4.2\jre\lib\security C:\Program Files\j2sdk_nb\_jvm\lib\security C:\Program Files\Java\j2re1.4.1_03\lib\security C:\Program Files\Java\jre1.5.0_10\lib\security sir i have many java.pol

  • ClassLoader & java.policy Update:10-11

    Hi , I am facing problem with the following code. ClassLoader loaderPrev = Thread.currentThread().getContextClassLoader(); ClassLoader loader = URLClassLoader.newInstance(new URL[]{new URL(CodeBase)} , loaderPrev ); ClassLoader loader = new URLClassL

  • Java Applets and .java.policy Update:10-11

    Hi. We are developing an applet that need to access to the file systems and anothers properties, like user.home. To do this and don't modify the java.policy of the jre, we create a .java.policy file into user home. The content is: grant { permission

  • Explicitly installin java.policy problem Update:11-30

    is there any one who knows how to explicitly install the java.policy. What i have been doing is set the policy of the RMI server through a file like java.policy which contains this grant { permission java.security.AllPermission "*:1024-65535",&q

  • Can distribution of a .java.policy file be eliminated Update:11-30

    Sorry for the stupid question, but I'm fairly new to the realm of dealing with Java security... I have an applet that I want to deploy worldwide as part of an upgrade to an existing website, but I've run into the following error: "Error getting conne

  • Does Java Plug-in Ignore java.policy Permissions? Update:11-30

    I am running Firefox 3.6.12 on Ubuntu Karmic with Java plug-in 1.6.0_22. I'm trying to run an Aventail OnDemand applet, and I keep getting I/O file-reading permissions exceptions in the Java console. I tried granting the permission in /usr/lib/jvm/ja

  • Java.policy setting Update:11-30

    Hi, I am writing an web based application using applets nadn eed to contact a MYSql database. I am getting Access Denied exception. In my java.policy file I added the following two lines : grant codeBase "http://mywebpage/"{ permission java.secu