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>


Reply With Quote