这是我的代码:
public class HelloService{
public static void main (String[] args) throws NamingException
{
String jndiName="MyEJBProj-ejb/HelloService!ejbpack.HelloServiceRemote";
Properties jndiProps = new Properties();
jndiProps.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jboss.naming.remote.client.InitialContextFactory");
jndiProps.put(Context.PROVIDER_URL,"remote://localhost:18080");
jndiProps.put("jboss.naming.client.ejb.context", true);
Context ctx = new InitialContext(jndiProps);
HelloServiceRemote proxy=(HelloServiceRemote) ctx.lookup(jndiName);
System.out.println(proxy.sayHello("hello")); }
}
请,您对此错误有一个了解吗?