Announcement Announcement Module
Collapse
No announcement yet.
Declarative AOP TransactionProxyFactoryBean Error in 1.1 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Declarative AOP TransactionProxyFactoryBean Error in 1.1

    I have the follwing code in my ApplicationContext-Hibernate.xml file: It works in Spring 1.02 but gives an initialization error in version 1.1.


    SEVERE: Context initialization failed
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean wit
    h name 'policyManager' defined in resource [/WEB-INF/applicationContext-hibernat
    e.xml] of ServletContext: Initialization of bean failed; nested exception is jav
    a.lang.NoClassDefFoundError: net/sf/cglib/transform/impl/UndeclaredThrowableStra
    tegy
    java.lang.NoClassDefFoundError: net/sf/cglib/transform/impl/UndeclaredThrowableS
    trategy
    at org.springframework.aop.framework.Cglib2AopProxy.g etProxy(Cglib2AopPr
    oxy.java:155)
    at org.springframework.aop.framework.Cglib2AopProxy.g etProxy(Cglib2AopPr
    oxy.java:136)
    at org.springframework.aop.framework.ProxyFactory.get Proxy(ProxyFactory.
    java:66)
    at org.springframework.transaction.interceptor.Transa ctionProxyFactoryBe
    an.afterPropertiesSet(TransactionProxyFactoryBean. java:236)

    XML file snippet:
    <bean id="baseTxProxy" lazy-init="true"
    class="org.springframework.transaction.interceptor .TransactionProxyFactoryBean">
    <property name="transactionManager"><ref bean="transactionManager"/></property>
    <property name="transactionAttributes">
    <props>
    <prop key="*">PROPAGATION_REQUIRED</prop>
    </props>
    </property>
    </bean>


    <bean id="policyManager" parent="baseTxProxy">
    <property name="target">
    <bean class="com.hwa.domain.PolicyManager">
    <property name="policyDao">
    <ref local="policyDao"/>
    </property>
    <property name="policyPackageDao">
    <ref local="policyPackageDao"/>
    </property>
    <property name="claimDao">
    <ref local="claimDao"/>
    </property>
    <property name="resolutionDao">
    <ref local="resolutionDao"/>
    </property>
    <property name="stateDao">
    <ref local="stateDao"/>
    </property>
    <property name="paymentPlanDao">
    <ref local="paymentPlanDao"/>
    </property>
    </bean>
    </property>
    <property name="transactionAttributes">
    <props>
    <prop key="addPolicy">PROPAGATION_REQUIRED</prop>
    </props>
    </property>
    </bean>

  • #2
    Do you have the latest version of Cglib and ASM in your classpath?

    These are in the full distribution under lib/cglib/cglib-full-2.0.2.jar. The jar contains both Cglib and ASM.

    Rob

    Comment


    • #3
      I replaced the cglib2.jar with cglib-full-2.0.2.jar from the full distribution and that works!

      Thanks for the quick reply.

      Scott

      Comment


      • #4
        no problem

        rob

        Comment

        Working...
        X