Hi, all, I get a java.io.FilePermission exception while writing to or reading to db.db file. This exception only occurs when running on UNIX platform, it works fine on Windows. In addition, the permission of the file is both readable and writable. The following is the stack trace for the exception. Please help me with this, I have been debugging this for a while, and still have no clue what has caused the problem. Thank you!!! RMIServerDBAdapter exception: access denied (java.io.FilePermission db.db write) java.security.AccessControlException: access denied (java.io.FilePermission db.d b write) at java.security.AccessControlContext.checkPermission(AccessControlConte xt.java:272) at java.security.AccessController.checkPermission(AccessController.java: 399) at java.lang.SecurityManager.checkPermission(SecurityManager.java:545) at java.lang.SecurityManager.checkWrite(SecurityManager.java:978) at java.io.File.canWrite(File.java:527) at jdev.db.Data.<init>(Unknown Source) at jdev.server.RMIServerDBAdapter.<init>(Unknown Source) at jdev.server.RMIServerDBAdapter.main(Unknown Source)
posted 18 years ago
Hi, All, By the way, the policy file grants permission for everything! And it is really the AccessControlException caused by the FilePermission. Thanks! Christy
Hi, Sai, Mark, I thought the problem might be related to the RMISecurityManager. You are confusing me now. I am using RMI to implement the remote connection, doesn't that mean I have to use RMISecurityManager and policy file?? Is there anyway around it? Thank you!
doesn't that mean I have to use RMISecurityManager and policy file?? Is there anyway around it? Thank you!
No, actually you don't have to use it at all. I actually only used it on the client side. I had tried on the server side, but I got errors, so I removed it. I figured it would be the client that would be rogue anyway, if there was problems. But there are some who didn't have it at all and did not lose points because of it. Mark