On Sep 23, 2010, at 2:46 PM, Marius Kruger wrote: > the error asked so nicely to send the stacktrace below. > > I'm trying to load an alternative ejb implementation for testing > purposes similar to: > > http://openejb.979440.n4.nabble.com/Is-it-possible-to-insert-a-mock-implementation-of-EJB-that-is-being-referenced-using-EJB-annotation-td981106.html > > so I'm trying to specify my alternative in the ejb-jar.xml (in > src/test/resources/META-INF) > > <?xml version="1.0" encoding="ASCII"?> > <ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns="http://java.sun.com/xml/ns/javaee" > xmlns:ejb="http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" > xsi:schemaLocation="http://java.sun.com/xml/ns/javaee > http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd" version="3.0"> > <display-name>DDS Service</display-name> > > <enterprise-beans><session><ejb-name>za.co.enerweb.dds.ejb.MockEmailSender</ejb-name></session></enterprise-beans> > </ejb-jar> > > (using openejb-core-3.1.3-20100806.053716-36.jar) > > == > ERROR - FATAL ERROR: Unknown error in Assembler. Please send the > following stack trace and this message to [email protected] : > java.lang.NullPointerException > at > org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:90) > at > org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:66) > at > org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:1055)
Duplicated this one and it's a simple matter of the ejb-name specified in xml not matching anything that was discovered. Long story short, per spec the ejb-name of an annotated bean defaults to clazz.getSimpleName() rather than clazz.getName(). So things weren't lining up. I cleaned up all the exception handling around this: OPENEJB-1373: Validation: <ejb-class> omitted with no corresponding annotated bean OPENEJB-1372: Default openejb.descriptors.output to true when there are validation failures We're re-rolling the 3.1.3 binaries right now so these changes should be there. -David
