解決springBoot項目啟動時,報org.yaml.snakeyaml.error.YAMLException: Class not found: org.apache.dubbo.admi...

小明的個人博客

前言:

最近在用springboot + dubbo框架搭建一個微服務應用,經(jīng)歷了一系列的mavne配置之后,莫名其妙的出現(xiàn)了以上異常,但不會影響項目正常啟動和運行。但擁有強迫癥的我例获。。。

異常信息:
Cannot create property=configs for JavaBean=org.apache.dubbo.rpc.cluster.configurator.parser.model.ConfiguratorConfig@52fec840
 in 'string', line 1, column 1:
    configs:
    ^
Can't construct a java object for tag:yaml.org,2002:org.apache.dubbo.admin.model.adapter.BalancingDTO2OverrideConfigAdapter; exception=Class not found: org.apache.dubbo.admin.model.adapter.BalancingDTO2OverrideConfigAdapter
 in 'string', line 2, column 3:
    - !!org.apache.dubbo.admin.model.a ... 
      ^

 in 'string', line 2, column 1:
    - !!org.apache.dubbo.admin.model ... 
    ^

    at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:268)
    at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:149)
    at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:308)
    at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:207)
    at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:196)
    at org.yaml.snakeyaml.constructor.BaseConstructor.constructDocument(BaseConstructor.java:161)
    at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:147)
    at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:524)
    at org.yaml.snakeyaml.Yaml.load(Yaml.java:437)
    at org.apache.dubbo.rpc.cluster.configurator.parser.ConfigParser.parseObject(ConfigParser.java:62)
    at org.apache.dubbo.rpc.cluster.configurator.parser.ConfigParser.parseConfigurators(ConfigParser.java:41)
    at org.apache.dubbo.registry.integration.AbstractConfiguratorListener.process(AbstractConfiguratorListener.java:62)
    at org.apache.dubbo.registry.integration.AbstractConfiguratorListener.initWith(AbstractConfiguratorListener.java:46)
    at org.apache.dubbo.registry.integration.RegistryProtocol$ProviderConfigurationListener.<init>(RegistryProtocol.java:577)
    at org.apache.dubbo.registry.integration.RegistryProtocol.<init>(RegistryProtocol.java:98)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.lang.Class.newInstance(Class.java:442)
    at org.apache.dubbo.common.extension.ExtensionLoader.createExtension(ExtensionLoader.java:526)
    at org.apache.dubbo.common.extension.ExtensionLoader.getExtension(ExtensionLoader.java:344)
    at org.apache.dubbo.rpc.Protocol$Adaptive.export(Protocol$Adaptive.java)
    at org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:553)
    at org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:402)
    at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:363)
    at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:345)
    at org.apache.dubbo.config.spring.ServiceBean.export(ServiceBean.java:318)
    at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:112)
    at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:58)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:400)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:354)
    at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:888)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:161)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:327)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243)
    at com.laFerrari.comment.sync.SyncApplication.main(SyncApplication.java:27)
Caused by: Can't construct a java object for tag:yaml.org,2002:org.apache.dubbo.admin.model.adapter.BalancingDTO2OverrideConfigAdapter; exception=Class not found: org.apache.dubbo.admin.model.adapter.BalancingDTO2OverrideConfigAdapter
 in 'string', line 2, column 3:
    - !!org.apache.dubbo.admin.model.a ... 
      ^

    at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:313)
    at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:207)
    at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:196)
    at org.yaml.snakeyaml.constructor.BaseConstructor.constructSequenceStep2(BaseConstructor.java:373)
    at org.yaml.snakeyaml.constructor.BaseConstructor.constructSequence(BaseConstructor.java:357)
    at org.yaml.snakeyaml.constructor.Constructor$ConstructSequence.construct(Constructor.java:516)
    at org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:207)
    at org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:196)
    at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.newInstance(Constructor.java:281)
    at org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:246)
    ... 44 more
Caused by: org.yaml.snakeyaml.error.YAMLException: Class not found: org.apache.dubbo.admin.model.adapter.BalancingDTO2OverrideConfigAdapter
    at org.yaml.snakeyaml.constructor.Constructor.getClassForNode(Constructor.java:642)
    at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.getConstructor(Constructor.java:298)
    at org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:308)
    ... 53 more
異常分析:

這個錯誤可以說是非常直觀:

org.yaml.snakeyaml.error.YAMLException: Class not found: org.apache.dubbo.admin.model.adapter.BalancingDTO2OverrideConfigAdapter

找不到BalancingDTO2OverrideConfigAdapter這個類
第一步:google搜索 "Class not found: org.apache.dubbo.admin.model.adapter.BalancingDTO2OverrideConfigAdapter" 基本找不到對應的內容


QQ截圖20190509104831.png

第二步:google搜索" Can't construct a java object for tag:yaml.org,2002"

小明的個人博客

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市,隨后出現(xiàn)的幾起案子枷莉,更是在濱河造成了極大的恐慌,老刑警劉巖尺迂,帶你破解...
    沈念sama閱讀 212,718評論 6 492
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件笤妙,死亡現(xiàn)場離奇詭異冒掌,居然都是意外死亡,警方通過查閱死者的電腦和手機蹲盘,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 90,683評論 3 385
  • 文/潘曉璐 我一進店門股毫,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人召衔,你說我怎么就攤上這事铃诬。” “怎么了苍凛?”我有些...
    開封第一講書人閱讀 158,207評論 0 348
  • 文/不壞的土叔 我叫張陵趣席,是天一觀的道長。 經(jīng)常有香客問我醇蝴,道長宣肚,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 56,755評論 1 284
  • 正文 為了忘掉前任悠栓,我火速辦了婚禮霉涨,結果婚禮上,老公的妹妹穿的比我還像新娘惭适。我一直安慰自己嵌纲,他們只是感情好,可當我...
    茶點故事閱讀 65,862評論 6 386
  • 文/花漫 我一把揭開白布腥沽。 她就那樣靜靜地躺著逮走,像睡著了一般。 火紅的嫁衣襯著肌膚如雪今阳。 梳的紋絲不亂的頭發(fā)上师溅,一...
    開封第一講書人閱讀 50,050評論 1 291
  • 那天,我揣著相機與錄音盾舌,去河邊找鬼墓臭。 笑死,一個胖子當著我的面吹牛妖谴,可吹牛的內容都是我干的窿锉。 我是一名探鬼主播,決...
    沈念sama閱讀 39,136評論 3 410
  • 文/蒼蘭香墨 我猛地睜開眼膝舅,長吁一口氣:“原來是場噩夢啊……” “哼嗡载!你這毒婦竟也來了?” 一聲冷哼從身側響起仍稀,我...
    開封第一講書人閱讀 37,882評論 0 268
  • 序言:老撾萬榮一對情侶失蹤洼滚,失蹤者是張志新(化名)和其女友劉穎,沒想到半個月后技潘,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體遥巴,經(jīng)...
    沈念sama閱讀 44,330評論 1 303
  • 正文 獨居荒郊野嶺守林人離奇死亡千康,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內容為張勛視角 年9月15日...
    茶點故事閱讀 36,651評論 2 327
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發(fā)現(xiàn)自己被綠了铲掐。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片拾弃。...
    茶點故事閱讀 38,789評論 1 341
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖摆霉,靈堂內的尸體忽然破棺而出砸彬,到底是詐尸還是另有隱情,我是刑警寧澤斯入,帶...
    沈念sama閱讀 34,477評論 4 333
  • 正文 年R本政府宣布砂碉,位于F島的核電站,受9級特大地震影響刻两,放射性物質發(fā)生泄漏增蹭。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點故事閱讀 40,135評論 3 317
  • 文/蒙蒙 一磅摹、第九天 我趴在偏房一處隱蔽的房頂上張望滋迈。 院中可真熱鬧,春花似錦户誓、人聲如沸饼灿。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,864評論 0 21
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽碍彭。三九已至,卻和暖如春悼潭,著一層夾襖步出監(jiān)牢的瞬間庇忌,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 32,099評論 1 267
  • 我被黑心中介騙來泰國打工舰褪, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留皆疹,地道東北人。 一個月前我還...
    沈念sama閱讀 46,598評論 2 362
  • 正文 我出身青樓占拍,卻偏偏與公主長得像略就,于是被迫代替她去往敵國和親。 傳聞我的和親對象是個殘疾皇子晃酒,可洞房花燭夜當晚...
    茶點故事閱讀 43,697評論 2 351

推薦閱讀更多精彩內容