spring出ClassCastException异常
java.lang.ClassCastException: $Proxy5
at com.viven.test.action.testAaction.TestAaction.execute(TestAaction.java:21)
那个testAaction的第21行是
public String execute() throws Exception {
testManager = (TestManagerImpl) ContextManage.getApplicationContext()
.getBean("testManagerx");
配置的BEAN ID
<bean id="testManagerx" parent="txProxyTemplate">
<property name="target">
<bean class="com.viven.test.service.jdbc.impl.JDBCManagerImpl">
<property name="testDAO2">
<ref bean="testDAO2" />
</property>
</bean>
</property>
</bean>
事务的配置:
<bean id="txProxyTemplate" abstract="true"
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
<property name="transactionManager">
<ref bean="transactionManager" />
</property>
<property name="transactionAttributes">
<props>
<prop key="save*">PROPAGATION_REQUIRED</prop>
<prop key="update*">PROPAGATION_REQUIRED</prop>
<prop key="delete*">PROPAGATION_REQUIRED</prop>
<prop key="find*">PROPAGATION_REQUIRED</prop>
<prop key="query*">PROPAGATION_REQUIRED</prop>
<prop key="get*">PROPAGATION_REQUIRED</prop>
<prop key="merge*">PROPAGATION_REQUIRED</prop>
<prop key="batch*">PROPAGATION_REQUIRED</prop>
<prop key="*">PROPAGATION_REQUIRED,readOnly</prop>
</props>
</property>
</bean>
请各位看看是什么错