解決 spring-cloud-starter-zipkin 啟動錯誤

應用場景:Spring Boot 服務添加 Zipkin 依賴,進行服務調用的數據采集,然后進行 Zipkin-Server 服務調用追蹤顯示。

示例pom.xml配置:

<parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>1.5.10.RELEASE</version>
</parent>
<dependencies>
<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId>
</dependency><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-eureka</artifactId>
</dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-actuator</artifactId>
</dependency><dependency><groupId>de.codecentric</groupId><artifactId>spring-boot-admin-starter-client</artifactId><version>1.5.7</version>
</dependency><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-sleuth-zipkin</artifactId>
</dependency><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-test</artifactId><scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-dependencies</artifactId><version>Edgware.SR3</version><type>pom</type><scope>import</scope></dependency>
</dependencies>
</dependencyManagement>

添加spring-cloud-sleuth-zipkin程序包,Spring Boot 啟動的時候,報下面錯誤:

2018-05-08 16:00:35.313 ERROR [eureka-client,,,] 10442 --- [           main] o.s.boot.SpringApplication               : Application startup failedorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'spectatorRestTemplateInterceptorPostProcessor' defined in class path resource [org/springframework/cloud/netflix/metrics/MetricsInterceptorConfiguration$MetricsRestTemplateConfiguration.class]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cloud.sleuth.annotation.SleuthAnnotationAutoConfiguration': BeanPostProcessor before instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/tools/PointcutPrimitiveat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:479) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:237) ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:703) ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:528) ~[spring-context-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.10.RELEASE.jar:1.5.10.RELEASE]at com.easyjijin.demo.eurekaclient.EurekaClientApplication.main(EurekaClientApplication.java:12) [classes/:na]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cloud.sleuth.annotation.SleuthAnnotationAutoConfiguration': BeanPostProcessor before instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aspectj/weaver/tools/PointcutPrimitiveat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:479) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:372) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.aop.framework.autoproxy.BeanFactoryAdvisorRetrievalHelper.findAdvisorBeans(BeanFactoryAdvisorRetrievalHelper.java:92) ~[spring-aop-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findCandidateAdvisors(AbstractAdvisorAutoProxyCreator.java:102) ~[spring-aop-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator.findCandidateAdvisors(AnnotationAwareAspectJAutoProxyCreator.java:88) ~[spring-aop-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.aop.aspectj.autoproxy.AspectJAwareAdvisorAutoProxyCreator.shouldSkip(AspectJAwareAdvisorAutoProxyCreator.java:103) ~[spring-aop-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessBeforeInstantiation(AbstractAutoProxyCreator.java:248) ~[spring-aop-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:1037) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:1011) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:473) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]... 14 common frames omitted
Caused by: java.lang.NoClassDefFoundError: org/aspectj/weaver/tools/PointcutPrimitiveat org.springframework.aop.aspectj.AspectJExpressionPointcut.<clinit>(AspectJExpressionPointcut.java:87) ~[spring-aop-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.aop.aspectj.annotation.ReflectiveAspectJAdvisorFactory.getPointcut(ReflectiveAspectJAdvisorFactory.java:220) ~[spring-aop-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.aop.aspectj.annotation.ReflectiveAspectJAdvisorFactory.getAdvisor(ReflectiveAspectJAdvisorFactory.java:203) ~[spring-aop-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.aop.aspectj.annotation.ReflectiveAspectJAdvisorFactory.getAdvisors(ReflectiveAspectJAdvisorFactory.java:136) ~[spring-aop-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.aop.aspectj.annotation.BeanFactoryAspectJAdvisorsBuilder.buildAspectJAdvisors(BeanFactoryAspectJAdvisorsBuilder.java:109) ~[spring-aop-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator.findCandidateAdvisors(AnnotationAwareAspectJAutoProxyCreator.java:90) ~[spring-aop-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.aop.aspectj.autoproxy.AspectJAwareAdvisorAutoProxyCreator.shouldSkip(AspectJAwareAdvisorAutoProxyCreator.java:103) ~[spring-aop-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessBeforeInstantiation(AbstractAutoProxyCreator.java:248) ~[spring-aop-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:1037) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:1011) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:473) ~[spring-beans-4.3.14.RELEASE.jar:4.3.14.RELEASE]... 35 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.aspectj.weaver.tools.PointcutPrimitiveat java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_162]at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_162]at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338) ~[na:1.8.0_162]at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_162]... 46 common frames omitted

解決方案,添加如下程序包引用:

<dependency><groupId>org.aspectj</groupId><artifactId>aspectjweaver</artifactId><version>1.8.10</version>
</dependency>

參考資料:can not start up application?

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/278029.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/278029.shtml
英文地址,請注明出處:http://en.pswp.cn/news/278029.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

什么是Microsoft Teams的App Studio

Teams的app studio很多用戶可能不知道&#xff0c;但是對于一個teams平臺的開發人員來說&#xff0c;這個是開發利器&#xff0c;利用這個工具你可以輕松的配置manifest文件&#xff0c;可以輕松的一站式創建teams app所需要的所有東西。而且你可以很方便的可視化配置adaptive …

Spring Cloud-鴻鵠Cloud分布式微服務云系統—架構圖

這邊結合了當前大部分企業的通用需求&#xff0c;包括技術的選型比較嚴格、苛刻&#xff0c;不僅要用業界最流行的技術&#xff0c;還要和國際接軌&#xff0c;在未來的5~10年內不能out。作為公司的架構師&#xff0c;也要有一種放眼世界的眼光&#xff0c;不僅要給公司做好的技…

Teams bot的調用限制

上個月Teams團隊發布了對Teams app/bot調用api的頻率的限制。這也從側面說明Teams app越來越多&#xff0c;Teams團隊需要優先保證Teams本身的計算資源&#xff0c;來提供流暢的用戶體驗。 具體的每個限制指標在這里&#xff1a; https://docs.microsoft.com/en-us/microsoftt…

Array的sort方法

作為一個剛開始學習的前端&#xff0c;小結一下&#xff1a;sort方法&#xff1a; 如果調用該方法時沒有使用參數&#xff0c;將按字母順序對數組中的元素進行排序&#xff0c;說得更精確點&#xff0c;是按照字符編碼的順序進行排序。要實現這一點&#xff0c;首先應把數組的元…

如何使用ARM創建Teams Bot所需要的Azure資源

相信很多devops已經全面開始使用ARM來創建azure資源了&#xff0c;ARM有很多方便的地方&#xff0c;比如簡單易學&#xff0c;Infrastructure as Code&#xff0c;但是深入使用ARM開始會發現一些有待改進的方面。這篇文章主要是分享一下我在做Teams app的時候使用ARM來創建資源…

Bot Service自帶的數據分析統計功能

每個產品上線后都希望自己能實時看到多少用戶在使用我的產品&#xff0c;我的服務&#xff0c;有多少使用量&#xff0c;有沒有遇到問題。市面上做用戶數據、行為分析的公司也不少&#xff0c;但是大多數都需要我們修改一些代碼來集成第三方的sdk庫。 我的teams app上線后也急…

LuckyDraw bot有幸被提名為微軟2019的People's Choice app

上個月微軟進行了一個全世界提名活動&#xff0c;目標是選出微軟2019年度People’s Choice app。 很幸運&#xff0c;我的LuckyDraw bot得到了來自世界各地使用者的投票&#xff0c;其中也包含Teams中國社區和很多朋友的支持。 https://developer.microsoft.com/en-us/microso…

圖靈社區 和 大家網

http://www.ituring.com.cn/ http://club.topsage.com/ 大家論壇 http://www.topsage.com/ http://www.dxbbba.com/ 大學生必備吧 轉載于:https://www.cnblogs.com/onelikeone/p/9023267.html

Teams內嵌的卡片image的限制

我的LuckyDraw上線后收到了不少有價值的反饋&#xff0c;其中有一部分是針對圖片的&#xff0c;有一些用戶說他們填寫了image的url&#xff0c;但是圖片顯示不出來。 實際上這個問題在我提交這個應用到微軟審核團隊的時候&#xff0c;審核團隊也提出了類似問題。但這個是Teams本…

Python 面向對象編程(進階部分)

靜態方法&#xff1a; 通過 staticmethod 裝飾器即可把其裝飾的方法變為一個靜態方法。普通的方法&#xff0c;可以在實例化后直接調用&#xff0c;并且在方法里可以通過self.調用實例變量或類變量&#xff0c;但靜態方法是不可以訪問實例變量或類變量的&#xff0c;一個不能訪…

分享實錄|爭議不斷地EOS,我們如何才能理性看待?

1 EOS基本介紹 EOS是Block.One公司正在研發的一個區塊鏈底層公鏈系統&#xff0c;目的是解決現有的區塊鏈應用性能低、安全性差、開發難度高以及過度依賴手續費的問題&#xff0c;實現分布式應用的性能擴展。EOS提供帳戶&#xff0c;身份驗證&#xff0c;數據庫&#xff0c;異步…

Teams的Incoming Webhook

我在去年的一篇文章里介紹過Teams的outgoing webhook&#xff0c;這個可以用來實現一個簡單的用戶和service對話機制。 Teams除了outgoing webhook以外&#xff0c;還有一個incoming webhook&#xff0c;從名字上我們也可以立刻知道&#xff0c;這個webhook是用來處理進入Team…

Comet OJ - Contest #0題解

傳送門 菜爆了……總共只有一道題會做的……而且也沒有短裙好難過 為啥必須得有手機才能注冊賬號啊喂……歧視么…… \(A\) 解方程 推一下柿子大概就是 \[x-\sqrt{n}yz2\sqrt{yz}\] 如果\(\sqrt{n}\)是無理數&#xff0c;那么就是 \[xyz,{n\over 4}yz\] 那么要滿足\(n\)必須是\…

tornado 08 數據庫-ORM-SQLAlchemy-表關系和簡單登錄注冊

tornado 08 數據庫-ORM-SQLAlchemy-表關系和簡單登錄注冊 引言 #在數據庫&#xff0c;所謂表關系&#xff0c;只是人為認為的添加上去的表與表之間的關系&#xff0c;只是邏輯上認為的關系&#xff0c;實際上數據庫里面的表之間并沒有所謂的表關系 一、一對一表關系 Module #需…

Teams的manifest文件開始支持多語言

Teams發展速度飛快&#xff0c;Teams app的manifest文件schema也迎來了版本1.5&#xff0c;在這個版本里&#xff0c;很大的一個改進是支持多語言。 讓我們一起來看看&#xff0c;如何在manifest文件里配置多語言。 1&#xff0c;我們需要先把manifest文件設置成v1.5 {"…

白白的(baibaide)

白白的&#xff08;baibaide&#xff09; 有一個長度為 $n$ 的序列 $a_1, a_2, \dots, a_n$&#xff0c;一開始每個位置都是白色。如果一個區間中每個位置都是白色&#xff0c;則稱這是一個白白的區間。如果一個白白的區間向左或向右延長后都不是白白的區間了&#xff0c;則稱這…

如何利用Python網絡爬蟲爬取微信朋友圈動態--附代碼(下)

前天給大家分享了如何利用Python網絡爬蟲爬取微信朋友圈數據的上篇&#xff08;理論篇&#xff09;&#xff0c;今天給大家分享一下代碼實現&#xff08;實戰篇&#xff09;&#xff0c;接著上篇往下繼續深入。一、代碼實現1、修改Scrapy項目中的items.py文件。我們需要獲取的數…

使用Adaptive cards來構建Teams app的界面

Teams app的task module十分好用&#xff0c;當用戶點擊了一個卡片上的按鈕是可以在Teams里彈出一個對話框&#xff0c;對話框的內容可以是開發人員自己的一個網頁頁面&#xff0c;或者是adaptive card。 在我的LuckyDraw bot里&#xff0c;我比較了這兩種的優勢和劣勢&#xf…

Boosting(提升方法)之GBDT

一、GBDT的通俗理解 提升方法采用的是加法模型和前向分步算法來解決分類和回歸問題&#xff0c;而以決策樹作為基函數的提升方法稱為提升樹&#xff08;boosting tree&#xff09;。GBDT(Gradient Boosting Decision Tree)就是提升樹算法的一種&#xff0c;它使用的基學習器是C…

CC攻擊原理及防范方法

一、 CC攻擊的原理&#xff1a; CC攻擊的原理就是攻擊者控制某些主機不停地發大量數據包給對方服務器造成服務器資源耗盡&#xff0c;一直到宕機崩潰。CC主要是用來消耗服務器資源的&#xff0c;每個人都有這樣的體驗&#xff1a;當一個網頁訪問的人數特別多的時候&#xff0c…