Issue Details (XML | Word | Printable)

Key: MOJO-971
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: David Vicente
Reporter: Christophe DENEUX
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Mojo

JDependReportBean is not a AbstractReportBean

Created: 12/Dec/07 06:17 AM   Updated: 10/Feb/08 12:44 PM  Due: 10/Feb/08
Component/s: dashboard
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

Environment:
Maven version: 2.0.7
JDK version: jdk1.6.0_01
Continuum version: 1.1-alpha-2
Database: MySQL 4.0.24_Debian-10sarge1
The dashboard plugin version used is: 1.0-20070907.172709-15

Complexity: Intermediate


 Description  « Hide
When running the following continuum project build definition "clean deploy site dashboard-report:persist dashboard-report:dashboard site:deploy --batch-mode --non-recursive --update-snapshots --check-plugin-updates -Duse-corporate-repository -Denv=ci -X -e", I have the following error about the goal "persist":

------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO]instance not of expected entity type:
org.codehaus.mojo.dashboard.report.plugin.beans.JDependReportBean is not
a: org.codehaus.mojo.dashboard.report.plugin.beans.AbstractReportBean
[INFO] Trace
org.hibernate.HibernateException: instance not of expected entity type:
org.codehaus.mojo.dashboard.report.plugin.beans.JDependReportBean is not
a: org.codehaus.mojo.dashboard.report.plugin.beans.AbstractReportBean
at
org.hibernate.persister.entity.AbstractEntityPersister.getSubclassEntityPersister(AbstractEntityPersister.java :3568)
at
org.hibernate.impl.SessionImpl.getEntityPersister(SessionImpl.java:1347)
at org.hibernate.engine.ForeignKeys.isTransient(ForeignKeys.java:180)
at
org.hibernate.event.def.AbstractSaveEventListener.getEntityState (AbstractSaveEventListener.java:487)
at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:84)
at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate (DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:507)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:499)
at
org.hibernate.engine.CascadingAction$1.cascade(CascadingAction.java:218)
at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:268)
at org.hibernate.engine.Cascade.cascadeAssociation (Cascade.java:216)
at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)
at
org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:296)
at org.hibernate.engine.Cascade.cascadeCollection (Cascade.java:242)
at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:219)
at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)
at org.hibernate.engine.Cascade.cascade (Cascade.java:130)
at org.hibernate.engine.Cascade.cascade(Cascade.java:97)
at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.cascadeOnUpdate(DefaultSaveOrUpdateEventListener.java :332)
at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performUpdate(DefaultSaveOrUpdateEventListener.java:304)
at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsDetached (DefaultSaveOrUpdateEventListener.java:217)
at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
at
org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate (DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java:507)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:499)
at org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:495)
at
org.codehaus.mojo.dashboard.report.plugin.hibernate.HibernateServiceImpl.saveOrUpdate(HibernateServiceImpl.java:235)
at
org.codehaus.mojo.dashboard.report.plugin.DashBoardDBMojo.execute(DashBoardDBMojo.java:80)



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Christophe DENEUX added a comment - 12/Dec/07 06:26 AM
After to have read the source code, it seems the problem is due to:
  • In my POM file, I have declared the dasboard in the report section:
    <reporting>
    <plugins>
    <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>dashboard-maven-plugin</artifactId>
    <version>${dashboard-maven-plugin.version}</version>
    </plugin>
    </plugins>
    </reporting>
  • Continuum exexutes the following goals in the same time but one after one: "site" and "dashboard-report:persist "
  • When executing the goal "site", the singleton DashBoardUtils is initialized with dbPersist=true (==> JDepend is added to the internal report list)
  • When executing the goal "persist", the singleton is not reinitialized and JDepend is always in the internel report list, next it will be persisted whit an error.

Christophe DENEUX added a comment - 12/Dec/07 07:18 AM
An error occurs in the previous comment. The DashBoardUtils is initialized with dbPersist=false because we are on the goal "site". The goal "persist" try to initialize the DashBoardUtils with dbPersist=true.

David Vicente added a comment - 09/Feb/08 02:49 PM
already fixed as personal version. ready to be deployed

David Vicente added a comment - 10/Feb/08 12:44 PM
released this day, February 10th 2008 as 1. 0-SNAPSHOT : dashboard-maven-plugin-1.0-20080210.183905-16.jar