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=bb&op=viewtopic&p=3949158#3949158

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3949158


_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to