- 浏览: 2551628 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
Trouble Shooting(1)AOP Configuration
Today, once I configured AOP around to my spring project. It gives me this kind of error message.
Error Message:
java.lang.IllegalArgumentException: error at ::0 formal unbound in pointcut
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:254)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)
Solution:
Mostly, this is because of the parameters error. I put 3 parameters in my around method. But I only got 2 in the configuration file. That is the root cause. After I changed my configuration, my files are as follow:
<aop:aspect ref="advisor_catalogControllerImpl_search">
<aop:pointcut id="catalogControllerImpl_search" expression="execution(* com.sillycat.graphite.web.controller.impl.CatalogControllerImpl.search(..)) and args(request,response,..)"/>
<aop:before pointcut-ref="catalogControllerImpl_search" method="adviceBefore"/>
<aop:around pointcut-ref="catalogControllerImpl_search" method="adviceAround"/>
<aop:after-returning pointcut-ref="catalogControllerImpl_search" returning="modelAndView" method="adviceAfterReturning"/>
</aop:aspect>
<bean id="advisor_catalogControllerImpl_search" class="com.sillycat.graphite.web.customization.CustomCabelasCatalogController_search"/>
public class CustomCabelasCatalogController_search extends
ControllerAdvisorBase {
…snip…
}
public class ControllerAdvisorBase {
public void runBefore(HttpServletRequest request, HttpServletResponse response) {
// Need to be customized by store
}
public void runAfterReturning(HttpServletRequest request, HttpServletResponse response, ModelAndView modelAndView) {
// Need to be customized by store
}
public Object runAround(ProceedingJoinPoint joinPoint, HttpServletRequest request, HttpServletResponse response) throws Throwable {
// Need to be customized by store
return joinPoint.proceed();
}
public final void adviceBefore(JoinPoint jp, HttpServletRequest request, HttpServletResponse response) {
log("Entering", jp, null);
runBefore(request, response);
}
public final void adviceAfterReturning(JoinPoint jp, HttpServletRequest request, HttpServletResponse response, ModelAndView modelAndView) {
log("Exiting", jp, modelAndView);
runAfterReturning(request, response, modelAndView);
}
public final Object adviceAround(ProceedingJoinPoint jp, HttpServletRequest request, HttpServletResponse response) throws Throwable {
log("Around", jp, null);
return runAround(jp, request, response);
}
private void log(String prefix, JoinPoint jp, ModelAndView modelAndView) {
StringBuilder sb = new StringBuilder();
sb.append(prefix).append(" ").append(jp.toString());
if (logger.isDebugEnabled()) {
Object[] args = jp.getArgs();
if (args != null && args.length != 0) {
sb.append(" with ").append(args.length).append(" args.\n");
for (int i = 0; i < args.length; ++i)
sb.append("args[").append(i).append("]: ").append(args[i]).append("\n");
}
if (modelAndView != null)
sb.append("Returned ").append(modelAndView);
logger.debug(sb.toString());
} else
logger.info(sb.toString());
}
...snip...
}
references:
http://forum.springsource.org/showthread.php?62460-Formal-unbound-in-pointcut
Today, once I configured AOP around to my spring project. It gives me this kind of error message.
Error Message:
java.lang.IllegalArgumentException: error at ::0 formal unbound in pointcut
at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:254)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)
Solution:
Mostly, this is because of the parameters error. I put 3 parameters in my around method. But I only got 2 in the configuration file. That is the root cause. After I changed my configuration, my files are as follow:
<aop:aspect ref="advisor_catalogControllerImpl_search">
<aop:pointcut id="catalogControllerImpl_search" expression="execution(* com.sillycat.graphite.web.controller.impl.CatalogControllerImpl.search(..)) and args(request,response,..)"/>
<aop:before pointcut-ref="catalogControllerImpl_search" method="adviceBefore"/>
<aop:around pointcut-ref="catalogControllerImpl_search" method="adviceAround"/>
<aop:after-returning pointcut-ref="catalogControllerImpl_search" returning="modelAndView" method="adviceAfterReturning"/>
</aop:aspect>
<bean id="advisor_catalogControllerImpl_search" class="com.sillycat.graphite.web.customization.CustomCabelasCatalogController_search"/>
public class CustomCabelasCatalogController_search extends
ControllerAdvisorBase {
…snip…
}
public class ControllerAdvisorBase {
public void runBefore(HttpServletRequest request, HttpServletResponse response) {
// Need to be customized by store
}
public void runAfterReturning(HttpServletRequest request, HttpServletResponse response, ModelAndView modelAndView) {
// Need to be customized by store
}
public Object runAround(ProceedingJoinPoint joinPoint, HttpServletRequest request, HttpServletResponse response) throws Throwable {
// Need to be customized by store
return joinPoint.proceed();
}
public final void adviceBefore(JoinPoint jp, HttpServletRequest request, HttpServletResponse response) {
log("Entering", jp, null);
runBefore(request, response);
}
public final void adviceAfterReturning(JoinPoint jp, HttpServletRequest request, HttpServletResponse response, ModelAndView modelAndView) {
log("Exiting", jp, modelAndView);
runAfterReturning(request, response, modelAndView);
}
public final Object adviceAround(ProceedingJoinPoint jp, HttpServletRequest request, HttpServletResponse response) throws Throwable {
log("Around", jp, null);
return runAround(jp, request, response);
}
private void log(String prefix, JoinPoint jp, ModelAndView modelAndView) {
StringBuilder sb = new StringBuilder();
sb.append(prefix).append(" ").append(jp.toString());
if (logger.isDebugEnabled()) {
Object[] args = jp.getArgs();
if (args != null && args.length != 0) {
sb.append(" with ").append(args.length).append(" args.\n");
for (int i = 0; i < args.length; ++i)
sb.append("args[").append(i).append("]: ").append(args[i]).append("\n");
}
if (modelAndView != null)
sb.append("Returned ").append(modelAndView);
logger.debug(sb.toString());
} else
logger.info(sb.toString());
}
...snip...
}
references:
http://forum.springsource.org/showthread.php?62460-Formal-unbound-in-pointcut
发表评论
-
Update Site will come soon
2021-06-02 04:10 1677I am still keep notes my tech n ... -
Portainer 2020(4)Deploy Nginx and Others
2020-03-20 12:06 430Portainer 2020(4)Deploy Nginx a ... -
Private Registry 2020(1)No auth in registry Nginx AUTH for UI
2020-03-18 00:56 435Private Registry 2020(1)No auth ... -
Docker Compose 2020(1)Installation and Basic
2020-03-15 08:10 373Docker Compose 2020(1)Installat ... -
VPN Server 2020(2)Docker on CentOS in Ubuntu
2020-03-02 08:04 455VPN Server 2020(2)Docker on Cen ... -
Nginx Deal with OPTIONS in HTTP Protocol
2020-02-15 01:33 356Nginx Deal with OPTIONS in HTTP ... -
PDF to HTML 2020(1)pdftohtml Linux tool or PDFBox
2020-01-29 07:37 405PDF to HTML 2020(1)pdftohtml Li ... -
Elasticsearch Cluster 2019(2)Kibana Issue or Upgrade
2020-01-12 03:25 720Elasticsearch Cluster 2019(2)Ki ... -
Spark Streaming 2020(1)Investigation
2020-01-08 07:19 295Spark Streaming 2020(1)Investig ... -
Hadoop Docker 2019 Version 3.2.1
2019-12-10 07:39 294Hadoop Docker 2019 Version 3.2. ... -
MongoDB 2019(3)Security and Auth
2019-11-16 06:48 241MongoDB 2019(3)Security and Aut ... -
MongoDB 2019(1)Install 4.2.1 Single and Cluster
2019-11-11 05:07 294MongoDB 2019(1) Follow this ht ... -
Monitor Tool 2019(1)Monit Installation and Usage
2019-10-17 08:22 325Monitor Tool 2019(1)Monit Insta ... -
Ansible 2019(1)Introduction and Installation on Ubuntu and CentOS
2019-10-12 06:15 312Ansible 2019(1)Introduction and ... -
Timezone and Time on All Servers and Docker Containers
2019-10-10 11:18 332Timezone and Time on All Server ... -
Kafka Cluster 2019(6) 3 Nodes Cluster on CentOS7
2019-10-05 23:28 283Kafka Cluster 2019(6) 3 Nodes C ... -
K8S Helm(1)Understand YAML and Kubectl Pod and Deployment
2019-10-01 01:21 326K8S Helm(1)Understand YAML and ... -
Rancher and k8s 2019(5)Private Registry
2019-09-27 03:25 362Rancher and k8s 2019(5)Private ... -
Jenkins 2019 Cluster(1)Version 2.194
2019-09-12 02:53 444Jenkins 2019 Cluster(1)Version ... -
Redis Cluster 2019(3)Redis Cluster on CentOS
2019-08-17 04:07 373Redis Cluster 2019(3)Redis Clus ...
相关推荐
HP-UX Trouble shooting 课程的PPT.各版本通用
"7702-010 trouble shooting guide" 指南旨在为技术人员提供一个详尽的框架,帮助他们有效地识别和解决与7702-010相关的各种问题。这个指南可能是针对某个特定的硬件组件、软件系统、网络设备或者是一个特定的技术...
DB Issue Trouble Shooting Guideline 很经典的数据结构资料
通过对微软内部文档《AD 活动目录trouble shooting》的学习与分析,我们了解到了关于AD活动目录故障排查的多种方法和技术。这不仅有助于提高IT人员的工作效率,也能帮助企业更好地管理和维护复杂的网络环境。希望...
Mailrouting Trouble shooting lotus domino 8
### ITM Trouble Shooting #### 简介与问题确定 在IT管理领域,尤其是对于复杂的监控系统如IBM Tivoli Monitoring (ITM),问题诊断是一项关键能力。本文将基于提供的文档概览,深入探讨其中涉及的关键知识点,包括...
当遇到"JBoss JTA configuration trouble shooting"的问题时,开发者通常需要深入理解JTA的工作原理以及如何在JBoss应用服务器中正确配置它。以下是对这个主题的详细讲解: 首先,JTA是一个Java标准,定义了API来...
1. 安全信息:手册首先强调的是安全问题,包括安全警告(1.1.1 Safety warnings),说明了在操作前必须关闭机架电源(1.2 Information for switching off the gantry power),以及在PDC-A中的服务按钮S1的使用(1.3...
try this doc,. it has great detail of MPLS trouble shotting techniques
标题“trouble shooting java performance”直接指出了本书的主题——解决Java性能问题的故障排除方法。作者Erik Ostermueller通过使用开源工具来检测Java应用程序中的反模式,提出了一种可重复的方法来处理基于Java...
PI问题解决文档,包括各个组件资料。文档内容详细...
在进行HANA问题的诊断和性能分析时,需要关注一系列潜在的性能瓶颈和故障原因。本文档将详细介绍HANA 2.0的问题排查方法,同时涉及调优建议,以帮助数据库管理员和开发人员快速定位并解决HANA系统中遇到的各种问题。...
1. 1.5V电压检查:检查TAS5805M芯片的电源电压是否为1.5V,如果电压不正确,可能会导致芯片无法正常工作。 2. 有效性检查:检查TAS5805M芯片是否能够正常工作,如果芯片损坏或电路板故障,可能会导致芯片无法工作。 ...
##### 1. 是否与Akamai相关? 在开始排查之前,首先需要确定问题是否与Akamai有关。这包括但不限于: - **加速域名**:确认所涉及的URL或域名是否正在使用Akamai进行加速。 - **DNS解析问题**:检查问题是否由DNS...
"Trouble-Shooting_Guide"显然是一份详细记录了各种问题解决步骤的文档,旨在帮助用户诊断并修复他们可能遇到的技术问题。这份指南可能是以一种结构化的格式编写的,包括了问题识别、原因分析、解决方案以及预防措施...
【WebLogic Server常见问题TROUBLE_SHOOTING】 WebLogic Server是BEA Systems(现在已被Oracle公司收购)开发的一款企业级Java应用服务器,用于部署和管理Java EE应用程序。本资料主要针对WebLogic Server的常见...
标题中的“RS485_Trouble_Shooting.zip”表明这是一个关于RS485通信协议故障排查的压缩文件,而“RS485 modbus_Trouble_modbus rs485”进一步指出了主题涉及RS485接口下的Modbus通信问题。描述中的“Modbus ...
文档标题提及的是"MAMMOMAT Novation"的故障排查指南,这是一款由Siemens AG生产的数字钼靶机,主要用于乳腺X线摄影检查。该设备在医疗领域中用于早期检测和诊断乳腺疾病,特别是乳腺癌。 维修手册标签表明这份资料...
"Study-Trouble-Shooting" 提示我们这是一个关于学习和掌握故障排查方法的主题。在"Study-Trouble-Shooting-master"这个压缩包中,可能包含了各种故障排查的学习资料,如教程、案例分析、实战练习等。 1. 故障排查...