You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Marco Mistroni <mm...@gmail.com> on 2007/11/14 21:16:28 UTC
Maven/Hibernate error / anyone has find similar?
hi all,
i am trying to port an app from ant to maven , but it looks like i am
having troubles iwth dependencies.........
has anyone ever found the error below?
i attach my dependencies at the end of message, hope someone can sort me out....
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.39
sec <<< FAILURE!
testGetBSDRBondIdsReturnsBondIds(com.bnpparibas.risk.collateralrisk.dao.IssueDaoIntegrationTest)
Time elapsed: 0.359 sec <<< ERROR!
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'sessionFactory' defined in class path
resource [applicationContext.xml]: Invocation of init method failed;
nested exception is java.lang.NoClassDefFoundError
Caused by: java.lang.NoClassDefFoundError
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:107)
at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56)
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:269)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:425)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1291)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:807)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:740)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:131)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1062)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1029)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:420)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:141)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:348)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:92)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:77)
at org.springframework.test.AbstractSpringContextTests.loadContextLocations(AbstractSpringContextTests.java:121)
at org.springframework.test.AbstractDependencyInjectionSpringContextTests.loadContextLocations(AbstractDependencyInjectionSpringContextTests.java:210)
at org.springframework.test.AbstractSpringContextTests.getContext(AbstractSpringContextTests.java:101)
at org.springframework.test.AbstractDependencyInjectionSpringContextTests.setUp(AbstractDependencyInjectionSpringContextTests.java:178)
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.GeneratedMethodAccessor15.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
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.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
---- and here's my dependencies ----------
<dependencies>
−
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
−
<dependency>
<groupId>sybase</groupId>
<artifactId>jconn3</artifactId>
<version>1.0</version>
</dependency>
−
<dependency>
<groupId>dbunit</groupId>
<artifactId>dbunit</artifactId>
<version>2.2</version>
</dependency>
−
<dependency>
<groupId>asm</groupId>
<artifactId>asm-all</artifactId>
<version>3.0</version>
</dependency>
−
<dependency>
<groupId>opensymphony</groupId>
<artifactId>webwork</artifactId>
<version>2.2.5</version>
</dependency>
−
<dependency>
<groupId>freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.9</version>
</dependency>
−
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>2.0</version>
</dependency>
−
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
<version>1.2.3</version>
</dependency>
−
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.3</version>
</dependency>
−
<dependency>
<groupId>poi</groupId>
<artifactId>poi</artifactId>
<version>3.0.1-FINAL</version>
</dependency>
−
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.3</version>
</dependency>
−
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2</version>
</dependency>
−
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6</version>
</dependency>
−
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.6</version>
</dependency>
−
<dependency>
<groupId>geronimo-spec</groupId>
<artifactId>geronimo-spec-j2ee</artifactId>
<version>1.4-rc4</version>
</dependency>
−
<dependency>
<groupId>axis</groupId>
<artifactId>axis</artifactId>
<version>1.4</version>
</dependency>
−
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4</version>
</dependency>
−
<dependency>
<groupId>lucene</groupId>
<artifactId>lucene</artifactId>
<version>1.4.3</version>
</dependency>
−
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
<scope>provided</scope>
</dependency>
−
<dependency>
<groupId>jmock</groupId>
<artifactId>jmock-cglib</artifactId>
<version>1.0.1</version>
<scope>test</scope>
−
<exclusions>
−
<exclusion>
<groupId>cglib</groupId>
<artifactId>cglib-full</artifactId>
</exclusion>
</exclusions>
</dependency>
−
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2</version>
</dependency>
−
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>2.1.3</version>
</dependency>
−
<dependency>
<groupId>jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>1.3.2</version>
<scope>system</scope>
−
<systemPath>
c:/TrunkMaven/client-web/lib/deploy/jasperreports-1.3.2.jar
</systemPath>
</dependency>
−
<dependency>
<groupId>springframework</groupId>
<artifactId>spring-mock</artifactId>
<version>1.2.6</version>
</dependency>
−
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
<version>1.0.1B</version>
</dependency>
−
<dependency>
<groupId>jmock</groupId>
<artifactId>jmock-cglib</artifactId>
<version>1.0.1</version>
<scope>test</scope>
−
<exclusions>
−
<exclusion>
<groupId>cglib</groupId>
<artifactId>cglib-full</artifactId>
</exclusion>
</exclusions>
</dependency>
−
<dependency>
<groupId>ibm</groupId>
<artifactId>mq</artifactId>
<version>5.3-connector</version>
</dependency>
−
<dependency>
<groupId>ibm</groupId>
<artifactId>ibm-mq</artifactId>
<version>1.0</version>
</dependency>
−
<dependency>
<groupId>ibm</groupId>
<artifactId>ibm-mqjms</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
----------------------------------------------------
thanks and regards
marco
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Maven/Hibernate error / anyone has find similar?
Posted by Steve Ebersole <st...@hibernate.org>.
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2222 perchance?
On Thursday 15 November 2007 02:30:56 pm Marco Mistroni wrote:
> Hello,
> mm not really :)
> found out that i had a clash between followign dependencies
> - hibernate 3.2.x
> - asm-all
> -cglib
> - spring ?
>
> i am trying to move my project from ant to maven, and we are using
> hibernate spring, cglib and asm libraries
>
> when i downloaded them from web, i got error,
> when instead i pointed to version installed on my local machine (teh
> one i m using with ant) everythign worked fine....
> i'll need toinvestigate more as this may cause us problems if we
> update any versions of spring or hibernate
>
> i'll report back here my findings once i proceed with my investigation
>
> regards
> marco
>
> On Nov 14, 2007 9:04 PM, Wayne Fay <wa...@gmail.com> wrote:
> > Take a look at your applicationContext.xml file, apparently you have
> > an issue with how you've defined your sessionFactory bean (??).
> >
> > org.springframework.beans.factory.BeanCreationException: Error
> > creating bean with name 'sessionFactory' defined in class path
> > resource [applicationContext.xml]: Invocation of init method failed;
> > nested exception is java.lang.NoClassDefFoundError
> > Caused by: java.lang.NoClassDefFoundError
> > at
> > org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIB
> >LazyInitializer.java:107)
> >
> > Wayne
> >
> > On 11/14/07, Marco Mistroni <mm...@gmail.com> wrote:
> > > hi all,
> > > i am trying to port an app from ant to maven , but it looks like i am
> > > having troubles iwth dependencies.........
> > > has anyone ever found the error below?
> > > i attach my dependencies at the end of message, hope someone can sort
> > > me out....
> > >
> > >
> > >
> > > Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.39
> > > sec <<< FAILURE!
> > > testGetBSDRBondIdsReturnsBondIds(com.bnpparibas.risk.collateralrisk.dao
> > >.IssueDaoIntegrationTest) Time elapsed: 0.359 sec <<< ERROR!
> > > org.springframework.beans.factory.BeanCreationException: Error
> > > creating bean with name 'sessionFactory' defined in class path
> > > resource [applicationContext.xml]: Invocation of init method failed;
> > > nested exception is java.lang.NoClassDefFoundError
> > > Caused by: java.lang.NoClassDefFoundError
> > > at
> > > org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGL
> > >IBLazyInitializer.java:107) at
> > > org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBP
> > >roxyFactory.java:43)
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
--
Steve Ebersole
Hibernate Project Lead
http://hibernate.org
Principal Software Engineer
http://redhat.com
http://jboss.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Maven/Hibernate error / anyone has find similar?
Posted by Marco Mistroni <mm...@gmail.com>.
Hello,
mm not really :)
found out that i had a clash between followign dependencies
- hibernate 3.2.x
- asm-all
-cglib
- spring ?
i am trying to move my project from ant to maven, and we are using
hibernate spring, cglib and asm libraries
when i downloaded them from web, i got error,
when instead i pointed to version installed on my local machine (teh
one i m using with ant) everythign worked fine....
i'll need toinvestigate more as this may cause us problems if we
update any versions of spring or hibernate
i'll report back here my findings once i proceed with my investigation
regards
marco
On Nov 14, 2007 9:04 PM, Wayne Fay <wa...@gmail.com> wrote:
> Take a look at your applicationContext.xml file, apparently you have
> an issue with how you've defined your sessionFactory bean (??).
>
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'sessionFactory' defined in class path
> resource [applicationContext.xml]: Invocation of init method failed;
> nested exception is java.lang.NoClassDefFoundError
> Caused by: java.lang.NoClassDefFoundError
> at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:107)
>
> Wayne
>
> On 11/14/07, Marco Mistroni <mm...@gmail.com> wrote:
> > hi all,
> > i am trying to port an app from ant to maven , but it looks like i am
> > having troubles iwth dependencies.........
> > has anyone ever found the error below?
> > i attach my dependencies at the end of message, hope someone can sort me out....
> >
> >
> >
> > Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.39
> > sec <<< FAILURE!
> > testGetBSDRBondIdsReturnsBondIds(com.bnpparibas.risk.collateralrisk.dao.IssueDaoIntegrationTest)
> > Time elapsed: 0.359 sec <<< ERROR!
> > org.springframework.beans.factory.BeanCreationException: Error
> > creating bean with name 'sessionFactory' defined in class path
> > resource [applicationContext.xml]: Invocation of init method failed;
> > nested exception is java.lang.NoClassDefFoundError
> > Caused by: java.lang.NoClassDefFoundError
> > at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:107)
> > at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Maven/Hibernate error / anyone has find similar?
Posted by Wayne Fay <wa...@gmail.com>.
Take a look at your applicationContext.xml file, apparently you have
an issue with how you've defined your sessionFactory bean (??).
org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'sessionFactory' defined in class path
resource [applicationContext.xml]: Invocation of init method failed;
nested exception is java.lang.NoClassDefFoundError
Caused by: java.lang.NoClassDefFoundError
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:107)
Wayne
On 11/14/07, Marco Mistroni <mm...@gmail.com> wrote:
> hi all,
> i am trying to port an app from ant to maven , but it looks like i am
> having troubles iwth dependencies.........
> has anyone ever found the error below?
> i attach my dependencies at the end of message, hope someone can sort me out....
>
>
>
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.39
> sec <<< FAILURE!
> testGetBSDRBondIdsReturnsBondIds(com.bnpparibas.risk.collateralrisk.dao.IssueDaoIntegrationTest)
> Time elapsed: 0.359 sec <<< ERROR!
> org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'sessionFactory' defined in class path
> resource [applicationContext.xml]: Invocation of init method failed;
> nested exception is java.lang.NoClassDefFoundError
> Caused by: java.lang.NoClassDefFoundError
> at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:107)
> at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org