tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zemian Deng (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENEJB-1067) Cobertura intrumentation breaks OpenEJB MDB's
Date Thu, 10 Sep 2009 12:36:57 GMT

    [ https://issues.apache.org/jira/browse/OPENEJB-1067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12753593#action_12753593
] 

Zemian Deng commented on OPENEJB-1067:
--------------------------------------

Hi there,

I encountered similar error when tried to generate Cobertura report with the openejb-examples/simple-mdb.
To repeat this test, add the following to openejb-examples-3.1.1/simple-mdb/pom.xml

{code}
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <configuration>
          <formats>
            <format>html</format>
          </formats>
        </configuration>
      </plugin>
    </plugins>
  </reporting>
{code}

Then run {{mvn site}}}, and then I get this error:

{code}
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.superbiz.mdb.ChatBeanTest
Apache OpenEJB 3.1.1    build: 20090530-06:18
http://openejb.apache.org/
INFO - openejb.home = D:\NGI\inc1\code_coverage\cobertura_demos\simple-mdb
INFO - openejb.base = D:\NGI\inc1\code_coverage\cobertura_demos\simple-mdb
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 Mana
ger)
INFO - Found ClientModule in classpath: d:\data\dengz1\.m2\repository\org\apache\ant\ant\1.7.0\ant-1.7.0.jar
INFO - Found EjbModule in classpath: D:\NGI\inc1\code_coverage\cobertura_demos\simple-mdb\target\generated-classes\cober
tura
INFO - Found ClientModule in classpath: d:\data\dengz1\.m2\repository\org\apache\ant\ant-launcher\1.7.0\ant-launcher-1.7
.0.jar
INFO - Beginning load: d:\data\dengz1\.m2\repository\org\apache\ant\ant\1.7.0\ant-1.7.0.jar
INFO - Beginning load: D:\NGI\inc1\code_coverage\cobertura_demos\simple-mdb\target\generated-classes\cobertura
INFO - Beginning load: d:\data\dengz1\.m2\repository\org\apache\ant\ant-launcher\1.7.0\ant-launcher-1.7.0.jar
INFO - Configuring enterprise application: classpath.ear
WARN - No application-client.xml found assuming annotations present: classpath.ear, module:
ant-1.7.0.jar
WARN - No application-client.xml found assuming annotations present: classpath.ear, module:
ant-launcher-1.7.0.jar
ERROR - FATAL ERROR: Unknown error in Assembler.  Please send the following stack trace and
this message to user@openejb
.org :
 java.lang.IllegalStateException: When annotating a bean class as @MessageDriven without declaring
messageListenerInterf
ace, the bean must implement exactly one interface, no more and no less. beanClass=org.superbiz.mdb.ChatBean
interfaces=
javax.jms.MessageListener, net.sourceforge.cobertura.coveragedata.HasBeenInstrumented,
        at org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:1317)
        at org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:616)
        at org.apache.openejb.config.AnnotationDeployer.deploy(AnnotationDeployer.java:186)
        at org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:247)
        at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:601)
        at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:551)
        at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:380)
        at org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:292)
        at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:271)
        at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:137)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:265)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
        at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
        at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
        at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
        at javax.naming.InitialContext.init(InitialContext.java:223)
        at javax.naming.InitialContext.<init>(InitialContext.java:197)
        at org.superbiz.mdb.ChatBeanTest.test(ChatBeanTest.java:31)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at junit.framework.TestCase.runTest(TestCase.java:164)
        at junit.framework.TestCase.runBare(TestCase.java:130)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:120)
        at junit.framework.TestSuite.runTest(TestSuite.java:228)
        at junit.framework.TestSuite.run(TestSuite.java:223)
        at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
        at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140
)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
        at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)

FATAL - OpenEJB has encountered a fatal error and cannot be started: Assembler failed to build
the container system.
org.apache.openejb.OpenEJBException: java.lang.IllegalStateException: When annotating a bean
class as @MessageDriven wit
hout declaring messageListenerInterface, the bean must implement exactly one interface, no
more and no less. beanClass=o
rg.superbiz.mdb.ChatBean interfaces=javax.jms.MessageListener, net.sourceforge.cobertura.coveragedata.HasBeenInstrumente
d, : When annotating a bean class as @MessageDriven without declaring messageListenerInterface,
the bean must implement
exactly one interface, no more and no less. beanClass=org.superbiz.mdb.ChatBean interfaces=javax.jms.MessageListener,
ne
t.sourceforge.cobertura.coveragedata.HasBeenInstrumented,
        at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:285)
        at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:137)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
        at org.apache.openejb.OpenEJB.init(OpenEJB.java:265)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
        at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
        at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
        at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
        at javax.naming.InitialContext.init(InitialContext.java:223)
        at javax.naming.InitialContext.<init>(InitialContext.java:197)
        at org.superbiz.mdb.ChatBeanTest.test(ChatBeanTest.java:31)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at junit.framework.TestCase.runTest(TestCase.java:164)
        at junit.framework.TestCase.runBare(TestCase.java:130)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:120)
        at junit.framework.TestSuite.runTest(TestSuite.java:228)
        at junit.framework.TestSuite.run(TestSuite.java:223)
        at org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
        at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140
)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
        at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
Caused by: java.lang.IllegalStateException: When annotating a bean class as @MessageDriven
without declaring messageList
enerInterface, the bean must implement exactly one interface, no more and no less. beanClass=org.superbiz.mdb.ChatBean
i
nterfaces=javax.jms.MessageListener, net.sourceforge.cobertura.coveragedata.HasBeenInstrumented,
        at org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:1317)
        at org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:616)
        at org.apache.openejb.config.AnnotationDeployer.deploy(AnnotationDeployer.java:186)
        at org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:247)
        at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:601)
        at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:551)
        at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:380)
        at org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:292)
        at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:271)
        ... 39 more
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.5 sec <<< FAILURE!

Results :

Tests in error:
  test(org.superbiz.mdb.ChatBeanTest)

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0

[ERROR] There are test failures.
{code}

> Cobertura intrumentation breaks OpenEJB MDB's
> ---------------------------------------------
>
>                 Key: OPENEJB-1067
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1067
>             Project: OpenEJB
>          Issue Type: Bug
>    Affects Versions: 3.1.1
>            Reporter: Francis De Brabandere
>
> {code}
> FATAL - OpenEJB has encountered a fatal error and cannot be started: Assembler failed
to build the container system.
> org.apache.openejb.OpenEJBException: java.lang.IllegalStateException: When annotating
a bean class as @MessageDriven without declaring messageListenerInterface, the bean must implement
exactly one interface, no more and no less. beanClass=com.example.EventServiceConsumerMDB
interfaces=javax.jms.MessageListener, net.sourceforge.cobertura.coveragedata.HasBeenInstrumented,
: When annotating a bean class as @MessageDriven without declaring messageListenerInterface,
the bean must implement exactly one interface, no more and no less. beanClass=com.example.EventServiceConsumerMDB
interfaces=javax.jms.MessageListener, net.sourceforge.cobertura.coveragedata.HasBeenInstrumented,

> 	at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:285)
> 	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:137)
> 	at org.apache.openejb.OpenEJB.init(OpenEJB.java:286)
> 	at org.apache.openejb.OpenEJB.init(OpenEJB.java:265)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.apache.openejb.loader.OpenEJBInstance.init(OpenEJBInstance.java:36)
> 	at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:71)
> 	at org.apache.openejb.client.LocalInitialContextFactory.init(LocalInitialContextFactory.java:53)
> 	at org.apache.openejb.client.LocalInitialContextFactory.getInitialContext(LocalInitialContextFactory.java:42)
> 	at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
> 	at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
> 	at javax.naming.InitialContext.init(InitialContext.java:223)
> 	at javax.naming.InitialContext.<init>(InitialContext.java:197)
> 	at com.example.UnitTestInitialContextFactory.create(UnitTestInitialContextFactory.java:23)
> 	at com.example.EventServiceExampleBeanTest.setUp(EventServiceExampleBeanTest.java:19)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
> 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
> 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
> 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:44)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
> 	at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> 	at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
> 	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
> 	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
> 	at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
> 	at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
> Caused by: java.lang.IllegalStateException: When annotating a bean class as @MessageDriven
without declaring messageListenerInterface, the bean must implement exactly one interface,
no more and no less. beanClass=com.example.EventServiceConsumerMDB interfaces=javax.jms.MessageListener,
net.sourceforge.cobertura.coveragedata.HasBeenInstrumented, 
> 	at org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:1317)
> 	at org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:616)
> 	at org.apache.openejb.config.AnnotationDeployer.deploy(AnnotationDeployer.java:186)
> 	at org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:247)
> 	at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:601)
> 	at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:551)
> 	at org.apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguration(ConfigurationFactory.java:380)
> 	at org.apache.openejb.assembler.classic.Assembler.getOpenEjbConfiguration(Assembler.java:292)
> 	at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:271)
> 	... 44 more
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message