title: Naming context and ejb-jar in TomEE
body: <p>I'm getting an NamingContext.lookup error trying to find <code>ejb/ebj001ini</code> that I can't solve. The configuration is as follows:</p>
  
  <p>Bean: <code>iportal.Sp001iniB.java</code></p>
  
  <p>Ejb-jar.xml: (tried placing it in META-INF and WEB-INF, getting the same error)</p>
  
  <pre><code>&lt;enterprise-beans&gt;
      &lt;session&gt;
        &lt;display-name&gt;ejb000ini&lt;/display-name&gt;
        &lt;ejb-name&gt;ejb000ini&lt;/ejb-name&gt;
        &lt;home&gt;iportal.Sp000iniH&lt;/home&gt;
        &lt;remote&gt;iportal.Sp000iniS&lt;/remote&gt;
        &lt;ejb-class&gt;iportal.Sp000iniB&lt;/ejb-class&gt;
        &lt;session-type&gt;Stateless&lt;/session-type&gt;
        &lt;transaction-type&gt;Bean&lt;/transaction-type&gt;
      &lt;/session&gt;
    &lt;/enterprise-beans&gt;
  
    &lt;assembly-descriptor&gt;
      &lt;container-transaction&gt;
        &lt;method&gt;
          &lt;ejb-name&gt;ejb000ini&lt;/ejb-name&gt;
          &lt;method-name&gt;*&lt;/method-name&gt;
        &lt;/method&gt;
        &lt;trans-attribute&gt;Supports&lt;/trans-attribute&gt;
      &lt;/container-transaction&gt;
    &lt;/assembly-descriptor&gt;
  </code></pre>
  
  <p>Servlet that calls initialize the EJB:</p>
  
  <pre><code>InitialContext ctx = new InitialContext();
  Sp000iniH ih = (Sp000iniH)ctx.lookup("java:comp/env/ejb/ejb000ini");
  Sp000ini myEjb = ih.create();
  </code></pre>
  
  <p>Thanks! </p>