<bean id="myAudience" class="aop2.MyAudience"></bean>
<bean id="myRaceItem" class="aop2.MyRaceItem"></bean>
<bean id="myAuthlete" class="aop2.MyAuthlete">
<property name="myItem" ref="myRaceItem"></property>
<property name="myAudience" ref="myAudience"></property>
</bean>
<aop:config>
<aop:aspect ref="myAuthlete">
<aop:pointcut id="p"
expression="execution(* aop2.*.doit(..))" />
<aop:before method="beginPlay" pointcut-ref="p" />
<aop:after-returning method="applaud"
pointcut="execution(* aop2.*.doit(..))" />
</aop:aspect>
</aop:config>======================================================================
log4j:WARN No appenders could be found for logger (org.springframework.context.support.ClassPathXmlApplicationContext).
log4j:WARN Please initialize the log4j system properly.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myAudience' defined in class path resource [myApplicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.aspectj.AspectJPointcutAdvisor': Cannot create inner bean '(inner bean)' of type [org.springframework.aop.aspectj.AspectJMethodBeforeAdvice] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot create inner bean '(inner bean)' of type [org.springframework.aop.config.MethodLocatingFactoryBean] while setting constructor argument with index 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Unable to locate method [beginPlay] on bean [myAuthlete]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.aspectj.AspectJPointcutAdvisor': Cannot create inner bean '(inner bean)' of type [org.springframework.aop.aspectj.AspectJMethodBeforeAdvice] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot create inner bean '(inner bean)' of type [org.springframework.aop.config.MethodLocatingFactoryBean] while setting constructor argument with index 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Unable to locate method [beginPlay] on bean [myAuthlete]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot create inner bean '(inner bean)' of type [org.springframework.aop.config.MethodLocatingFactoryBean] while setting constructor argument with index 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Unable to locate method [beginPlay] on bean [myAuthlete]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Unable to locate method [beginPlay] on bean [myAuthlete]
Caused by: java.lang.IllegalArgumentException: Unable to locate method [beginPlay] on bean [myAuthlete]
<bean id="myRaceItem" class="aop2.MyRaceItem"></bean>
<bean id="myAuthlete" class="aop2.MyAuthlete">
<property name="myItem" ref="myRaceItem"></property>
<property name="myAudience" ref="myAudience"></property>
</bean>
<aop:config>
<aop:aspect ref="myAuthlete">
<aop:pointcut id="p"
expression="execution(* aop2.*.doit(..))" />
<aop:before method="beginPlay" pointcut-ref="p" />
<aop:after-returning method="applaud"
pointcut="execution(* aop2.*.doit(..))" />
</aop:aspect>
</aop:config>======================================================================
log4j:WARN No appenders could be found for logger (org.springframework.context.support.ClassPathXmlApplicationContext).
log4j:WARN Please initialize the log4j system properly.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myAudience' defined in class path resource [myApplicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.aspectj.AspectJPointcutAdvisor': Cannot create inner bean '(inner bean)' of type [org.springframework.aop.aspectj.AspectJMethodBeforeAdvice] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot create inner bean '(inner bean)' of type [org.springframework.aop.config.MethodLocatingFactoryBean] while setting constructor argument with index 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Unable to locate method [beginPlay] on bean [myAuthlete]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.aop.aspectj.AspectJPointcutAdvisor': Cannot create inner bean '(inner bean)' of type [org.springframework.aop.aspectj.AspectJMethodBeforeAdvice] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot create inner bean '(inner bean)' of type [org.springframework.aop.config.MethodLocatingFactoryBean] while setting constructor argument with index 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Unable to locate method [beginPlay] on bean [myAuthlete]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot create inner bean '(inner bean)' of type [org.springframework.aop.config.MethodLocatingFactoryBean] while setting constructor argument with index 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Unable to locate method [beginPlay] on bean [myAuthlete]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: Unable to locate method [beginPlay] on bean [myAuthlete]
Caused by: java.lang.IllegalArgumentException: Unable to locate method [beginPlay] on bean [myAuthlete]
解决方案 »
- 访问利用jax-ws endpoint发布的webservice端口,该webservice返回数据速度过于缓慢.
- struts2下页面等待效果
- struts Action 问题
- 为什么我重打了dwr 的jar包再换回去就不能用了?
- struts1.2文件上传问题
- 获取客户端mac地址
- Jprobe 配置问题
- 使用tomcat的连接池,连接数现在很多,好象连接池没有控制连接数,为什么!!!!!!!!!!
- 怎么处理呀?帮帮忙,在线等
- 在JAVA中从SYBASE读/写数据的中文乱码问题!!!!!!
- MessageDrivenBean和JMS有什么区别和联系?JMS和WebService有什么区别和联系?SessionBean的作用是什么?
- FP增长算法的小问题,请高手帮忙
=============================================
webservice 依赖的容器不一样。
JSP是基于tomcat。有容器支持。
tomcat的lib目录下有annotations-api.jar支持
所以容器启动的时候,spring手工注入进去。
这样就Ok了。