Hi,
I'm trying to do a JNDI lookup of the MBean jmx/invoker/RMIAdaptor from a
standalone Java program. Here is the snippet of the code.
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
env.put(Context.PROVIDER_URL, "jnp://localhost:1100");
env.put(Context.URL_PKG_PREFIXES,
"org.jboss.naming:org.jnp.interfaces");
InitialContext ctx = new InitialContext(env); // From
jndi.properties
MBeanServerConnection server = (MBeanServerConnection)
ctx.lookup("jmx/invoker/RMIAdaptor");
But I'm getting the following exception:
Could not obtain connection to any of these urls: 192.168.2.100:1100 and
discovery failed with error: javax.naming.CommunicationException: Failed to
retrieve stub from server 192.168.2.100:1100 [Root exception is
java.io.StreamCorruptedException: unexpected block data] [Root exception is
javax.naming.CommunicationException: Failed to retrieve stub from server
192.168.2.100:1100 [Root exception is java.io.StreamCorruptedException:
unexpected block data]]
Can anyone please help?
Thanks,
Eshwari
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3901374#3901374
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3901374
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user