jstatd error

jstatd error : Could not create remote object : access denied (java.util.PropertyPermission java.rmi.server.ignoreSubClasses write)

 
While running "./jstatd -J-Djava.security.policy=jstatd.all.policy &" command , below error is getting encountered

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:536)
at java.lang.System.setProperty(System.java:699)
at sun.tools.jstatd.Jstatd.main(Jstatd.java:122)

Cause :- The "access denied" error is expected, because "jstatd" requires a security policy file specified with the "java.security.policy" system property, if there is no security manager running on the machine. 


Solution :-

1) cd $ORACLE_HOME/jdk/bin
2) vi jstatd.all.policy
3) Add the below content :-
grant codebase "file:${java.home}/../lib/tools.jar" {
permission java.security.AllPermission;
};

4) Execute ./jstatd -J-Djava.security.policy=jstatd.all.policy &
5) Output would be something like below :-
[1] 12195

6) Now login on visualVM and then you can see all oc4j on the same host

posted on 2013-04-25 09:44  evilying  阅读(670)  评论(0编辑  收藏  举报

导航