title: ejb testing issues with netbeans and openejb
body: <p>I have created a netbeans 6.7 EnterpriseApplication project with ejb and war modules with a test stateless session ejb with a simple sayHello() method. </p>
  
  <p>I also added the openEjb library in order to unit test the ejb. Everything runs fine except that I keep getting the following error: </p>
  
  <pre><code>
  Testsuite: com.myapp.test.NewEmptyJUnitTest
  Apache OpenEJB 3.1.1    build: 20090530-06:18
  http://openejb.apache.org/
  INFO - openejb.home = C:\Users\me\Documents\NetBeansProjects\TestEnterpriseApp\TestEnterpriseApp-ejb
  INFO - openejb.base = C:\Users\me\Documents\NetBeansProjects\TestEnterpriseApp\TestEnterpriseApp-ejb
  INFO - Configuring Service(id=Default Security Service, type=SecurityService, provider-id=Default Security Service)
  INFO - Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default Transaction Manager)
  INFO - Found ClientModule in classpath: C:\Program Files\NetBeans 6.7.1\java2\ant\lib\ant.jar
  INFO - Found ClientModule in classpath: C:\Program Files\NetBeans 6.7.1\java2\ant\lib\ant-launcher.jar
  INFO - Found EjbModule in classpath: C:\Users\me\Documents\NetBeansProjects\TestEnterpriseApp\TestEnterpriseApp-ejb\build\jar
  INFO - Found ClientModule in classpath: C:\Users\me\Documents\NetBeansProjects\TestEnterpriseApp\lib\OpenEJB\xml-resolver-1.2.jar
  INFO - Found ClientModule in classpath: C:\Users\me\Documents\Downloads\glassfish\lib\webservices-tools.jar
  INFO - Beginning load: C:\Program Files\NetBeans 6.7.1\java2\ant\lib\ant.jar
  INFO - Beginning load: C:\Program Files\NetBeans 6.7.1\java2\ant\lib\ant-launcher.jar
  INFO - Beginning load: C:\Users\me\Documents\NetBeansProjects\TestEnterpriseApp\TestEnterpriseApp-ejb\build\jar
  INFO - Beginning load: C:\Users\me\Documents\NetBeansProjects\TestEnterpriseApp\lib\OpenEJB\xml-resolver-1.2.jar
  INFO - Beginning load: C:\Users\me\Documents\Downloads\glassfish\lib\webservices-tools.jar
  INFO - Configuring enterprise application: classpath.ear
  WARN - No application-client.xml found assuming annotations present: classpath.ear, module: ant.jar
  WARN - No application-client.xml found assuming annotations present: classpath.ear, module: ant-launcher.jar
  WARN - No application-client.xml found assuming annotations present: classpath.ear, module: xml-resolver-1.2.jar
  WARN - No application-client.xml found assuming annotations present: classpath.ear, module: webservices-tools.jar
  java.lang.Exception: Could not load 1/0/com/sun/codemodel/CodeWriter.class
          at org.apache.xbean.finder.ClassFinder.readClassDef(ClassFinder.java:730)
  ....
  </code></pre>
  
  <p>Turns out that I am getting the glassfish library webservices-tools.jar from somewhere somehow and I cant find out how to get rid of it so that I dont get the bunch of Exceptions whenever I try to run any junit tests.</p>
  
  <p>Has anyone faced this issue before? Can you help me resolve it please?</p>
  
  <p>Thanks.</p>