zoukankan      html  css  js  c++  java
  • Failed to introspect Class xxxx

    java.lang.IllegalStateException: Failed to introspect Class [com.central.es.config.RestAutoConfigure] from ClassLoader [sun.misc.Launcher$AppClassLoader@18b4aac2]
    	at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:481)
    	at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:358)
    	at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:414)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.lambda$getTypeForFactoryMethod$2(AbstractAutowireCapableBeanFactory.java:742)
    	at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:741)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:680)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:648)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1614)
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:523)
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:495)
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:620)
    	at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:612)
    	at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1243)
    	at org.springframework.boot.SpringApplication.getExitCodeFromMappedException(SpringApplication.java:869)
    	at org.springframework.boot.SpringApplication.getExitCodeFromException(SpringApplication.java:857)
    	at org.springframework.boot.SpringApplication.handleExitCode(SpringApplication.java:844)
    	at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:795)
    	at org.springframework.boot.SpringApplication.run(SpringApplication.java:325)
    	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
    	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)
    	at com.central.MallCenterServer.main(MallCenterServer.java:29)
    Caused by: java.lang.NoClassDefFoundError: org/elasticsearch/client/RestClientBuilder
    	at java.lang.Class.getDeclaredMethods0(Native Method)
    	at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
    	at java.lang.Class.getDeclaredMethods(Class.java:1975)
    	at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:463)
    	... 21 common frames omitted
    Caused by: java.lang.ClassNotFoundException: org.elasticsearch.client.RestClientBuilder
    	at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    	... 25 common frames omitted
    

    pom中对应的依赖scope是test,改成compile就好了

    三分热血值得你十二分努力。
  • 相关阅读:
    Java SE 第十一讲(面向对象之封装)续二
    Java SE 第二十六讲 包与导入语句剖析
    Java SE 第三十一,二,三 Java数组剖析,Java数组内存地址解析
    Java SE 第三十四,五,六讲 Array类解析及数组疑难剖析,冒泡排序,交换排序以及快速排序
    Java SE 第三十八,九,四十,四十一,四十二,三四IDE详细介绍,ArrayList源代码深入剖析,L
    java高效的获取指定的精度的double数
    C++ 字符常量
    C++ endl
    C++基本数据类型
    vs2005的treeview简单使用之无限级别菜单建立
  • 原文地址:https://www.cnblogs.com/woooodlin/p/15618718.html
Copyright © 2011-2022 走看看