Results 1 to 4 of 4

Thread: Declarative AOP TransactionProxyFactoryBean Error in 1.1

Hybrid View

  1. #1
    sruby Guest

    Default 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. #2
    Join Date
    Aug 2004
    Location
    Southampton, UK
    Posts
    826

    Default

    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

  3. #3
    sruby Guest

    Default

    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

  4. #4
    Join Date
    Aug 2004
    Location
    Southampton, UK
    Posts
    826

    Default

    no problem

    rob

Similar Threads

  1. Replies: 4
    Last Post: Jun 27th, 2005, 11:32 AM
  2. Replies: 4
    Last Post: Jan 25th, 2005, 02:46 PM
  3. Replies: 3
    Last Post: Dec 22nd, 2004, 02:30 PM
  4. Replies: 10
    Last Post: Nov 2nd, 2004, 09:38 AM
  5. Declarative Transaction while using JOTM
    By schiremath in forum Data
    Replies: 1
    Last Post: Aug 22nd, 2004, 05:26 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •