I am still trying to understand how to track down this issue. Any tips on debugging through this would be appreciated!
So, further investigation, shows that when I just run by build with check limits in place, I get some expected failures *[ERROR] com.baselogic.domain.IdentifiedObject failed check. Line coverage rate of 57.1% is below 80.0% com.fedex.ground.configuration.DataSourceFactory failed check. Branch coverage rate of 0.0% is below 40.0% com.baselogic.dao.jpa.BaseDaoJpaImpl failed check. Branch coverage rate of 50.0% is below 90.0% com.baselogic.dao.jpa.BaseDaoJpaImpl failed check. Line coverage rate of 66.6% is below 80.0% com.baselogic.domain.UserNotFoundException failed check. Line coverage rate of 50.0% is below 80.0% com.fedex.ground.placeholder.service.impl.PlaceholderServiceImpl failed check. Branch coverage rate of 0.0% is below 40. 0% * So, Cobertura is actually working when I just run my "mvn clean install" with check on. But, when i try to get my report through "mvn site", I still get this error that it can not fine the *IdentifiedObject*. Even though you can see above, the class is there, and has 51% code coverage. --- Thank You… Mick Knutson, President BASE Logic, Inc. Enterprise Architecture, Design, Mentoring & Agile Consulting p. (866) BLiNC-411: (254-6241-1) f. (415) 685-4233 Website: http://baselogic.com Linked IN: http://linkedin.com/in/mickknutson Twitter: http://twitter.com/mickknutson Vacation Rental: http://tahoe.baselogic.com --- On Mon, Mar 16, 2009 at 8:48 AM, Mick Knutson <[email protected]> wrote: > *When I run mvn site -e -X I get the following error that Cobertura can > not find a class which exists in two places* > > *[myproject] DEBUG [main] Ejb3Configuration.configure(158) | Creating > Factory: ApplicationEntityManager* > *[INFO] > ------------------------------------------------------------------------* > *[ERROR] FATAL ERROR* > *[INFO] > ------------------------------------------------------------------------* > *[INFO] [PersistenceUnit: ApplicationEntityManager] class or package not > found* > *com.baselogic.domain.IdentifiedObject* > *[INFO] > ------------------------------------------------------------------------* > *[DEBUG] Trace* > *javax.persistence.PersistenceException: [PersistenceUnit: > ApplicationEntityManager] class or package not found* > * at > org.hibernate.ejb.Ejb3Configuration.addNamedAnnotatedClasses(Ejb3Configuration.java:1093) > * > * at > org.hibernate.ejb.Ejb3Configuration.addClassesToSessionFactory(Ejb3Configuration.java:871) > * > * at > org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:758)* > * at > org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:191)* > * at > org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:253)* > * at > org.codehaus.mojo.hibernate3.configuration.JPAComponentConfiguration.createConfiguration(JPAComponentConfiguration.java:28) > * > * at > org.codehaus.mojo.hibernate3.configuration.AbstractComponentConfiguration.getConfiguration(AbstractComponentConfiguration.java:51) > * > * at > org.codehaus.mojo.hibernate3.exporter.Hbm2DDLExporterMojo.doExecute(Hbm2DDLExporterMojo.java:87) > * > * at > org.codehaus.mojo.hibernate3.HibernateExporterMojo.execute(HibernateExporterMojo.java:152) > * > * at > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:453) > * > * at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:559) > * > * at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:500) > * > * at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:925) > * > * at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:768) > * > * at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:550) > * > * at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:500) > * > * at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:479) > * > * at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:331) > * > * at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:292) > * > * at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142) > * > * at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)* > * at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)* > * at org.apache.maven.cli.MavenCli.main(MavenCli.java:301)* > * 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.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)* > * at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)* > * at > org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)* > * at org.codehaus.classworlds.Launcher.main(Launcher.java:375)* > *Caused by: java.lang.ClassNotFoundException: > com.baselogic.domain.IdentifiedObject* > > > Now this object lives in two places when I run site: > > > 1. *C:\opt\projects\grd\trunk\data-services\target\classes > \com\baselogic\domain\IdentifiedObject.class* > 2. *C:\opt\projects\grd\trunk\data-services\ > target\generated-classes\cobertura > \com\baselogic\domain\IdentifiedObject.class* > > > Here is my plugin: > > * <plugin> > <groupId>org.codehaus.mojo</groupId> > <artifactId>cobertura-maven-plugin</artifactId> > <configuration> > <instrumentation> > </instrumentation> > </configuration> > <executions> > <execution> > <goals> > <goal>clean</goal> > </goals> > </execution> > </executions> > > <dependencies> > <dependency> > <groupId>net.sourceforge.cobertura</groupId> > <artifactId>cobertura</artifactId> > <version>1.9rc1</version> > </dependency> > </dependencies> > </plugin> > * > > > --- > Thank You… > > Mick Knutson, President > > BASE Logic, Inc. > Enterprise Architecture, Design, Mentoring & Agile Consulting > p. (866) BLiNC-411: (254-6241-1) > f. (415) 685-4233 > > Website: http://baselogic.com > Linked IN: http://linkedin.com/in/mickknutson > Twitter: http://twitter.com/mickknutson > Vacation Rental: http://tahoe.baselogic.com > --- > > >
