Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Security

 
Sirivani Gangisetty
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
while inserting data into db using rmi with policy tool, throws this exception

java.security.AccessControlException: access denied (java.util.PropertyPermission oracle.jserver.version read)


Configured


/* AUTOMATICALLY GENERATED ON Mon Jun 23 10:46:57 IST 2008*/
/* DO NOT EDIT */

grant codeBase "file:/C:/rmi/" {
permission java.net.SocketPermission "*", "connect";
permission java.net.SocketPermission "*", "accept";
permission java.net.SocketPermission "*", "resolve";
permission java.security.AllPermission;
permission java.util.PropertyPermission "java.version", "read";
permission java.util.PropertyPermission "java.vendor", "read";
permission java.util.PropertyPermission "java.vendor.url", "read";
permission java.util.PropertyPermission "java.class.version", "read";
permission java.util.PropertyPermission "os.name", "read";
permission java.util.PropertyPermission "os.version", "read";
permission java.util.PropertyPermission "os.arch", "read";
permission java.util.PropertyPermission "file.separator", "read";
permission java.util.PropertyPermission "path.separator", "read";
permission java.util.PropertyPermission "line.separator", "read";
permission java.util.PropertyPermission "java.specification.version", "read";
permission java.util.PropertyPermission "java.specification.vendor", "read";
permission java.util.PropertyPermission "java.specification.name", "read";
permission java.util.PropertyPermission "java.vm.specification.version", "read";
permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
permission java.util.PropertyPermission "java.vm.specification.name", "read";
permission java.util.PropertyPermission "java.vm.version", "read";
permission java.util.PropertyPermission "java.vm.vendor", "read";
permission java.util.PropertyPermission "java.vm.name", "read";
};
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Obviously you're running code in an environment with a security manager present. Are you asking how to use the policy tool to add that missing permission to the system, or how to use a security policy when running your code?
 
Sirivani Gangisetty
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
/* AUTOMATICALLY GENERATED ON Mon Jun 23 12:16:00 IST 2008*/
/* DO NOT EDIT */

grant codeBase "file:/C:/rmi/" {
permission java.net.SocketPermission "*", "connect";
permission java.net.SocketPermission "*", "accept";
permission java.net.SocketPermission "*", "resolve";
permission java.util.PropertyPermission "java.version", "read, write";
permission java.util.PropertyPermission "java.vendor", "read, write";
permission java.util.PropertyPermission "java.vendor.url", "read, write";
permission java.util.PropertyPermission "java.class.version", "read, write";
permission java.util.PropertyPermission "os.name", "read, write";
permission java.util.PropertyPermission "os.version", "read, write";
permission java.util.PropertyPermission "os.arch", "read, write";
permission java.util.PropertyPermission "file.separator", "read, write";
permission java.util.PropertyPermission "path.separator", "read, write";
permission java.util.PropertyPermission "line.separator", "read, write";
permission java.util.PropertyPermission "java.specification.version", "read, write";
permission java.util.PropertyPermission "java.specification.vendor", "read, write";
permission java.util.PropertyPermission "java.specification.name", "read, write";
permission java.util.PropertyPermission "java.vm.specification.version", "read, write";
permission java.util.PropertyPermission "java.vm.specification.vendor", "read, write";
permission java.util.PropertyPermission "java.vm.specification.name", "read, write";
permission java.util.PropertyPermission "java.vm.version", "read, write";
permission java.util.PropertyPermission "java.vm.vendor", "read, write";
permission java.util.PropertyPermission "java.vm.name", "read, write";
permission java.util.PropertyPermission "oracle.jserver.version", "read, write";
};

I configured like above but still throwing the excpetion
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you using that file?

Also, make sure that "file:/C:/rmi/" is the correct syntax that covers everything that's in that directory. There may have to be a hyphen or an asterisk at the end.
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Siri Vani Gangisetty:
while inserting data into db using rmi with policy tool,


Any reason you are doing it with RMI, rather than something easy like JDBC?

Mysql and other packages can even use SSL for JDBC
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic