I worked around this by adding a profile to the pom and move the
hibernate3 and dbunit plugins into it. The profile deactivates when I
pass -Dnodb. So whenever I want to run the cobertura stuff I make it
skip the hibernate stuff.
R.
On 4/5/07, sarat.pediredla <[EMAIL PROTECTED]> wrote:
I am facing this same exact problem. Do I have to add a dependancy to my own
war in the pom.xml?
hibernate3 keeps copping out with the following error
[INFO] Instrumentation was successful.
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] Preparing hibernate3:hbm2ddl
[WARNING] Removing: hbm2ddl from forked lifecycle, to prevent recursive
invocation.
[INFO] [warpath:add-classes {execution: default}]
[INFO] [native2ascii:native2ascii {execution: native2ascii-utf8}]
[INFO] [native2ascii:native2ascii {execution: native2ascii-8859_1}]
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[WARNING] POM for 'org.hibernate:jtidy:pom:r8-20060801:runtime' is invalid.
It will be ignored for artifact resolution. Reason: Parse error reading POM.
Reason: TEXT must be immediately followed by END_TAG and not START_TAG
(position: START_TAG seen ...<licenses>\n\t\t\t<license>... @12:13)
[WARNING] POM for 'org.hibernate:jtidy:pom:r8-20060801:runtime' is invalid.
It will be ignored for artifact resolution. Reason: Parse error reading POM.
Reason: TEXT must be immediately followed by END_TAG and not START_TAG
(position: START_TAG seen ...<licenses>\n\t\t\t<license>... @12:13)
[INFO] [hibernate3:hbm2ddl {execution: default}]
[INFO] Configuration XML file loaded:
C:\Users\Sarat\workspace\workpad\src\main\resources\hibernate.cfg.xml
[INFO] Configuration XML file loaded:
C:\Users\Sarat\workspace\workpad\src\main\resources\hibernate.cfg.xml
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Unable to load class declared as <mapping
class="com.hedgehoglab.workpad.model.TaskCategory"/> in the configuration:
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.hibernate.MappingException: Unable to load class declared as <mapping
class="com.hedgehoglab.workpad.model.TaskCategory"/> in the configuration:
at
org.hibernate.cfg.AnnotationConfiguration.parseMappingElement(AnnotationConfiguration.java:545)
at
org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1479)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1458)
mraible wrote:
>
> Sorry, I'm out of answers - you know as much as I do at this point.
>
> On 3/6/07, Rob van Oostrum <[EMAIL PROTECTED]> wrote:
>> Just tried it. No luck. Same error.
>>
>> On 3/6/07, Matt Raible <[EMAIL PROTECTED]> wrote:
>> > I believe I received an e-mail off-list where someone said reverting
>> > to version 2.0 of the cobertura plugin fixed there problem.
>> >
>> > Matt
>> >
>> > On 3/6/07, Rob van Oostrum <[EMAIL PROTECTED]> wrote:
>> > > I get this error running 'mvn site' on my projects:
>> > >
>> > > [INFO] Instrumentation was successful.
>> > > [INFO] [resources:testResources]
>> > > [INFO] Using default encoding to copy filtered resources.
>> > > [INFO] [compiler:testCompile]
>> > > [INFO] Nothing to compile - all classes are up to date
>> > > [INFO] Preparing hibernate3:hbm2ddl
>> > > [WARNING] Removing: hbm2ddl from forked lifecycle, to prevent
>> > > recursive invocation.
>> > > [INFO] [resources:resources]
>> > > [INFO] Using default encoding to copy filtered resources.
>> > > [INFO] [hibernate3:hbm2ddl {execution: default}]
>> > > [INFO] Configuration XML file loaded:
>> > >
>>
/Users/rob/Documents/workspace/project/core/src/main/resources/hibernate.cfg.xml
>> > > [INFO] Configuration XML file loaded:
>> > >
>>
/Users/rob/Documents/workspace/project/core/src/main/resources/hibernate.cfg.xml
>> > > [INFO]
>> ------------------------------------------------------------------------
>> > > [ERROR] FATAL ERROR
>> > > [INFO]
>> ------------------------------------------------------------------------
>> > > [INFO] Unable to load class declared as <mapping class="foo.Bar"/> in
>> > > the configuration:
>> > > [INFO]
>> ------------------------------------------------------------------------
>> > > [INFO] Trace
>> > > org.hibernate.MappingException: Unable to load class declared as
>> > > <mapping class="foo.Bar"/> in the configuration:
>> > > at
>>
org.hibernate.cfg.AnnotationConfiguration.parseMappingElement(AnnotationConfiguration.java:545)
>> > > at
>> org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1479)
>> > >
>> > > (etc, etc)
>> > >
>> > > I can reproduce this on both projects I'm currently working on. One
>> > > that I hadn't looked at for a while and is still on Appfuse 2.0-m2,
>> > > and my main project right now which is using 2.0-m4-SNAPSHOT. In both
>> > > cases running 'mvn test' works fine, as does running 'mvn site' as
>> > > long as I somehow keep the hibernate3 plugin from running (the
>> > > workaround I use is to deactivate it by passing -Dnodb which causes a
>> > > profile holding the hibernate3 and dbunit plugins to not activate; as
>> > > long as I prime the database prior to generating the site and its
>> > > reports I don't have to worry about dbunit since all the junit tests
>> > > rollback their transactions anyway).
>> > >
>> > > Am I missing something obvious here? There's some chatter about
>> > > cobertura doing nasty things with the maven classpath(s) which might
>> > > go to explain these errors on the hibernate3 side. If this is a
>> > > legitimate issue, I'm not sure there is a solution, but hopefully
>> this
>> > > workaround is halfway usable for some people.
>> > >
>> > >
>> > > Cheers
>> > > Rob
>> > >
>> > > ---------------------------------------------------------------------
>> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > > For additional commands, e-mail: [EMAIL PROTECTED]
>> > >
>> > >
>> >
>> >
>> > --
>> > http://raibledesigns.com
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
> --
> http://raibledesigns.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/hibernate3-and-cobertura-plugins-not-getting-along-tf3357955s2369.html#a9864014
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]