title: how can i test an EJB using netbeans?
body: <p>I have been struggling trying to test a super simple EJB project in netbeans.  i have tried several examples form my java book, and an even simpler example i found online (<a href="http://javadude.wordpress.com/2010/02/22/tutorial-most-simple-test-application-for-embedded-glassfish-netbeans-hudson/" rel="nofollow noreferrer">http://javadude.wordpress.com/2010/02/22/tutorial-most-simple-test-application-for-embedded-glassfish-netbeans-hudson/</a>).  this is a super basic EJB that only just adds two numbers.. that's it!! it runs fine, but no matter how i try to test it, nothing works.  even more puzzling, i get two different errors on the two different laptops i test it on.  obviously i am doing something very wrong... <em>any</em> advice would be so appreciated.</p>
  
  <h2>one error i get is:</h2>
  
  <p>Testcase: testAddNumbers(bean.MyBeanTest):        Caused an ERROR
  No EJBContainer provider available: no provider names had been found.</p>
  
  <h2>javax.ejb.EJBException: No EJBContainer provider available: no provider names had been found.</h2>
  
  <p>and the other is:</p>
  
  <hr>
  
  <p>SEVERE: Exception while deploying the app
  java.lang.IllegalArgumentException: Invalid ejb jar [WebTestEmb.jar]: it contains zero ejb. 
  Note: 
  1. A valid ejb jar requires at least one session, entity (1.x/2.x style), or message-driven bean. 
  2. EJB3+ entity beans (@Entity) are POJOs and please package them as library jar. 
  3. If the jar file contains valid EJBs which are annotated with EJB component level annotations (@Stateless, @Stateful, @MessageDriven, @Singleton), please check server.log to see whether the annotations were processed properly.</p>
  
  <hr>
  
  <p>clearly, i do have an ejb in my project.  it is built exactly as in the directions at the url i posted above.  </p>
  
  <p>thanks!</p>