Organizational Research By

Surprising Reserch Topic

spring transaction manager annotation style runtime error

spring transaction manager annotation style runtime error  using -'java,spring,exception,transactions'

So essentially I am getting a exception when I load up my war in my glassfish application server. I am using Spring's transaction manager with my mysql database. The error reported (full stack trace) is as follows:

java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0': Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotationUtils.getAnnotation(Ljava/lang/reflect/AnnotatedElement;Ljava/lang/Class;)Ljava/lang/annotation/Annotation;

My applicationContext.xml file is as follows:

<beans xmlns="" xmlns:xsi=""

    <context:property-placeholder location=""/>

    <!-- enable the configuration of transactional behavior based on annotations -->
    <tx:annotation-driven transaction-manager="txManager"/>

      <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
        <property name="driverClassName" value="${jdbc.driverClassName}" />
        <property name="url" value="${jdbc.url}" />
        <property name="username" value="${jdbc.username}" />
        <property name="passwprd" value="${jdbc.password}" />

      <bean name="licenseGenService" class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
        <property name="service" ref="LicensingDaoImpl"/>
        <property name="serviceInterface" value="mypackage.LicensingDao"/>

      <bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
        <property name ="dataSource" ref="dataSource" />

      <bean id="licenseDAO" class = "myPackage.LicenseDao">
        <constructor-arg ref="dataSource" />

      <bean id="licenseGenerator" class ="myPackage.LicenseGeneratorImpl">
        <constructor-arg ref = "licenseDAO" />


I find this error to be pretty cryptic because the class it is whining about is not even in my application Context. I am using Spring 3.1 by the way. Thanks for any suggestions or help.

asked Oct 7, 2015 by rajeevr642
0 votes
1 view

Related Hot Questions

1 Answer

0 votes

Apparently your application is using older version of spring-core*.jar. Make sure all Spring JARs are in 3.1.x version and you have no duplicates.

spring-core*.jar contains the AnnotationUtils.getAnnotation() method introduced in 3.1.

answered Oct 7, 2015 by tejas lakhani