[jboss-user] [EJB 3.0 Users] - Re: NotBound ERRoR

amira88 do-not-reply at jboss.com
Thu Dec 3 17:33:58 EST 2009


Hi Mr wolfgang,
i'm just using u property code:
Properties props = new Properties();
        props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
        props.setProperty(Context.URL_PKG_PREFIXES, "org.jboss.naming.client");
        props.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099");
        props.setProperty("j2ee.clientName", "ClientNameFromJBossClientXML");
        
        InitialContext initialContext = new InitialContext(props);
But i'm having an exception and this is it:
 javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
	at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
	at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
	at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
	at javax.naming.InitialContext.lookup(Unknown Source)
	at com.et.GestionDeStockClient.main(GestionDeStockClient.java:29)
Thank you so much


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4268878#4268878

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



More information about the jboss-user mailing list