Buggy code:
public class JEREMIEContext implements Context { private static Context jeremieContext = null ; private static HashMap hashMap = new HashMap ( ) ; private static Hashtable wrapperHash = new Hashtable ( ) ; private JEREMIEContext ( Context jeremieCtx ) throws NamingException { } public static Context getSingleInstance ( Hashtable env ) throws NamingException { String key = null ; if ( env != null ) { key = ( ( String ) ( env . get ( Context . PROVIDER_URL ) ) ) ; } Context ctx = ( ( Context ) ( JEREMIEContext . hashMap . get ( key ) ) ) ; if ( ctx == null ) { <START_BUG> env . put ( "java.naming.factory.initial" , "org.objectweb.jeremie.libs.services.registry.jndi.JRMIInitialContextFactory" ) ; <END_BUG> ctx = new JEREMIEContext ( new InitialContext ( env ) ) ; JEREMIEContext . hashMap . put ( key , ctx ) ; } return ctx ; } private Object unwrapObject ( Object o , Name name ) throws NamingException { } private Object wrapObject ( Object o , Object name , boolean replace ) throws NamingException { } public Object lookup ( Name name ) throws NamingException { } public Object lookup ( String name ) throws NamingException { } public void bind ( Name name , Object obj ) throws NamingException { } public void bind ( String name , Object obj ) throws NamingException { } public void rebind ( Name name , Object obj ) throws NamingException { } public void rebind ( String name , Object obj ) throws NamingException { } public void unbind ( Name name ) throws NamingException { } public void unbind ( String name ) throws NamingException { } public void rename ( Name oldName , Name newName ) throws NamingException { } public void rename ( String name , String newName ) throws NamingException { } public NamingEnumeration list ( Name name ) throws NamingException { } public NamingEnumeration list ( String name ) throws NamingException { } public NamingEnumeration listBindings ( Name name ) throws NamingException { } public NamingEnumeration listBindings ( String name ) throws NamingException { } public void destroySubcontext ( Name name ) throws NamingException { } public void destroySubcontext ( String name ) throws NamingException { } public Context createSubcontext ( Name name ) throws NamingException { } public Context createSubcontext ( String name ) throws NamingException { } public Object lookupLink ( Name name ) throws NamingException { } public Object lookupLink ( String name ) throws NamingException { } public NameParser getNameParser ( Name name ) throws NamingException { } public NameParser getNameParser ( String name ) throws NamingException { } public String composeName ( String name , String prefix ) throws NamingException { } public Name composeName ( Name name , Name prefix ) throws NamingException { } public Object addToEnvironment ( String propName , Object propVal ) throws NamingException { } public Object removeFromEnvironment ( String propName ) throws NamingException { } public Hashtable getEnvironment ( ) throws NamingException { } public void close ( ) throws NamingException { } public String getNameInNamespace ( ) throws NamingException { } }

Fix:
env . put ( "java.naming.factory.initial" , "org.objectweb.jeremie.services.registry.jndi.JRMIInitialContextFactory" ) ;