spring2.0+ibatis2.3+struts2.0 事物配置的时候报错了,应用是部署在weblogic.

org.apache.struts2.dispatcher.ServletActionRedirectResultjava.lang.ClassCastException... org.apache.struts2.dispatcher.ServletActionRedirectResult
java.lang.ClassCastException: $Proxy17 incompatible with java.lang.annotation.Annotation
at com.ibm.oti.reflect.AnnotationHelper.getAnnotation(AnnotationHelper.java:34)
at com.ibm.oti.reflect.AnnotationHelper.getDeclaredAnnotations(AnnotationHelper.java:50)
at com.ibm.oti.reflect.Method.getDeclaredAnnotations(Method.java:31)
at java.lang.reflect.Method.getDeclaredAnnotations(Method.java:704)
at java.lang.reflect.AccessibleObject.getAnnotations(AccessibleObject.java:191)
at org.aspectj.internal.lang.reflect.AjTypeImpl.isReallyAMethod(AjTypeImpl.java:359)
at org.aspectj.internal.lang.reflect.AjTypeImpl.getDeclaredMethods(AjTypeImpl.java:336)
at org.aspectj.weaver.reflect.Java15ReflectionBasedReferenceTypeDelegate.getDeclaredMethods(Java15ReflectionBasedReferenceTypeDelegate.java:177)
at org.aspectj.weaver.ReferenceType.getDeclaredMethods(ReferenceType.java:521)
at org.aspectj.weaver.ResolvedType.addAndRecurse(ResolvedType.java:270)
at org.aspectj.weaver.ResolvedType.getMethodsWithoutIterator(ResolvedType.java:265)
at org.aspectj.weaver.ResolvedType.lookupResolvedMember(ResolvedType.java:388)
at org.aspectj.weaver.JoinPointSignatureIterator.findSignaturesFromSupertypes(JoinPointSignatureIterator.java:178)
at org.aspectj.weaver.JoinPointSignatureIterator.hasNext(JoinPointSignatureIterator.java:69)
at org.aspectj.weaver.patterns.SignaturePattern.matches(SignaturePattern.java:303)
at org.aspectj.weaver.patterns.KindedPointcut.matchInternal(KindedPointcut.java:106)
at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:146)
at org.aspectj.weaver.internal.tools.PointcutExpressionImpl.getShadowMatch(PointcutExpressionImpl.java:235)
at org.aspectj.weaver.internal.tools.PointcutExpressionImpl.matchesExecution(PointcutExpressionImpl.java:101)
at org.aspectj.weaver.internal.tools.PointcutExpressionImpl.matchesMethodExecution(PointcutExpressionImpl.java:92)
at org.springframework.aop.aspectj.AspectJExpressionPointcut.getShadowMatch(AspectJExpressionPointcut.java:345)
at org.springframework.aop.aspectj.AspectJExpressionPointcut.matches(AspectJExpressionPointcut.java:231)
at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:195)
at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:236)
at org.springframework.aop.support.AopUtils.findAdvisorsThatCanApply(AopUtils.java:270)
at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:83)
at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:66)
at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:296)
应用是在 websphere 6.1上部署的
下面是applicationContext.xml的配置:
<!-- 事务管理 -->
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean>
<aop:config config proxy-target-class="true" >
<aop:pointcut id="transactionPointcut"
expression="execution(* com.resoft.web.t*.action.*.*(..))" />
<aop:advisor advice-ref="txAdvice"
pointcut-ref="transactionPointcut" />
</aop:config>

<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="get*" read-only="true"/>
<tx:method name="*"/>
</tx:attributes>
</tx:advice>
<!-- 事务管理 -->
展开
 我来答
OfreeK
2011-03-26 · TA获得超过151个赞
知道答主
回答量:23
采纳率:0%
帮助的人:28.7万
展开全部
<aop:config config proxy-target-class="true" >
应该是这一句配置的有问题,多了个config吧,改成<aop:config proxy-target-class="true" >
浙江启扬智能科技有限公司
2023-06-12 广告
Linux 嵌入式系统中,USB 启动模式能够烧写 ARM 的 uboot 的原因主要有以下几个方面:1. USB 启动模式相对于传统的 BIOS 启动模式来说,具有更高的兼容性和灵活性,可以支持更多的硬件设备和操作系统。2. USB 启动... 点击进入详情页
本回答由浙江启扬智能科技有限公司提供
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式