使用spring2.5@AspectJ进行AOP编程时遇到的配置问题

问题描述

想在原来的正常运行的SSH系统上通过Aspectj增加AOP功能,在原来的包基础上加上了Aspectj的相关包,但只要我在applictationContext.xml上配置了:<aop:aspectj-autoproxy></aop:aspectj-autoproxy>,tomcat启动正常,但只要访问提交数据就会出现下面的错误,google上也没有找到想类似的解决方面,请知道的朋友指点一下, 谢谢!applictationContext.xml 文件<?xml version="1.0" encoding="UTF-8"?><beans default-autowire="byName" default-lazy-init="true" xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:aop="http://www.springframework.org/schema/aop"xmlns:tx="http://www.springframework.org/schema/tx"xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"><!-- --> 注析掉下面一行就正常,当然AOP也没用了 <aop:aspectj-autoproxy></aop:aspectj-autoproxy> <!-- aopTest --><bean id="msgAspect" class="com.ewf.util.aop.MsgAspect" ></bean>包列表如下:antlr-2.7.6.jaraopalliance.jarasm.jarasm-util-2.2.3.jarasm-commons-2.2.3.jaraspectjrt.jaraspectjweaver.jarc3p0-0.9.1.2.jarcglib-nodep-2.1_3.jarcommon-dev.jarcommons-beanutils-1.8.0.jarcommons-collections-3.1.jarcommons-digester-2.0.jarcommons-fileupload-1.2.1.jarcommons-io-1.3.2.jarcommons-lang-2.3.jarcommons-logging-1.1.1.jardom4j-1.6.1.jarehcache-1.6.0-beta5.jarejb3-persistence-1.0.2GA.jarfreemarker-2.3.13.jarhibernate-annotations-3.4.0GA.jarhibernate-commons-annotations-3.1.0GA.jarhibernate-core-3.3.0SP1.jarhibernate-ehcache-3.3.0.SP1.jarhibernate-entitymanager-3.4.0GA.jarhibernate-validator.jarjavassist-3.4.jarjaxen-1.1-beta-7.jarjta.jarjtds-1.2.2.jarlog4j-1.2.15.jarmysql-connector-java-5.1.6-bin.jarognl-2.6.11.jarslf4j-api.jarslf4j-log4j12.jarspring-2.5.6.jarspring-security-core-2.0.4.jarstruts2-core-2.1.2.jarstruts2-spring-plugin-2.1.2.jarvelocity-1.5.jarvelocity-tools-1.4.jarvelocity-tools-view-1.4.jarxwork-2.1.1.jar错误提示如下:+++++++++++++2010-10-23 21:15:55,625 ERROR [com.ewf.util.ExceptionInterceptor] - java.lang.NullPointerExceptionat com.opensymphony.xwork2.validator.ValidationInterceptor.doBeforeInvocation(ValidationInterceptor.java:208)at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:246)at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:49)at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)at org.springframework.aop.interceptor.AbstractTraceInterceptor.invoke(AbstractTraceInterceptor.java:113)at org.springframework.aop.interceptor.DebugInterceptor.invoke(DebugInterceptor.java:61)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)at $Proxy12.intercept(Unknown Source)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:456)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:124)at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)at org.springframework.aop.interceptor.AbstractTraceInterceptor.invoke(AbstractTraceInterceptor.java:113)at org.springframework.aop.interceptor.DebugInterceptor.invoke(DebugInterceptor.java:61)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)at $Proxy12.intercept(Unknown Source)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:456)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:170)at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)at org.springframework.aop.interceptor.AbstractTraceInterceptor.invoke(AbstractTraceInterceptor.java:113)at org.springframework.aop.interceptor.DebugInterceptor.invoke(DebugInterceptor.java:61)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)at $Proxy12.intercept(Unknown Source)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:456)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:170)at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)at org.springframework.aop.interceptor.AbstractTraceInterceptor.invoke(AbstractTraceInterceptor.java:113)at org.springframework.aop.interceptor.DebugInterceptor.invoke(DebugInterceptor.java:61)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)at $Proxy12.intercept(Unknown Source)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:456)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:104)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)at org.springframework.aop.interceptor.AbstractTraceInterceptor.invoke(AbstractTraceInterceptor.java:113)at org.springframework.aop.interceptor.DebugInterceptor.invoke(DebugInterceptor.java:61)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)at $Proxy12.intercept(Unknown Source)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:456)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:84)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)at org.springframework.aop.interceptor.AbstractTraceInterceptor.invoke(AbstractTraceInterceptor.java:113)at org.springframework.aop.interceptor.DebugInterceptor.invoke(DebugInterceptor.java:61)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)at $Proxy12.intercept(Unknown Source)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:456)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:208)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)at org.springframework.aop.interceptor.AbstractTraceInterceptor.invoke(AbstractTraceInterceptor.java:113)at org.springframework.aop.interceptor.DebugInterceptor.invoke(DebugInterceptor.java:61)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)at $Proxy12.intercept(Unknown Source)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:456)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:88)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)at org.springframework.aop.interceptor.AbstractTraceInterceptor.invoke(AbstractTraceInterceptor.java:113)at org.springframework.aop.interceptor.DebugInterceptor.invoke(DebugInterceptor.java:61)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)at $Proxy12.intercept(Unknown Source)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:456)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:127)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)at org.springframework.aop.interceptor.AbstractTraceInterceptor.invoke(AbstractTraceInterceptor.java:113)at org.springframework.aop.interceptor.DebugInterceptor.invoke(DebugInterceptor.java:61)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)at $Proxy12.intercept(Unknown Source)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:456)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)at org.apache.struts2.interceptor.ProfilingActivationInterceptor.intercept(ProfilingActivationInterceptor.java:104)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)at org.springframework.aop.interceptor.AbstractTraceInterceptor.invoke(AbstractTraceInterceptor.java:113)at org.springframework.aop.interceptor.DebugInterceptor.invoke(DebugInterceptor.java:61)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)at $Proxy12.intercept(Unknown Source)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:456)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)at org.springframework.aop.interceptor.AbstractTraceInterceptor.invoke(AbstractTraceInterceptor.java:113)at org.springframework.aop.interceptor.DebugInterceptor.invoke(DebugInterceptor.java:61)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)at $Proxy12.intercept(Unknown Source)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:456)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:130)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)at org.springframework.aop.interceptor.AbstractTraceInterceptor.invoke(AbstractTraceInterceptor.java:113)at org.springframework.aop.interceptor.DebugInterceptor.invoke(DebugInterceptor.java:61)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)at $Proxy12.intercept(Unknown Source)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:456)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:143)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)at org.springframework.aop.interceptor.AbstractTraceInterceptor.invoke(AbstractTraceInterceptor.java:113)at org.springframework.aop.interceptor.DebugInterceptor.invoke(DebugInterceptor.java:61)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)at $Proxy12.intercept(Unknown Source)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:456)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:137)at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)at org.springframework.aop.interceptor.AbstractTraceInterceptor.invoke(AbstractTraceInterceptor.java:113)at org.springframework.aop.interceptor.DebugInterceptor.invoke(DebugInterceptor.java:61)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)at $Proxy12.intercept(Unknown Source)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:456)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)at org.springframework.aop.interceptor.AbstractTraceInterceptor.invoke(AbstractTraceInterceptor.java:113)at org.springframework.aop.interceptor.DebugInterceptor.invoke(DebugInterceptor.java:61)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)at $Proxy13.intercept(Unknown Source)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:456)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:130)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)at org.springframework.aop.interceptor.AbstractTraceInterceptor.invoke(AbstractTraceInterceptor.java:113)at org.springframework.aop.interceptor.DebugInterceptor.invoke(DebugInterceptor.java:61)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)at $Proxy12.intercept(Unknown Source)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:456)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)at org.springframework.aop.interceptor.AbstractTraceInterceptor.invoke(AbstractTraceInterceptor.java:113)at org.springframework.aop.interceptor.DebugInterceptor.invoke(DebugInterceptor.java:61)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)at $Proxy12.intercept(Unknown Source)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:456)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)at com.ewf.util.webwork.ExceptionInterceptor.intercept(ExceptionInterceptor.java:36)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)at java.lang.reflect.Method.invoke(Method.java:597)at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)at org.springframework.aop.interceptor.AbstractTraceInterceptor.invoke(AbstractTraceInterceptor.java:113)at org.springframework.aop.interceptor.DebugInterceptor.invoke(DebugInterceptor.java:61)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)at $Proxy12.intercept(Unknown Source)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:230)at com.opensymphony.xwork2.DefaultActionInvocation$1.doProfiling(DefaultActionInvocation.java:229)at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:456)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:227)at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:477)at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:467)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)at com.ewf.util.filter.LoginFilter.doFilterInternal(LoginFilter.java:29)at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)at java.lang.Thread.run(Thread.java:619)2010-10-23 21:15:55,750 ERROR [com.opensymphony.xwork2.DefaultActionInvocation] - There was an exception while instantiating the result of type org.apache.struts2.dispatcher.VelocityResultCaught OgnlException while setting property 'location' on type '$Proxy26'. - Class: ognl.ObjectPropertyAccessorFile: ObjectPropertyAccessor.javaMethod: setPropertyLine: 132 - ognl/ObjectPropertyAccessor.java:132:-1at com.opensymphony.xwork2.ognl.OgnlUtil.internalSetProperty(OgnlUtil.java:400)at com.opensymphony.xwork2.ognl.OgnlUtil.setProperties(OgnlUtil.java:87)at com.opensymphony.xwork2.ognl.OgnlReflectionProvider.setProperties(OgnlReflectionProvider.java:55)at com.opensymphony.xwork2.ObjectFactory.buildResult(ObjectFactory.java:215)at com.opensymphony.xwork2.DefaultActionInvocation.createResult(DefaultActionInvocation.java:201)at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:349)at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:259)at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:477)at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:467)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)at com.ewf.util.filter.LoginFilter.doFilterInternal(LoginFilter.java:29)at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)at java.lang.Thread.run(Thread.java:619)Caused by: ognl.NoSuchPropertyException: $Proxy26.locationat ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:132)at com.opensymphony.xwork2.ognl.accessor.ObjectAccessor.setProperty(ObjectAccessor.java:27)at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:1656)at ognl.ASTProperty.setValueBody(ASTProperty.java:101)at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:177)at ognl.SimpleNode.setValue(SimpleNode.java:246)at ognl.Ognl.setValue(Ognl.java:476)at com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:197)at com.opensymphony.xwork2.ognl.OgnlUtil.internalSetProperty(OgnlUtil.java:393)... 33 more 问题补充:7454103 写道

解决方案

引用Caused by: ognl.NoSuchPropertyException: $Proxy26.location 感觉像 jar 包版本不对!你确认下 Aspectj 相关的 jar 包! 要对应!
解决方案二:
引用你有没有在用的的包集合,给和一份列表,我按着整理出来一份试试是什么包出了问题!谢谢 给你发了!
解决方案三:
检查代码中的AOP注解是否写错了, 是否且连接点写错了? ognl找不到属性错误, 很有可能你配置配错了……

时间: 2024-12-04 16:08:56

使用spring2.5@AspectJ进行AOP编程时遇到的配置问题的相关文章

aspectjrt-求解:AOP编程时@Aspect注解运行期报错,已经一天了,还是没有头绪,希望大神解答一下。

问题描述 求解:AOP编程时@Aspect注解运行期报错,已经一天了,还是没有头绪,希望大神解答一下. 在做Spring的AOP时,运行tomcat出现了这些异常,当我去掉@Aspect注解的时候,这些异常就没有了,我尝试替换过aspectjrt1.6.jar和aspectjweaver1.6.jar,可还是不行,我的JDK是1.7的.请问这是什么情况造成的呢?肯定是@Aspect,不过还是不太清楚具体是什么?希望大神解答一下,高分. 解决方案 有个bean创建失败了,看看不是哪里的注解冲突或遗

Java的Spring框架下的AOP编程模式示例_java

Spring框架的关键组件是面向方面编程(AOP)框架.面向方面的编程不仅打破程序逻辑分成不同的部分称为所谓的担忧.跨越多个点的应用程序的功能被称为横切关注点和这些横切关注点是从应用程序的业务逻辑概念上区分开来.还有像日志记录,审计,声明性事务,安全性和高速缓存等方面的各种常见的好例子 模块化的OOP中的关键单元是类,而在AOP中模块化的单元则是切面.依赖注入可以帮助你从对方解耦应用程序对象和AOP可以帮助你从他们影响的对象分离横切关注点. AOP是一样的编程语言如Perl,.NET,Java和

在php串口通信编程时,出现win_serial is not compiled into PHP

问题描述 在php串口通信编程时,出现win_serial is not compiled into PHP 最近想试试php的串口通信,我装的是phpstudy2014,我看了一下apache2.4和php5xx等系列都装在里面,于是下了个对应php版本的php_ser++.dll,并且放在了ext中,并在php.ini中添加了extension=php_ser++.dll,但用php designer8.0调试时,却出现了win_serial不能被编译成PHP,事关紧急,忘大神指导?????

AOP编程入门--Java篇

编程 Aspect Oriented Programming(AOP),面向切面编程,是一个比较热门的话题.AOP主要实现的目的是针对业务处理过程中的切面进行提取,它所面对的是处理过程中的某个步骤或阶段,以获得逻辑过程中各部分之间低耦合性的隔离效果.比如我们最常见的就是日志记录了,举个例子,我们现在提供一个服务查询学生信息的,但是我们希望记录有谁进行了这个查询.如果按照传统的OOP的实现的话,那我们实现了一个查询学生信息的服务接口(StudentInfoService)和其实现类(Student

JavaScript面对国际化编程时的一些建议

  这篇文章主要介绍了JavaScript面对国际化编程时的一些建议,包括时区与语言编码等一些值得注意的问题,需要的朋友可以参考下 什么是国际化? 国际化(Internationalization的缩写是i18n--i,中间18个字符,n)是将软件处理的能让来自各种地方使用各种语言的用户更简单使用的一个过程.假定某个用户来自某个地方说某种语言,他可能不经意间就得到一些错误提示.尤其是你甚至都没有做这种假设. ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

JavaScript AOP编程实例

       本文实例讲述了JavaScript AOP编程.分享给大家供大家参考.具体如下: ? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70

使用rpclib进行Python网络编程时的注释问题

       这篇文章主要介绍了使用rpclib进行Python网络编程时的注释问题,作者讲到了自己在编写服务器时要用unicode注释等需要注意的地方,需要的朋友可以参考下            rpclib 是一个非常好用的 python webservice 库,可以动态的生成 wsdl, 不过这个项目已经基本停止,并被一个新的项目取代 spyne,由于旧的项目 工作已经比较稳定,所以我没有贸然升级到 spyne.         我在 rpclib 编写 service 方法时,遇到一个

matlab多线程编程时怎么给进程上锁?

问题描述 matlab多线程编程时怎么给进程上锁? 求问各位大神,matlab多线程编程时怎么给进程上锁?为了避免线程同步的问题,跪谢! 解决方案 可以使用互斥量或者信号量,具体查查手册. 解决方案二: 并行工具箱里有函数,也可以用C写一个扩展,用互斥量 解决方案三: 现在matlab对多线程,多进程,多核互斥支持都不够好, 所以你可以利用程序创建多进程来调用matlab,实现多进程,互斥也可以由进程来控制,灵活性更高

数据包-在win7中使用socket UDP 编程时,数据发送不出来

问题描述 在win7中使用socket UDP 编程时,数据发送不出来 各位大哥大姐,我在使用 socket 做 UDP编程时,遇到一个非常奇怪的问题 1,在win7下使用 sendto 函数发送数据时,sendto函数的返回值正常,但是有时候没有数据发送出来(抓不到数据包),但是当拔掉网线,重插一下就有数据了,但是待会儿就又没有了(这个不是网线接触不好,因为电脑上网一直正常) 2,同样程序,在XP系统里没有问题 求高手指点,感激不尽!!!!!