[JBoss-user] [Management, JMX/JBoss] - Re: Problem obtaining MBeanServerConnection object
This code worked for me: | Properties env = new Properties(); | env.setProperty(Context.INITIAL_CONTEXT_FACTORY, | org.jboss.naming.HttpNamingContextFactory); | | env.setProperty(Context.PROVIDER_URL, | http://[hostname]:8080/invoker/JNDIFactory;); | | Context ctx = new InitialContext(env); | | MBeanServerConnection server = (MBeanServerConnection) ctx.lookup(jmx/invoker/RMIAdaptor); | | View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3949155#3949155 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3949155 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Management, JMX/JBoss] - Re: Problem obtaining MBeanServerConnection object
Problem resolved: It turns out that the problem had nothing to do with lack of a security manager. The problem was that I did not have all the jar files required in my classpath. The jar files are contained in the [jboss_home]/server/messaging/lib directory. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3949172#3949172 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3949172 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Management, JMX/JBoss] - Re: Problem obtaining MBeanServerConnection object
I wonder if your problem is more related to the part of the error message that states no security manager: RMI class loader disabled. I ran into something like this a couple of weeks ago and had to read up about security managers and the java.policy file and other such fun topics. Googling the portion of the error text I quoted should lead you to several web pages that attempt to explain the problem and how to fix it. (If I ever find the code I had this problem with I will post what I did to get around the problem. I vaguely recall declaring a security manager in my Java code and providing an alternate java.policy file.) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3949171#3949171 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3949171 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Management, JMX/JBoss] - Re: Problem obtaining MBeanServerConnection object
Unfortunately, that doesn't work for me. This property: env.setProperty(Context.INITIAL_CONTEXT_FACTORY, | org.jboss.naming.HttpNamingContextFactory); causes the following exception: org.jboss.naming.HttpNamingContextFactory);javax.naming.NoInitialContextException: Cannot instantiate class: org.jboss.naming.HttpNamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jboss.naming.HttpNamingContextFactory] In my original post, I neglected to mention the jndi property settings I'm using. They are defined in a jndi.properties file. Setting the properties in the code instead, I have: | Properties properties = new Properties(); | properties.put( | Context.INITIAL_CONTEXT_FACTORY, | org.jnp.interfaces.NamingContextFactory); | properties.put( | Context.PROVIDER_URL, | jnp://localhost:1099); | properties.put( | Context.OBJECT_FACTORIES, | org.jboss.naming:org.jnp.interfaces); | InitialContext ic = new InitialContext(properties); | MBeanServerConnection p = |(MBeanServerConnection)ic.lookup(jmx/invoker/RMIAdaptor); That produces the same exception: javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: org.jboss.jmx.adaptor.rmi.RMIAdaptor (no security manager: RMI class loader disabled)] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:729) Any ideas? Thanks, Barry View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3949158#3949158 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3949158 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user