java - Context.createSubcontext throws exception javax.naming.OperationNotSupportedException -


i have registered jndi. when invoke conrext.createsubcontext exception:

javax.naming.operationnotsupportedexception @ com.sun.jndi.rmi.registry.registrycontext.createsubcontext(registrycontext.java:226) @ com.sun.jndi.toolkit.url.genericurlcontext.createsubcontext(genericurlcontext.java:390) @ javax.naming.initialcontext.createsubcontext(initialcontext.java:464) 

implementation looks like:

 registry reg = locateregistry.createregistry(1099);   properties properties = new properties();  properties.put(context.initial_context_factory, "org.jnp.interfaces.namingcontextfactory");  properties.put(context.url_pkg_prefixes, "org.jboss.naming:org.jnp.interfaces");  properties.put(context.provider_url, "localhost:1099");   initialcontext initialcontextcontext = new initialcontext(properties);   ic.createsubcontext("rmi://localhost/java:jdbc"); 

please suggest missed.

the provider not support sub-contexts. rmi registry doesn't: provides one-dimensional namespace.

possibly using wrong provider jnp.


Comments