springboot2.1.8 + quartz結(jié)合中的異常

springboot2.1.8 + quartz2.3.1版本基于數(shù)據(jù)庫(kù)集群方式的整合中出現(xiàn)異常

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration$JdbcStoreTypeConfiguration$QuartzSchedulerDependencyConfiguration': Unexpected exception during bean creation; nested exception is java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:528) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:845) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:744) [spring-boot-2.1.8.RELEASE.jar:2.1.8.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:391) [spring-boot-2.1.8.RELEASE.jar:2.1.8.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) [spring-boot-2.1.8.RELEASE.jar:2.1.8.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.1.8.RELEASE.jar:2.1.8.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1204) [spring-boot-2.1.8.RELEASE.jar:2.1.8.RELEASE]
    at com.tydic.DubboServiceOaBootstrap.main(DubboServiceOaBootstrap.java:14) [classes/:na]
Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
    at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724) ~[na:1.8.0_131]
    at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:531) ~[na:1.8.0_131]
    at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355) ~[na:1.8.0_131]
    at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286) ~[na:1.8.0_131]
    at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120) ~[na:1.8.0_131]
    at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72) ~[na:1.8.0_131]
    at java.lang.reflect.Executable.declaredAnnotations(Executable.java:599) ~[na:1.8.0_131]
    at java.lang.reflect.Executable.declaredAnnotations(Executable.java:597) ~[na:1.8.0_131]
    at java.lang.reflect.Executable.getAnnotation(Executable.java:570) ~[na:1.8.0_131]
    at java.lang.reflect.Method.getAnnotation(Method.java:622) ~[na:1.8.0_131]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.lambda$determineCandidateConstructors$0(AutowiredAnnotationBeanPostProcessor.java:249) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:410) ~[spring-core-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:417) ~[spring-core-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:389) ~[spring-core-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:248) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1269) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1184) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
    ... 13 common frames omitted

從異常堆棧也看不出具體的問題在哪,所以利用idea的調(diào)試工具定位到異常發(fā)生的地方则涯,我的idea版本為 2017.2.5


圖片.png

圖片.png

調(diào)試啟動(dòng)服務(wù),此時(shí)已經(jīng)進(jìn)入的異常點(diǎn)


圖片.png

進(jìn)入parseClassValue方法,打斷點(diǎn)贰镣,并重新調(diào)試啟動(dòng)服務(wù)
圖片.png

進(jìn)入異常斷點(diǎn)
圖片.png

終于看到了最終異常信息


圖片.png

這個(gè)類又是什么呢酒繁,我的項(xiàng)目又沒有用上它,先找quartz它的自動(dòng)配置類看看轨淌。

進(jìn)入springboot啟動(dòng)quartz的類QuartzAutoConfiguration迂烁,我們可以看見,它確實(shí)引用了該類递鹉,并作為一個(gè)bean來注冊(cè)了

圖片.png

pom文件中引入liquibase-core盟步,因?yàn)槲覀冇貌簧线@個(gè),所有我們?cè)谝龑?dǎo)類中排除springboot自動(dòng)裝配的LiquibaseAutoConfiguration

   <dependency>
       <groupId>org.liquibase</groupId>
       <artifactId>liquibase-core</artifactId>
   </dependency>

@SpringBootApplication(exclude = LiquibaseAutoConfiguration.class)

重新啟動(dòng)躏结,OK却盘,問題解決。


圖片.png

數(shù)據(jù)庫(kù)也已經(jīng)存入數(shù)據(jù)了


圖片.png
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末媳拴,一起剝皮案震驚了整個(gè)濱河市谷炸,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌禀挫,老刑警劉巖旬陡,帶你破解...
    沈念sama閱讀 223,207評(píng)論 6 521
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場(chǎng)離奇詭異语婴,居然都是意外死亡描孟,警方通過查閱死者的電腦和手機(jī),發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 95,455評(píng)論 3 400
  • 文/潘曉璐 我一進(jìn)店門砰左,熙熙樓的掌柜王于貴愁眉苦臉地迎上來匿醒,“玉大人,你說我怎么就攤上這事缠导×幔” “怎么了?”我有些...
    開封第一講書人閱讀 170,031評(píng)論 0 366
  • 文/不壞的土叔 我叫張陵僻造,是天一觀的道長(zhǎng)憋他。 經(jīng)常有香客問我孩饼,道長(zhǎng),這世上最難降的妖魔是什么竹挡? 我笑而不...
    開封第一講書人閱讀 60,334評(píng)論 1 300
  • 正文 為了忘掉前任镀娶,我火速辦了婚禮,結(jié)果婚禮上揪罕,老公的妹妹穿的比我還像新娘梯码。我一直安慰自己,他們只是感情好好啰,可當(dāng)我...
    茶點(diǎn)故事閱讀 69,322評(píng)論 6 398
  • 文/花漫 我一把揭開白布轩娶。 她就那樣靜靜地躺著,像睡著了一般框往。 火紅的嫁衣襯著肌膚如雪鳄抒。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 52,895評(píng)論 1 314
  • 那天搅窿,我揣著相機(jī)與錄音,去河邊找鬼隙券。 笑死男应,一個(gè)胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的娱仔。 我是一名探鬼主播沐飘,決...
    沈念sama閱讀 41,300評(píng)論 3 424
  • 文/蒼蘭香墨 我猛地睜開眼,長(zhǎng)吁一口氣:“原來是場(chǎng)噩夢(mèng)啊……” “哼牲迫!你這毒婦竟也來了耐朴?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 40,264評(píng)論 0 277
  • 序言:老撾萬榮一對(duì)情侶失蹤盹憎,失蹤者是張志新(化名)和其女友劉穎筛峭,沒想到半個(gè)月后,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體陪每,經(jīng)...
    沈念sama閱讀 46,784評(píng)論 1 321
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡影晓,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 38,870評(píng)論 3 343
  • 正文 我和宋清朗相戀三年,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了檩禾。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片挂签。...
    茶點(diǎn)故事閱讀 40,989評(píng)論 1 354
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡,死狀恐怖盼产,靈堂內(nèi)的尸體忽然破棺而出饵婆,到底是詐尸還是另有隱情,我是刑警寧澤戏售,帶...
    沈念sama閱讀 36,649評(píng)論 5 351
  • 正文 年R本政府宣布侨核,位于F島的核電站草穆,受9級(jí)特大地震影響,放射性物質(zhì)發(fā)生泄漏芹关。R本人自食惡果不足惜续挟,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 42,331評(píng)論 3 336
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望侥衬。 院中可真熱鬧诗祸,春花似錦、人聲如沸轴总。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,814評(píng)論 0 25
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)怀樟。三九已至功偿,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間往堡,已是汗流浹背械荷。 一陣腳步聲響...
    開封第一講書人閱讀 33,940評(píng)論 1 275
  • 我被黑心中介騙來泰國(guó)打工, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留虑灰,地道東北人吨瞎。 一個(gè)月前我還...
    沈念sama閱讀 49,452評(píng)論 3 379
  • 正文 我出身青樓,卻偏偏與公主長(zhǎng)得像穆咐,于是被迫代替她去往敵國(guó)和親颤诀。 傳聞我的和親對(duì)象是個(gè)殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 45,995評(píng)論 2 361

推薦閱讀更多精彩內(nèi)容

  • 在新版本的SpringBoot2.0發(fā)布后对湃,急迫嘗鮮的我將相關(guān)的項(xiàng)目已經(jīng)更換為最新版本崖叫,在SpringBoot源碼...
    恒宇少年閱讀 57,620評(píng)論 44 72
  • 一、零基礎(chǔ)快速入門SpringBoot2.0 1拍柒、SpringBoot2.x課程全套介紹和高手系列知識(shí)點(diǎn) 簡(jiǎn)介:...
    DdShare閱讀 2,161評(píng)論 0 7
  • 序 又到了寫年終總結(jié)的時(shí)候了心傀。每當(dāng)這個(gè)時(shí)候思緒總是翻江倒海,因?yàn)樘脹]有反思和總結(jié)的緣故拆讯,一年才總結(jié)一次剧包,確實(shí)是有...
    go4it閱讀 527評(píng)論 1 6
  • 嘗試使用springboot整合quartz實(shí)現(xiàn)定時(shí)任務(wù)持久化到數(shù)據(jù)庫(kù),并配置quartz的集群功能 首先介紹除了...
    1659b264cc28閱讀 90,068評(píng)論 7 39
  • 2016年3月26號(hào)你離開一周還差二十三個(gè)小時(shí)往果,昨天在宿舍呆了一天疆液,不敢出門,因?yàn)槟亩加心愕挠白影 ?以為不痛不癢...
    十人十人夕閱讀 266評(píng)論 0 1