Spring Cloud Hystrix java.lang.NoClassDefFoundError: org/aspectj/lang/JoinPoint 问题
环境:spring boot: 1.3.7 spring cloud : Brixton.SR5
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.7.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Brixton.SR5</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
添加
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-hystrix</artifactId>
</dependency>
添加注解 @SpringCloudApplication
添加 @HystrixCommand(fallbackMethod = "helloFallBack")
后,启动tomcat时报以下错误:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hystrixCommandAspect' defined in class path resource [org/springframework/cloud/netflix/hystrix/HystrixCircuitBreakerConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.netflix.hystrix.contrib.javanica.aop.aspectj.HystrixCommandAspect]: Factory method 'hystrixCommandAspect' threw exception; nested exception is java.lang.NoClassDefFoundError: org/aspectj/lang/JoinPoint
看来是jar包有问题了
最后试了n个依赖,最后只添加了下面这个依赖就好了
<dependency>
<groupId> org.aspectj</groupId>
<artifactId> aspectjweaver</artifactId>
<version> 1.6.11</version>
</dependency>
Spring Cloud Hystrix java.lang.NoClassDefFoundError: org/aspectj/lang/JoinPoint 问题的更多相关文章
- 【异常】Caused by: java.lang.NoClassDefFoundError: org/aspectj/lang/annotation/Around
原因:缺少aspect,AOP的maven坐标 导入maven坐标: <dependency> <groupId>org.springframework</groupId ...
- Caused by: java.lang.ClassNotFoundException: org.aspectj.lang.annotation.Around
1.错误描述 INFO:2015-05-01 11:12:15[localhost-startStop-1] - Root WebApplicationContext: initialization ...
- spring问题:java.lang.NoClassDefFoundError: org/aspectj/weaver/tools/PointcutPrimitive
问题描述: spring的:java.lang.NoClassDefFoundError: org/aspectj/weaver/tools/PointcutPrimitive 解决方案: 缺少jar ...
- Spring系列: 使用aop报错:nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$Refle
写了个最简单的aop例子 配置文件如下 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns ...
- java.lang.NoClassDefFoundError: org/aspectj/weaver/tools/PointcutPrimitive
问题:使用Spring时,报错:java.lang.NoClassDefFoundError: org/aspectj/weaver/tools/PointcutPrimitive问题原因: 少了as ...
- could not find class that it depends on; nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException
© 版权声明:本文为博主原创文章,转载请注明出处 1.问题描述 搭建SSH框架启动报错如下: 六月 07, 2017 2:34:34 下午 org.springframework.web.contex ...
- 笔记:Spring Cloud Hystrix 服务容错保护
由于每个单元都在不同的进程中运行,依赖通过远程调用的方式执行,这样就有可能因为网络原因或是依赖服务自身问题出现调用故障或延迟,而这些问题会直接导致调用方的对外服务也出现延迟,若此时调用方的请求不断增加 ...
- 第五章 服务容错保护:Spring Cloud Hystrix
在微服务架构中,我们将系统拆分为很多个服务,各个服务之间通过注册与订阅的方式相互依赖,由于各个服务都是在各自的进程中运行,就有可能由于网络原因或者服务自身的问题导致调用故障或延迟,随着服务的积压,可能 ...
- SpringMVC集成AOP错误:java lang classnotfoundexception org aspectj lang joinpoint
记录自己出现的问题,Spring AOP 使用测试类测试没问题,在SpringMVC启动服务器时出现java lang classnotfoundexception org aspectj lang ...
随机推荐
- WIN7\win10下使用批处理配置JAVA环境变量
我找了很多环境变量批处理的教程,都不太满意,因此综合修改了下,拼凑出了这么一个版本. 下面这个是我主要参考的博客,大部分的代码都是来自这里: http://blog.csdn.net/lpy36543 ...
- TP5 首页导航一级和二级分类
<ul id="jsddm"> <li><a class="navi_home" href="{:url('/index ...
- CentOS7 安装mysql(YUM方式)
1.下载mysql源安装包 shell> wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm 2 ...
- wxWidgets:入门
0. 介绍 wxWidgets是一个开源的跨平台的C++构架库(framework),它可以提供GUI和其它工具.目前的3.0.0版本支持所有版本的Windows.带GTK+或Motif的Unix和M ...
- 纯文本文件 student.txt为学生信息, 里面的内容(包括花括号)如下所示
import json from collections import OrderedDict import xlwt with open('student.txt',encoding='utf-8' ...
- 数组比较大小的几种方法及math是方法
call apply bind 的区别? 解决函数内this的指向: 1.可以在函数外提前声明变量 一般情况下我们用 var _this/that=this 2.通过apply和call来修改函数 ...
- CA证书认证单向和双向的区别
我觉得最科学的应该是,单向的,每次客户端发两把锁住的东西给服务端,服务端解密两次,服务端用客户端发来的对称密钥加密数据,发送给客户端,客户端只需解密一次,然后客户端每次修改随机密码,传给服务端,服务 ...
- 如何在一个js文件中引入另外的js文件
例如想要在a.js中引用b.js.c.js和d.js document.write("<script language='javascript' src='b.js'></ ...
- Dividing Infinity - Distributed Partitioning Schemes
This is the second post in a series discussing the architecture and implementation of massively para ...
- hbase建表时 ERROR: java.io.IOException: Table Namespace Manager not ready yet, try again later
其实解决不难,是因为时钟不同步,把每个节点切换到root用户下同步时钟就好了,在重启hbase!