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

Comments

pringi said…
Thanks. Saved a lot of time with your post.
vimod said…
thank you. worked fine.
Anonymous said…
in case of no oracle found then?

Popular posts from this blog

java.sql.SQLException: Connection Cache with this Cache Name is Disabled

Weblogic server is not starting up ; weblogic.security.SecurityInitializationException: Authentication for user denied