[jboss-user] [JNDI and Naming] - Creating initial Context in JBoss AS 7.1.1

Laura delli Paoli do-not-reply at jboss.com
Tue May 29 09:09:43 EDT 2012


Laura delli Paoli [https://community.jboss.org/people/lauradp] created the discussion

"Creating initial Context in JBoss AS 7.1.1"

To view the discussion, visit: https://community.jboss.org/message/738464#738464

--------------------------------------------------------------
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
[https://community.jboss.org/message/738464#738464]

Start a new discussion in JNDI and Naming at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2083]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120529/df9bfe2f/attachment.html 


More information about the jboss-user mailing list