现在的位置: 首页 > 综合 > 正文

jstatd error

2012年05月19日 ⁄ 综合 ⁄ 共 1279字 ⁄ 字号 评论关闭

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

抱歉!评论已关闭.