[jboss-user] [Security & JAAS/JBoss] - Re: Accessing a secure EJB from standalone Java client
jej2003
do-not-reply at jboss.com
Tue Oct 28 08:49:21 EDT 2008
| Properties env = new Properties();
| env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.security.jndi.JndiLoginInitialContextFactory");
| env.setProperty(Context.PROVIDER_URL, "jnp://localhost:1099");
| InitialContext ctx = new InitialContext(env);
|
| InitialContext ctx = b.getInitialContext();
| EchoBeanRemote echoBean = (EchoBeanRemote) ctx.lookup("SecuredEchoEnterpriseApplication/EchoBean/remote");
|
the error is
| Exception in thread "main" java.lang.NullPointerException
| at org.jboss.security.jndi.JndiLoginInitialContextFactory.getInitialContext(JndiLoginInitialContextFactory.java:95)
| at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
| at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
| at javax.naming.InitialContext.init(InitialContext.java:223)
| at javax.naming.InitialContext.<init>(InitialContext.java:197)
| at test.client.Client.main(Client.java:60)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185080#4185080
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4185080
More information about the jboss-user
mailing list