JBoss Community

Creating initial Context in JBoss AS 7.1.1

created by Laura delli Paoli in JNDI and Naming - View the full discussion

Hello Everybody,

I'm new to JBoss and I'm trying to run a simple helloWorld JMS application.

when I run:

 

            env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");

            env.put(Context.PROVIDER_URL, System.getProperty(Context.PROVIDER_URL, "remote://localhost:4447"));

            env.put(Context.SECURITY_PRINCIPAL, System.getProperty("username", DEFAULT_USERNAME));

            env.put(Context.SECURITY_CREDENTIALS, System.getProperty("password", DEFAULT_PASSWORD));

            context = new InitialContext(env);

 

I get the following error: GRAVE: Cannot instantiate class: org.jboss.naming.remote.client.InitialContextFactory

 

Can anyone help me?

 

thanks

Laura

Reply to this message by going to Community

Start a new discussion in JNDI and Naming at Community