Does anyone know what these error means?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • minifish
    New Member
    • Oct 2008
    • 9

    Does anyone know what these error means?

    Hello,
    I'm running my rmi client and got the following errors.

    java.io.FileNot FoundException: \logs\new.log (The system cannot find the path specified)
    at java.io.FileOut putStream.openA ppend(Native Method)
    at java.io.FileOut putStream.<init >(Unknown Source)
    at java.io.FileOut putStream.<init >(Unknown Source)



    and

    Caused by: java.security.A ccessControlExc eption: access denied (java.lang.Runt imePermission createSecurityM anager)
    at java.security.A ccessControlCon text.checkPermi ssion(Unknown Source)
    at java.security.A ccessController .checkPermissio n(Unknown Source)
    at java.lang.Secur ityManager.chec kPermission(Unk nown Source)
    at java.lang.Secur ityManager.<ini t>(Unknown Source)
    at net.jini.securi ty.Security$Cla ssContextAccess .<init>(Securit y.java:965)
    at net.jini.securi ty.Security$Cla ssContextAccess .<init>(Securit y.java:965)
    at net.jini.securi ty.Security$1.r un(Security.jav a:167)
    at java.security.A ccessController .doPrivileged(N ative Method)
    at net.jini.securi ty.Security.<cl init>(Security. java:165)
    ... 10 more

    Does anyone have any suggestion on how to fix these two problems?
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    It's just one error: every RMI service has to protect itself against abuse; you must
    have installed a security manager that forbids the creation (or opening) of files.
    A lean and mean trick is to install the following (empty) security manager:

    Code:
    import java.security.Permission;
    public class FakeSecurityManager extends SecurityManager {
    	/* allow everything: */
    	public void checkPermission(Permission perm) { }
    	public void checkPermission(Permission perm, Object context) { }
    }
    Before you start your RMI server install that (fake) security manager. Note that
    this is not a solution, just a way to get rid of any security checks.

    kind regards,

    Jos

    Comment

    Working...