I am having trouble connecting visualvm to dcm4chee-2.18.1-psql on Ubuntu 14.04 (no iptables set).
1. I created the policy file for jstatd
2. use following run.conf java parameters
- '-server'
- '-Xms256m'
- '-Xmx1024m'
- '-XX:MaxPermSize=512m'
- '-Dsun.rmi.dgc.client.gcInterval=3600000'
- '-Dsun.rmi.dgc.server.gcInterval=3600000'
- '-Djboss.platform.mbeanserver'
- '-Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl'
- '-Dcom.sun.management.jmxremote'
- '-Dcom.sun.management.jmxremote.authenticate=false'
- '-Dcom.sun.management.jmxremote.ssl=false'
- '-Dcom.sun.management.jmxremote.port=12345'
- '-Djava.rmi.server.hostname=192.168.1.100'
3. start jstatd
sudo /opt/jdk1.7.0_79/bin/jstatd -p 1099 -J-Djava.security.policy=/opt/jdk1.7.0_79/security/tools.policy -J-Djava.rmi.server.hostname=192.168.1.100
4. start dcm4chee
5. in visualvm
- add server 192.168.1.100 to visualvm
I am unable to connect and get error message
Also since I added the extra jvm parameters I see following error in server.log
javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:674)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307)
at javax.naming.InitialContext.init(InitialContext.java:242)
at javax.naming.InitialContext.<init>(InitialContext.java:192)
at org.dcm4chex.archive.mbean.JndiHelper.jndiLookup(JndiHelper.java:19)
at org.dcm4chex.archive.mbean.FileSystemMgt2Service.fileSystemMgt2(FileSystemMgt2Service.java:878)
at org.dcm4chex.archive.mbean.FileSystemMgt2Service.internalDeleteOrphanedPrivateFiles(FileSystemMgt2Service.java:851)
at org.dcm4chex.archive.mbean.FileSystemMgt2Service.deleteOrphanedPrivateFiles(FileSystemMgt2Service.java:835)
at org.dcm4chex.archive.mbean.FileSystemMgt2Service$2$1.run(FileSystemMgt2Service.java:324)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:274)
at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:72)
at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:61)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:671)
... 9 more
I would very much appreciate your help on this :)
Ivo