title: javax.naming.NameNotFoundException: While trying to lookup 'abc' didn't find subcontext 'abc'
body: <p>I've developed a EJB application, with a Remote interface.  This application was deployed on weblogic 12.</p>
  
  <p>With a java application, i'm trying use my EJB application, but when I call method lookup from the class InitialContext, i get this message "javax.naming.NameNotFoundException: While trying to lookup 'NewSessionBean.remote' didn't find subcontext 'NewSessionBean"</p>
  
  <p>This is code from remote interface:</p>
  
  <pre><code>package co.com.tutorial.stateless;
  
  import java.util.List;
  import javax.ejb.Remote;
  
  /**
   *
   * @author jquintep
   */
  @Remote
  public interface NewSessionBeanRemote {
  
      void addBook(String bookName);
  
      List getBooks();
  }
  </code></pre>
  
  <p>This is part of the code from implementation:</p>
  
  <pre><code>package co.com.tutorial.stateless;
  
  import java.util.ArrayList;
  import java.util.List;
  import javax.ejb.Stateless;
  
  /**
   *
   * @author jquintep
   */
  @Stateless
  public class NewSessionBean implements NewSessionBeanRemote {
  
      List&lt;String&gt; bookShelf;
  
      public NewSessionBean() {
          bookShelf = new ArrayList&lt;String&gt;();
      }
  </code></pre>
  
  <p>And this is a part of the code when i call lookup:</p>
  
  <pre><code> try {
           int choice = 1; 
           NewSessionBeanRemote  libraryBean = 
           (NewSessionBeanRemote)ctx.lookup("NewSessionBean/remote");
  </code></pre>
  
  <p>Thanks for considering my request.</p>
  
  <p>PS
  I am following the EJB tutorial at tutorialspoint.</p>