Cannot instantiate class: org.jnp.interfaces.NamingContextFactory
问题 Here this my code: SpeakerRemote.java package test; import javax.ejb.Remote; @Remote public interface SpeakerRemote { String sayAPhrase( String phrase ); } SpeakerBean.java package test; import javax.ejb.Stateless; @Stateless public class SpeakerBean implements SpeakerRemote { @Override public String sayAPhrase( String phrase ){ return "Speaker Service:\t" + phrase; } } I assembled it with maven. Here I show you invoking part: Invoker.java import javax.naming.Context; import javax.naming