It's good you spotted that one Ralf.

Anything I can do to help would be a pleasure, although having said that I am actually going away for a week tomorrow.

Ralf Quebbemann on 29/12/05 20:00, wrote:
I have opened an issue (MOJO-194) in jira. Let me know if it's ok. Maybe Adam or me can provide more help.

    Ralf

Carlos Sanchez wrote:

Could you open an issue in jira?

On 12/29/05, Ralf Quebbemann <[EMAIL PROTECTED]> wrote:

Yes, that's exactly the same problem I faced yesterday too! The problem
is described on the Cobertura FAQ page and they recommend:

"Cobertura does not need ASM in your classpath when running tests. If
you're seeing classpath conflicts, just make sure the asm jar that comes
with Cobertura is used only by Cobertura, and only when instrumenting."

Hm, seems a little bit more difficult with Maven2. ASM is a dependency
of cobertura.jar which is already in the classpath when running the tests.

I think there is currently no way of "unloading" or "replacing" this jar
with another version (1.5.3) of ASM.

Maybe someone of the Maven2 team can answer this question? Any help
would be greatly appreciated.

Take care

Ralf

Adam Hardy wrote:

Maybe I should have added - I think it's a classloader issue because
Hibernate specifies asm-1.5.3 in its pom which requires the file but
cobertura specifies asm-2.1 in its pom.

The problem seems to be that Hibernate cannot load asm-1.5.3 because
cobertura has already loaded the latest version, which is incompatible.


Adam

-------- Original Message --------
Date: Tue, 27 Dec 2005 00:34:29 +0000
From: Adam Hardy <[EMAIL PROTECTED]>
To: Maven Users List <users@maven.apache.org>
Subject: [m2] cobertura from sandbox

I get this huge stacktrace when running cobertura.

It looks like a dependencies issue. The missing class is found in
dependency asm-1.5.3 of Hibernate, but not in dependency asm-2.1 of
cobertura-maven-plugin.

Is there a setting I can use? Is this a fault with cobertura or the
hibernate pom? Or a maven classloader issue?

Thanks
Adam



ERROR [hibernate.proxy.BasicLazyInitializer.getProxyFactory()] CGLIB
Enhancement failed: com.gargantus.tradingcode.domain.Market
java.lang.NoClassDefFoundError: org/objectweb/asm/CodeVisitor
        at
net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:165)
        at
net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)

        at
net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)

        at
net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
        at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117)
        at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
        at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
        at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69)
        at
org.hibernate.proxy.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:116)

        at
org.hibernate.proxy.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:41)

        at
org.hibernate.tuple.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:161)

        at
org.hibernate.tuple.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:131)

        at
org.hibernate.tuple.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
        at
org.hibernate.tuple.TuplizerLookup.create(TuplizerLookup.java:64)
        at
org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:257)
        at
org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:412)

        at
org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:108)

        at
org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)

        at
org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:215)
        at
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1154)

        at
com.gargantus.tradingcode.HibernateUtil.<init>(HibernateUtil.java:74)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

        at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
        at
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:172)
        at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:75)

        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:670)

        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:329)

        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)

        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)

        at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:176)

        at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:105)

        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveConstructorArguments(AbstractAutowireCapableBeanFactory.java:706)

        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:611)

        at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:329)

        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)

        at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)

        at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275)

        at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:320)

        at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:87)

        at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:72)

        at
com.gargantus.tradingcode.SpringComponentFactoryAdaptor.setContext(SpringComponentFactoryAdaptor.java:55)

        at
com.gargantus.tradingcode.SpringComponentFactoryAdaptor.<init>(SpringComponentFactoryAdaptor.java:32)

        at
com.gargantus.tradingcode.ComponentFactory.reinitialise(ComponentFactory.java:156)

        at
com.gargantus.tradingcode.ComponentFactory.initFromCSV(ComponentFactory.java:121)

        at
com.gargantus.tradingcode.ComponentFactory.reinitialise(ComponentFactory.java:105)

        at
com.gargantus.tradingcode.ComponentFactory.initialise(ComponentFactory.java:84)

        at
com.gargantus.testing.util.DbUnitTransactionAwareTestCase.setUp(DbUnitTransactionAwareTestCase.java:125)

        at junit.framework.TestCase.runBare(TestCase.java:125)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:118)
        at junit.framework.TestSuite.runTest(TestSuite.java:208)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        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:585)
        at
org.codehaus.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:246)

        at
org.codehaus.surefire.battery.JUnitBattery.execute(JUnitBattery.java:220) at org.codehaus.surefire.Surefire.executeBattery(Surefire.java:204)
        at org.codehaus.surefire.Surefire.run(Surefire.java:153)
        at org.codehaus.surefire.Surefire.run(Surefire.java:77)
        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:585)
        at
org.codehaus.surefire.SurefireBooter.run(SurefireBooter.java:104)
        at
org.apache.maven.test.SurefirePlugin.execute(SurefirePlugin.java:303)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:432)

        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:530)

        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:472)

        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:858)

        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:729)

        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:501)

        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:485)

        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:455)

        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303)

        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to