OW2 Consortium
Search OW2 Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | joram List | December 2005 Index

<--  Date Index  --> <--  Thread Index  -->

Root exception is javax.naming.NamingException: Unknown protocol:joram


HI,

When I want to initialize a context, I get this message :

javax.naming.NamingException [Root exception is javax.naming.NamingException: 
Unknown protocol:joram]
        at 
fr.dyade.aaa.jndi2.client.NamingContextFactory.getNamingConnection(Unknown 
Source)
        at 
fr.dyade.aaa.jndi2.client.NamingContextFactory.getInitialContext(Unknown 
Source)
        at 
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
        at 
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
        at javax.naming.InitialContext.init(InitialContext.java:219)
        at javax.naming.InitialContext.<init>(InitialContext.java:195)


joram.properties :

java.naming.factory.initial=fr.dyade.aaa.jndi2.client.NamingContextFactory
java.naming.provider.url=joram://localhost:16400
java.naming.factory.host=localhost
java.naming.factory.port=16400
java.naming.security.authentication=simple
java.naming.security.principal=root
java.naming.security.credentials=root



The code :

    private static Context createJNDIContext(JJmsLogin jmsLogin) throws 
Exception 
    {
        Properties props    = new Properties();
        Properties sysProps = System.getProperties();
        
        props.setProperty("java.naming.factory.initial",            
"fr.dyade.aaa.jndi2.client.NamingContextFactory");
        props.setProperty("java.naming.provider.url",               
"joram://" + jmsLogin.getFactory_host() + ":" + jmsLogin.getFactory_port() + 
"/");
        props.setProperty("java.naming.factory.host",               
jmsLogin.getFactory_host() );
        props.setProperty("java.naming.factory.port",               
jmsLogin.getFactory_port() );
        props.setProperty("java.naming.security.authentication",    
jmsLogin.getSecurity_authentication() );
        props.setProperty("java.naming.security.principal",         
jmsLogin.getSecurity_principal() );
        props.setProperty("java.naming.security.credentials",       
jmsLogin.getSecurity_credentials() );
        
        sysProps.putAll(props);
        System.setProperties(sysProps);
        
        sysProps = System.getProperties();
        //System.out.println(sysProps.toString());

        return new javax.naming.InitialContext(sysProps);
    }


Any ideas ?

Thanks.



<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 2006-2007, OW2 Consortium | contact | webmaster.