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>
<!-- 事务管理 --> 展开
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>
<!-- 事务管理 --> 展开
1个回答
浙江启扬智能科技有限公司
2023-06-12 广告
2023-06-12 广告
Linux 嵌入式系统中,USB 启动模式能够烧写 ARM 的 uboot 的原因主要有以下几个方面:1. USB 启动模式相对于传统的 BIOS 启动模式来说,具有更高的兼容性和灵活性,可以支持更多的硬件设备和操作系统。2. USB 启动...
点击进入详情页
本回答由浙江启扬智能科技有限公司提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询