permaculture playing cards
The moose likes Security and the fly likes Security Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "Security" Watch "Security" New topic
Author

Security

Sirivani Gangisetty
Greenhorn

Joined: Jan 17, 2007
Posts: 2
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

Joined: Mar 22, 2005
Posts: 42956
    
  73
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

Joined: Jan 17, 2007
Posts: 2
/* 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

Joined: Mar 22, 2005
Posts: 42956
    
  73
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

Joined: Aug 11, 2007
Posts: 4659
    
    5

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.
 
subject: Security
 
jQuery in Action, 3rd edition