here the trace :

-------------------------------------------------------------------------------
Test set: org.superbiz.moviefun.MoviesTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 10.308 sec
<<< FAILURE!
test(org.superbiz.moviefun.MoviesTest)  Time elapsed: 10.162 sec  <<< ERROR!
<openjpa-2.2.0-r422266:1244990 fatal general error>
org.apache.openjpa.persistence.PersistenceException: null
        at
org.apache.openjpa.enhance.ClassRedefiner.redefineClasses(ClassRedefiner.java:96)
        at
org.apache.openjpa.enhance.ManagedClassSubclasser.prepareUnenhancedClasses(ManagedClassSubclasser.java:176)
        at
org.apache.openjpa.kernel.AbstractBrokerFactory.loadPersistentTypes(AbstractBrokerFactory.java:314)
        at
org.apache.openjpa.kernel.AbstractBrokerFactory.initializeBroker(AbstractBrokerFactory.java:238)
        at
org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:212)
        at
org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156)
        at
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227)
        at
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:60)
        at
org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createEntityManager(ReloadableEntityManagerFactory.java:137)
        at
org.apache.openejb.persistence.JtaEntityManagerRegistry.getEntityManager(JtaEntityManagerRegistry.java:115)
        at
org.apache.openejb.persistence.JtaEntityManager.getEntityManager(JtaEntityManager.java:80)
        at
org.apache.openejb.persistence.JtaEntityManager.persist(JtaEntityManager.java:126)
        at org.superbiz.moviefun.MoviesTest.test(MoviesTest.java:62)
        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:168)
        at junit.framework.TestCase.runBare(TestCase.java:134)
        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:124)
        at junit.framework.TestSuite.runTest(TestSuite.java:243)
        at junit.framework.TestSuite.run(TestSuite.java:238)
        at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
        at
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:236)
        at
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:134)
        at
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:113)
        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.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
        at
org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
        at
org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
        at
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:103)
        at 
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
Caused by: java.lang.reflect.InvocationTargetException
        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.openjpa.enhance.ClassRedefiner.redefineClasses(ClassRedefiner.java:85)
        ... 37 more
Caused by: java.lang.UnsupportedOperationException: class redefinition
failed: attempted to change the schema (add/remove fields)
        at sun.instrument.InstrumentationImpl.retransformClasses0(Native Method)
        at
sun.instrument.InstrumentationImpl.retransformClasses(InstrumentationImpl.java:124)
        ... 42 more


I just added the following to pom.xm of moviefun/app/pom.xml :
...
        <plugin>
                           <groupId>org.jacoco</groupId>
                           <artifactId>jacoco-maven-plugin</artifactId>
                           <version>0.5.5.201112152213</version>
                           <configuration>
                                 
<destfile>${basedir}/target/coverage-reports/jacoco-unit.exec</destfile>
                                 
<datafile>${basedir}/target/coverage-reports/jacoco-unit.exec</datafile>
                           </configuration>
                           <executions>
                                  <execution>
                                        <id>jacoco-initialize</id>
                                        <goals>
                                               <goal>prepare-agent</goal>
                                        </goals>
                                  </execution>
                                  <execution>
                                        <id>jacoco-site</id>
                                        <phase>package</phase>
                                        <goals>
                                               <goal>report</goal>
                                        </goals>
                                  </execution>
                           </executions>
                    </plugin>
...







--
View this message in context: 
http://openejb.979440.n4.nabble.com/Cobertura-error-tp4657791p4657924.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to