From: Charles H. <ch...@ho...> - 2010-12-15 04:15:32
|
It might be because of the way cobertura instruments classes. To prevent re-instrumentation, cobertura adds an marker interface to class. This marker interface ( net.sourceforge.cobertura.coveragedata.HasBeenInstrumented ) may be interfering with the container's normal behavior. I have seen this problem with a JBoss EJB3 container. I have submitted a patch which uses an annotation instead of an interface as a marker. > When running unit tests with Maven, all the tests pass. When running the same > tests wih Cobertura, the tests fail with the an exception. Running the same > tests in Eclipse works perfectly. The project uses EJB3 and JPA. The unit > tests are run within an embedded Glassfish container. > > Exception > javax.naming.NamingException: Lookup failed for > 'java:global/classes/HVATRManagerImpl' in SerialContext [Root exception is > javax.naming.NameNotFoundException: HVATRManagerImpl not found] > > Can someone please help me with the issue ? > |