0

私は次のエラーを取得しています

**ERROR:**

2014-10-07 16:33:46,692 ERROR [stderr] (default task-1) javax.naming.NamingException: 
 JBAS011843: **Failed instantiate** **InitialContextFactory 
 org.jboss.naming.remote.client.InitialContextFactory** from classloader 
 ModuleClassLoader for Module "deployment.wildfly8.1.ear.wildfly8.1-war.war:main"
 from Service Module Loader [Root exception is java.lang.ClassNotFoundException: 
 org.jboss.naming.remote.client.InitialContextFactory from [Module
 "deployment.wildfly8.1.ear.wildfly8.1-war.war:main" from Service Module Loader]]

コード:

final Properties env = new Properties();

env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
env.put(Context.PROVIDER_URL, "127.0.0.1");
//OR env.put(Context.PROVIDER_URL, "http-remoting://127.0.0.1");
env.put(Context.SECURITY_PRINCIPAL, "admin");
env.put(Context.SECURITY_CREDENTIALS, "password");
context = new InitialContext(env);
4

2 に答える 2