Topic
  • 3 replies
  • Latest Post - ‏2011-01-25T13:08:46Z by SystemAdmin
SystemAdmin
SystemAdmin
235 Posts

Pinned topic error while trying to run JSTATD...

‏2006-04-25T10:48:11Z |
Hi,

Whenever I am trying to run the jstatd tool (its a Java monitoring and management tool) I am getting the following error:

Could not create remote object

access denied (java.util.PropertyPermission java.rmi.server.ignoreSubClasses write)

java.security.AccessControlException: access denied (java.util.PropertyPermission java.rmi.server.ignoreSubClasses write)

at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)

at java.security.AccessController.checkPermission(AccessController.java:

427)

at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)

at java.lang.System.setProperty(System.java:698)

at sun.tools.jstatd.Jstatd.main(Jstatd.java:122)

I added the line
permission java.util.PropertyPermission "java.rmi.server.ignoreSubClasses", "write";
in the java.policy file.
Now i am getting the following error:

Could not create remote object
access denied (java.lang.RuntimePermission accessClassInPackage.sun.jvmstat.moni
tor)
java.security.AccessControlException: access denied (java.lang.RuntimePermission
accessClassInPackage.sun.jvmstat.monitor)
at java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:264)
at java.security.AccessController.checkPermission(AccessController.java:
427)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:151
2)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at sun.tools.jstatd.RemoteHostImpl.<init>(RemoteHostImpl.java:39)
at sun.tools.jstatd.Jstatd.main(Jstatd.java:123)
Can anybody tell me the problem and suggest any solution?
Thanks,
Sinchan
Updated on 2011-01-25T13:08:46Z at 2011-01-25T13:08:46Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    235 Posts

    Re: error while trying to run JSTATD...

    ‏2006-04-26T11:04:04Z  
    I'm not sure if this will help, but the jstatd documentation (http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/jstatd.html) says you can use a security policy of this form:
    
    grant codebase 
    "file:${java.home}/../lib/tools.jar" 
    {<br /> permission java.security.AllPermission;<br /> 
    };
    

    to have jstatd run without any security exceptions. Have you tried this? If not, see the "Security" section of the linked page for the details on using this.
  • SteveSun
    SteveSun
    1 Post

    Re: error while trying to run JSTATD...

    ‏2009-03-12T16:46:08Z  
    I'm not sure if this will help, but the jstatd documentation (http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/jstatd.html) says you can use a security policy of this form:
    <pre class="jive-pre"> grant codebase "file:${java.home}/../lib/tools.jar" {<br /> permission java.security.AllPermission;<br /> }; </pre>
    to have jstatd run without any security exceptions. Have you tried this? If not, see the "Security" section of the linked page for the details on using this.
    This works fine, thanks Happy

    Copied
    
    grant codebase 
    "file:${java.home}/../lib/tools.jar" 
    { permission java.security.AllPermission; 
    };
    


    into a file called jstatd.all.policy

    From Solaris10 command line (same dirctory where I save jstatd.all.policy file), I issued:

    
    jstatd -J-Djava.security.policy=jstatd.all.policy
    


    and could then use VisualVM to connect.

    Link: https://visualvm.dev.java.net/applications_remote.html

    Cheers,
    Steve at sunblade dot co dot uk
  • SystemAdmin
    SystemAdmin
    235 Posts

    Re: error while trying to run JSTATD...

    ‏2011-01-25T13:08:46Z  
    Where do you get jstatd for AIX ?