« Return to Thread: Bean Creation Error

Re: Bean Creation Error

by exelian :: Rate this Message:

Reply to Author | View in Thread

Im having the exact same problem as you and cannot find how to solve it/what causes it. Anyone out there that can help?

Arif Mohd wrote:
Hi,

  Iam trying to execute junit test case(JCAContainerTest) distributed along with source code When iam executing this test case iam getting the following exception

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jencks' defined in class path resource [org/jencks/spring.xml]: Cannot resolve reference to bean 'transactionManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': FactoryBean threw exception on object creation; nested exception is java.lang.NoSuchMethodError: org.apache.geronimo.transaction.manager.GeronimoTransactionManager.<init>(ILorg/apache/geronimo/transaction/manager/XidFactory;Lorg/apache/geronimo/transaction/manager/TransactionLog;Ljava/util/Collection;)V
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': FactoryBean threw exception on object creation; nested exception is java.lang.NoSuchMethodError: org.apache.geronimo.transaction.manager.GeronimoTransactionManager.<init>(ILorg/apache/geronimo/transaction/manager/XidFactory;Lorg/apache/geronimo/transaction/manager/TransactionLog;Ljava/util/Collection;)V
Caused by: java.lang.NoSuchMethodError: org.apache.geronimo.transaction.manager.GeronimoTransactionManager.<init>(ILorg/apache/geronimo/transaction/manager/XidFactory;Lorg/apache/geronimo/transaction/manager/TransactionLog;Ljava/util/Collection;)V
        at org.jencks.GeronimoPlatformTransactionManager.<init>(GeronimoPlatformTransactionManager.java:72)
        at org.jencks.factory.TransactionManagerFactoryBean.getObject(TransactionManagerFactoryBean.java:55)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectFromFactoryBean(AbstractBeanFactory.java:994)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:960)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:246)
        at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:128)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:955)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:729)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:416)
        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:290)
        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.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:68)
        at org.jencks.SpringTestSupport.createApplicationContext(SpringTestSupport.java:29)
        at org.jencks.SpringTestSupport.setUp(SpringTestSupport.java:18)
        at org.jencks.JCAContainerTestSupport.setUp(JCAContainerTestSupport.java:37)
        at junit.framework.TestCase.runBare(TestCase.java:132)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:124)
        at junit.framework.TestSuite.runTest(TestSuite.java:232)
        at junit.framework.TestSuite.run(TestSuite.java:227)
        at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
        at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

 « Return to Thread: Bean Creation Error