springboot版本:
org.springframework.boot
spring-boot-starter-parent
2.0.4.RELEASE
kafka版本:
org.springframework.kafka
spring-kafka
1.1.1.RELEASE
启动报错:
D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\bin\java.exe -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:54880,suspend=y,server=n -javaagent:C:\Users\Administrator\.IdeaIC2018.2\system\captureAgent\debugger-agent.jar=file:/C:/Users/Administrator/AppData/Local/Temp/capture.props -Dfile.encoding=UTF-8 -classpath "D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\charsets.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\deploy.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\ext\access-bridge-64.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\ext\cldrdata.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\ext\dnsns.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\ext\jaccess.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\ext\jfxrt.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\ext\localedata.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\ext\nashorn.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\ext\sunec.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\ext\sunjce_provider.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\ext\sunmscapi.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\ext\sunpkcs11.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\ext\zipfs.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\javaws.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\jce.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\jfr.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\jfxswt.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\jsse.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\management-agent.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\plugin.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\resources.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\rt.jar;D:\workspace\dubbospringboot\dubbo-provider\target\classes;D:\workspace\dubbospringboot\dubbo-dao\target\classes;D:\workspace\dubbospringboot\dubbo-api\target\classes;D:\repository\log4j\log4j\1.2.17\log4j-1.2.17.jar;D:\workspace\dubbospringboot\dubbo-common\target\classes;D:\repository\org\apache\commons\commons-lang3\3.7\commons-lang3-3.7.jar;D:\repository\com\alibaba\fastjson\1.2.49\fastjson-1.2.49.jar;D:\repository\com\belerweb\pinyin4j\2.5.0\pinyin4j-2.5.0.jar;D:\repository\org\springframework\boot\spring-boot-starter-web\2.0.4.RELEASE\spring-boot-starter-web-2.0.4.RELEASE.jar;D:\repository\org\springframework\boot\spring-boot-starter\2.0.4.RELEASE\spring-boot-starter-2.0.4.RELEASE.jar;D:\repository\org\springframework\boot\spring-boot\2.0.4.RELEASE\spring-boot-2.0.4.RELEASE.jar;D:\repository\org\springframework\boot\spring-boot-autoconfigure\2.0.4.RELEASE\spring-boot-autoconfigure-2.0.4.RELEASE.jar;D:\repository\org\springframework\boot\spring-boot-starter-logging\2.0.4.RELEASE\spring-boot-starter-logging-2.0.4.RELEASE.jar;D:\repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;D:\repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;D:\repository\org\apache\logging\log4j\log4j-to-slf4j\2.10.0\log4j-to-slf4j-2.10.0.jar;D:\repository\org\apache\logging\log4j\log4j-api\2.10.0\log4j-api-2.10.0.jar;D:\repository\org\slf4j\jul-to-slf4j\1.7.25\jul-to-slf4j-1.7.25.jar;D:\repository\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;D:\repository\org\yaml\snakeyaml\1.19\snakeyaml-1.19.jar;D:\repository\org\springframework\boot\spring-boot-starter-json\2.0.4.RELEASE\spring-boot-starter-json-2.0.4.RELEASE.jar;D:\repository\com\fasterxml\jackson\core\jackson-databind\2.9.6\jackson-databind-2.9.6.jar;D:\repository\com\fasterxml\jackson\core\jackson-annotations\2.9.0\jackson-annotations-2.9.0.jar;D:\repository\com\fasterxml\jackson\core\jackson-core\2.9.6\jackson-core-2.9.6.jar;D:\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.9.6\jackson-datatype-jdk8-2.9.6.jar;D:\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.9.6\jackson-datatype-jsr310-2.9.6.jar;D:\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.9.6\jackson-module-parameter-names-2.9.6.jar;D:\repository\org\springframework\boot\spring-boot-starter-tomcat\2.0.4.RELEASE\spring-boot-starter-tomcat-2.0.4.RELEASE.jar;D:\repository\org\apache\tomcat\embed\tomcat-embed-core\8.5.32\tomcat-embed-core-8.5.32.jar;D:\repository\org\apache\tomcat\embed\tomcat-embed-el\8.5.32\tomcat-embed-el-8.5.32.jar;D:\repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.32\tomcat-embed-websocket-8.5.32.jar;D:\repository\org\hibernate\validator\hibernate-validator\6.0.11.Final\hibernate-validator-6.0.11.Final.jar;D:\repository\javax\validation\validation-api\2.0.1.Final\validation-api-2.0.1.Final.jar;D:\repository\org\jboss\logging\jboss-logging\3.3.2.Final\jboss-logging-3.3.2.Final.jar;D:\repository\com\fasterxml\classmate\1.3.4\classmate-1.3.4.jar;D:\repository\org\springframework\spring-web\5.0.8.RELEASE\spring-web-5.0.8.RELEASE.jar;D:\repository\org\springframework\spring-beans\5.0.8.RELEASE\spring-beans-5.0.8.RELEASE.jar;D:\repository\org\springframework\spring-webmvc\5.0.8.RELEASE\spring-webmvc-5.0.8.RELEASE.jar;D:\repository\org\springframework\spring-aop\5.0.8.RELEASE\spring-aop-5.0.8.RELEASE.jar;D:\repository\org\springframework\spring-context\5.0.8.RELEASE\spring-context-5.0.8.RELEASE.jar;D:\repository\org\springframework\spring-expression\5.0.8.RELEASE\spring-expression-5.0.8.RELEASE.jar;D:\repository\junit\junit\4.12\junit-4.12.jar;D:\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;D:\repository\org\springframework\spring-core\5.0.8.RELEASE\spring-core-5.0.8.RELEASE.jar;D:\repository\org\springframework\spring-jcl\5.0.8.RELEASE\spring-jcl-5.0.8.RELEASE.jar;D:\repository\mysql\mysql-connector-java\5.1.46\mysql-connector-java-5.1.46.jar;D:\repository\org\springframework\boot\spring-boot-starter-data-jpa\2.0.4.RELEASE\spring-boot-starter-data-jpa-2.0.4.RELEASE.jar;D:\repository\org\springframework\boot\spring-boot-starter-aop\2.0.4.RELEASE\spring-boot-starter-aop-2.0.4.RELEASE.jar;D:\repository\org\aspectj\aspectjweaver\1.8.13\aspectjweaver-1.8.13.jar;D:\repository\org\springframework\boot\spring-boot-starter-jdbc\2.0.4.RELEASE\spring-boot-starter-jdbc-2.0.4.RELEASE.jar;D:\repository\com\zaxxer\HikariCP\2.7.9\HikariCP-2.7.9.jar;D:\repository\org\springframework\spring-jdbc\5.0.8.RELEASE\spring-jdbc-5.0.8.RELEASE.jar;D:\repository\org\hibernate\hibernate-core\5.2.17.Final\hibernate-core-5.2.17.Final.jar;D:\repository\org\hibernate\javax\persistence\hibernate-jpa-2.1-api\1.0.2.Final\hibernate-jpa-2.1-api-1.0.2.Final.jar;D:\repository\org\javassist\javassist\3.22.0-GA\javassist-3.22.0-GA.jar;D:\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;D:\repository\org\jboss\jandex\2.0.3.Final\jandex-2.0.3.Final.jar;D:\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar;D:\repository\org\hibernate\common\hibernate-commons-annotations\5.0.1.Final\hibernate-commons-annotations-5.0.1.Final.jar;D:\repository\javax\transaction\javax.transaction-api\1.2\javax.transaction-api-1.2.jar;D:\repository\org\springframework\data\spring-data-jpa\2.0.9.RELEASE\spring-data-jpa-2.0.9.RELEASE.jar;D:\repository\org\springframework\data\spring-data-commons\2.0.9.RELEASE\spring-data-commons-2.0.9.RELEASE.jar;D:\repository\org\springframework\spring-orm\5.0.8.RELEASE\spring-orm-5.0.8.RELEASE.jar;D:\repository\org\springframework\spring-tx\5.0.8.RELEASE\spring-tx-5.0.8.RELEASE.jar;D:\repository\org\springframework\spring-aspects\5.0.8.RELEASE\spring-aspects-5.0.8.RELEASE.jar;D:\repository\com\alibaba\dubbo\2.5.3\dubbo-2.5.3.jar;D:\repository\org\jboss\netty\netty\3.2.5.Final\netty-3.2.5.Final.jar;D:\repository\org\apache\zookeeper\zookeeper\3.4.6\zookeeper-3.4.6.jar;D:\repository\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;D:\repository\jline\jline\0.9.94\jline-0.9.94.jar;D:\repository\io\netty\netty\3.7.0.Final\netty-3.7.0.Final.jar;D:\repository\com\github\sgroschupf\zkclient\0.1\zkclient-0.1.jar;D:\repository\net\sf\json-lib\json-lib\2.4\json-lib-2.4-jdk15.jar;D:\repository\commons-beanutils\commons-beanutils\1.8.0\commons-beanutils-1.8.0.jar;D:\repository\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar;D:\repository\commons-lang\commons-lang\2.5\commons-lang-2.5.jar;D:\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;D:\repository\net\sf\ezmorph\ezmorph\1.0.6\ezmorph-1.0.6.jar;D:\repository\org\springframework\kafka\spring-kafka\1.1.1.RELEASE\spring-kafka-1.1.1.RELEASE.jar;D:\repository\org\springframework\spring-messaging\5.0.8.RELEASE\spring-messaging-5.0.8.RELEASE.jar;D:\repository\org\springframework\retry\spring-retry\1.2.2.RELEASE\spring-retry-1.2.2.RELEASE.jar;D:\repository\org\apache\kafka\kafka-clients\1.0.2\kafka-clients-1.0.2.jar;D:\repository\org\lz4\lz4-java\1.4\lz4-java-1.4.jar;D:\repository\org\xerial\snappy\snappy-java\1.1.4\snappy-java-1.1.4.jar;D:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.2.5\lib\idea_rt.jar" com.tzb.myspringboot.ServiceApplication
Connected to the target VM, address: '127.0.0.1:54880', transport: 'socket'
=====开始启动springboot项目=======
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.4.RELEASE)
2019-06-01 19:27:05.038 INFO 160 --- [ main] com.tzb.myspringboot.ServiceApplication : Starting ServiceApplication on T440S-PC with PID 160 (D:\workspace\dubbospringboot\dubbo-provider\target\classes started by Administrator in D:\workspace\dubbospringboot)
2019-06-01 19:27:05.046 INFO 160 --- [ main] com.tzb.myspringboot.ServiceApplication : No active profile set, falling back to default profiles: default
2019-06-01 19:27:05.176 INFO 160 --- [ main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@147e2ae7: startup date [Sat Jun 01 19:27:05 CST 2019]; root of context hierarchy
2019-06-01 19:27:06.601 INFO 160 --- [ main] o.s.b.f.xml.XmlBeanDefinitionReader : Loading XML bean definitions from class path resource [application-dubbo.xml]
2019-06-01 19:27:06.874 INFO 160 --- [ main] o.s.b.f.xml.XmlBeanDefinitionReader : Loading XML bean definitions from class path resource [application-dubbo-provider.xml]
2019-06-01 19:27:06.985 INFO 160 --- [ main] o.s.b.f.xml.XmlBeanDefinitionReader : Loading XML bean definitions from class path resource [application-dubbo-consumer.xml]
2019-06-01 19:27:07.382 ERROR 160 --- [ main] o.s.boot.SpringApplication : Application run failed
java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.kafka.KafkaAutoConfiguration.kafkaProducerListener
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:64) ~[spring-boot-autoconfigure-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:108) ~[spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:180) ~[spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:141) ~[spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:117) ~[spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:328) ~[spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:233) ~[spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:271) ~[spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:91) ~[spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:694) ~[spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532) ~[spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:762) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:398) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:330) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1258) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1246) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at com.tzb.myspringboot.ServiceApplication.main(ServiceApplication.java:27) [classes/:na]
Caused by: java.lang.IllegalStateException: Failed to introspect Class [org.springframework.boot.autoconfigure.kafka.KafkaAutoConfiguration] from ClassLoader [sun.misc.Launcher$AppClassLoader@58644d46]
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:659) ~[spring-core-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:556) ~[spring-core-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:541) ~[spring-core-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:599) ~[spring-core-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:718) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:659) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:627) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1489) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1012) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry.addBeanTypeForNonAliasDefinition(BeanTypeRegistry.java:180) ~[spring-boot-autoconfigure-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry.addBeanTypeForNonAliasDefinition(BeanTypeRegistry.java:160) ~[spring-boot-autoconfigure-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry.addBeanType(BeanTypeRegistry.java:153) ~[spring-boot-autoconfigure-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry.updateTypesIfNecessary(BeanTypeRegistry.java:215) ~[spring-boot-autoconfigure-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry.getNamesForType(BeanTypeRegistry.java:115) ~[spring-boot-autoconfigure-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.collectBeanNamesForType(OnBeanCondition.java:265) ~[spring-boot-autoconfigure-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getBeanNamesForType(OnBeanCondition.java:254) ~[spring-boot-autoconfigure-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchingBeans(OnBeanCondition.java:196) ~[spring-boot-autoconfigure-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:116) ~[spring-boot-autoconfigure-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47) ~[spring-boot-autoconfigure-2.0.4.RELEASE.jar:2.0.4.RELEASE]
... 17 common frames omitted
Caused by: java.lang.NoClassDefFoundError: org/springframework/kafka/transaction/KafkaTransactionManager
at java.lang.Class.getDeclaredMethods0(Native Method) ~[na:na]
at java.lang.Class.privateGetDeclaredMethods(Unknown Source) ~[na:na]
at java.lang.Class.getDeclaredMethods(Unknown Source) ~[na:na]
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:641) ~[spring-core-5.0.8.RELEASE.jar:5.0.8.RELEASE]
... 35 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.kafka.transaction.KafkaTransactionManager
at java.net.URLClassLoader$1.run(Unknown Source) ~[na:na]
at java.net.URLClassLoader$1.run(Unknown Source) ~[na:na]
at java.security.AccessController.doPrivileged(Native Method) ~[na:na]
at java.net.URLClassLoader.findClass(Unknown Source) ~[na:na]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:na]
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) ~[na:na]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:na]
... 39 common frames omitted
2019-06-01 19:27:07.384 INFO 160 --- [ main] ConfigServletWebServerApplicationContext : Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@147e2ae7: startup date [Sat Jun 01 19:27:05 CST 2019]; root of context hierarchy
2019-06-01 19:27:07.386 WARN 160 --- [ main] o.s.boot.SpringApplication : Unable to close ApplicationContext
java.lang.IllegalStateException: Failed to introspect Class [org.springframework.boot.autoconfigure.kafka.KafkaAutoConfiguration] from ClassLoader [sun.misc.Launcher$AppClassLoader@58644d46]
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:659) ~[spring-core-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:556) ~[spring-core-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:541) ~[spring-core-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:599) ~[spring-core-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:718) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:659) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:627) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1489) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:419) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:389) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:510) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:502) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1198) ~[spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.boot.SpringApplication.getExitCodeFromMappedException(SpringApplication.java:892) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.SpringApplication.getExitCodeFromException(SpringApplication.java:878) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.SpringApplication.handleExitCode(SpringApplication.java:864) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:813) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:341) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1258) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1246) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at com.tzb.myspringboot.ServiceApplication.main(ServiceApplication.java:27) [classes/:na]
Caused by: java.lang.NoClassDefFoundError: org/springframework/kafka/transaction/KafkaTransactionManager
at java.lang.Class.getDeclaredMethods0(Native Method) ~[na:na]
at java.lang.Class.privateGetDeclaredMethods(Unknown Source) ~[na:na]
at java.lang.Class.getDeclaredMethods(Unknown Source) ~[na:na]
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:641) ~[spring-core-5.0.8.RELEASE.jar:5.0.8.RELEASE]
... 20 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.kafka.transaction.KafkaTransactionManager
at java.net.URLClassLoader$1.run(Unknown Source) ~[na:na]
at java.net.URLClassLoader$1.run(Unknown Source) ~[na:na]
at java.security.AccessController.doPrivileged(Native Method) ~[na:na]
at java.net.URLClassLoader.findClass(Unknown Source) ~[na:na]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:na]
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) ~[na:na]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:na]
... 24 common frames omitted
Disconnected from the target VM, address: '127.0.0.1:54880', transport: 'socket'
Process finished with exit code 1
之前我有个项目springboot版本1.4却是不报错的:
org.springframework.boot
spring-boot-starter-parent
1.4.0.RELEASE
考虑到是版本问题:
修改为如下版本:
springboot版本:
org.springframework.boot
spring-boot-starter-parent
2.0.4.RELEASE
kafka版本:
org.springframework.kafka
spring-kafka
2.2.0.RELEASE
报错如下了:
D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\bin\java.exe -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:55027,suspend=y,server=n -javaagent:C:\Users\Administrator\.IdeaIC2018.2\system\captureAgent\debugger-agent.jar=file:/C:/Users/Administrator/AppData/Local/Temp/capture.props -Dfile.encoding=UTF-8 -classpath "D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\charsets.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\deploy.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\ext\access-bridge-64.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\ext\cldrdata.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\ext\dnsns.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\ext\jaccess.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\ext\jfxrt.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\ext\localedata.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\ext\nashorn.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\ext\sunec.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\ext\sunjce_provider.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\ext\sunmscapi.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\ext\sunpkcs11.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\ext\zipfs.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\javaws.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\jce.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\jfr.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\jfxswt.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\jsse.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\management-agent.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\plugin.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\resources.jar;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\lib\rt.jar;D:\workspace\dubbospringboot\dubbo-provider\target\classes;D:\workspace\dubbospringboot\dubbo-dao\target\classes;D:\workspace\dubbospringboot\dubbo-api\target\classes;D:\repository\log4j\log4j\1.2.17\log4j-1.2.17.jar;D:\workspace\dubbospringboot\dubbo-common\target\classes;D:\repository\org\apache\commons\commons-lang3\3.7\commons-lang3-3.7.jar;D:\repository\com\alibaba\fastjson\1.2.49\fastjson-1.2.49.jar;D:\repository\com\belerweb\pinyin4j\2.5.0\pinyin4j-2.5.0.jar;D:\repository\org\springframework\boot\spring-boot-starter-web\2.0.4.RELEASE\spring-boot-starter-web-2.0.4.RELEASE.jar;D:\repository\org\springframework\boot\spring-boot-starter\2.0.4.RELEASE\spring-boot-starter-2.0.4.RELEASE.jar;D:\repository\org\springframework\boot\spring-boot\2.0.4.RELEASE\spring-boot-2.0.4.RELEASE.jar;D:\repository\org\springframework\boot\spring-boot-autoconfigure\2.0.4.RELEASE\spring-boot-autoconfigure-2.0.4.RELEASE.jar;D:\repository\org\springframework\boot\spring-boot-starter-logging\2.0.4.RELEASE\spring-boot-starter-logging-2.0.4.RELEASE.jar;D:\repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;D:\repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;D:\repository\org\apache\logging\log4j\log4j-to-slf4j\2.10.0\log4j-to-slf4j-2.10.0.jar;D:\repository\org\apache\logging\log4j\log4j-api\2.10.0\log4j-api-2.10.0.jar;D:\repository\org\slf4j\jul-to-slf4j\1.7.25\jul-to-slf4j-1.7.25.jar;D:\repository\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;D:\repository\org\yaml\snakeyaml\1.19\snakeyaml-1.19.jar;D:\repository\org\springframework\boot\spring-boot-starter-json\2.0.4.RELEASE\spring-boot-starter-json-2.0.4.RELEASE.jar;D:\repository\com\fasterxml\jackson\core\jackson-databind\2.9.6\jackson-databind-2.9.6.jar;D:\repository\com\fasterxml\jackson\core\jackson-annotations\2.9.0\jackson-annotations-2.9.0.jar;D:\repository\com\fasterxml\jackson\core\jackson-core\2.9.6\jackson-core-2.9.6.jar;D:\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.9.6\jackson-datatype-jdk8-2.9.6.jar;D:\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.9.6\jackson-datatype-jsr310-2.9.6.jar;D:\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.9.6\jackson-module-parameter-names-2.9.6.jar;D:\repository\org\springframework\boot\spring-boot-starter-tomcat\2.0.4.RELEASE\spring-boot-starter-tomcat-2.0.4.RELEASE.jar;D:\repository\org\apache\tomcat\embed\tomcat-embed-core\8.5.32\tomcat-embed-core-8.5.32.jar;D:\repository\org\apache\tomcat\embed\tomcat-embed-el\8.5.32\tomcat-embed-el-8.5.32.jar;D:\repository\org\apache\tomcat\embed\tomcat-embed-websocket\8.5.32\tomcat-embed-websocket-8.5.32.jar;D:\repository\org\hibernate\validator\hibernate-validator\6.0.11.Final\hibernate-validator-6.0.11.Final.jar;D:\repository\javax\validation\validation-api\2.0.1.Final\validation-api-2.0.1.Final.jar;D:\repository\org\jboss\logging\jboss-logging\3.3.2.Final\jboss-logging-3.3.2.Final.jar;D:\repository\com\fasterxml\classmate\1.3.4\classmate-1.3.4.jar;D:\repository\org\springframework\spring-web\5.0.8.RELEASE\spring-web-5.0.8.RELEASE.jar;D:\repository\org\springframework\spring-beans\5.0.8.RELEASE\spring-beans-5.0.8.RELEASE.jar;D:\repository\org\springframework\spring-webmvc\5.0.8.RELEASE\spring-webmvc-5.0.8.RELEASE.jar;D:\repository\org\springframework\spring-aop\5.0.8.RELEASE\spring-aop-5.0.8.RELEASE.jar;D:\repository\org\springframework\spring-expression\5.0.8.RELEASE\spring-expression-5.0.8.RELEASE.jar;D:\repository\junit\junit\4.12\junit-4.12.jar;D:\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;D:\repository\org\springframework\spring-core\5.0.8.RELEASE\spring-core-5.0.8.RELEASE.jar;D:\repository\org\springframework\spring-jcl\5.0.8.RELEASE\spring-jcl-5.0.8.RELEASE.jar;D:\repository\mysql\mysql-connector-java\5.1.46\mysql-connector-java-5.1.46.jar;D:\repository\org\springframework\boot\spring-boot-starter-data-jpa\2.0.4.RELEASE\spring-boot-starter-data-jpa-2.0.4.RELEASE.jar;D:\repository\org\springframework\boot\spring-boot-starter-aop\2.0.4.RELEASE\spring-boot-starter-aop-2.0.4.RELEASE.jar;D:\repository\org\aspectj\aspectjweaver\1.8.13\aspectjweaver-1.8.13.jar;D:\repository\org\springframework\boot\spring-boot-starter-jdbc\2.0.4.RELEASE\spring-boot-starter-jdbc-2.0.4.RELEASE.jar;D:\repository\com\zaxxer\HikariCP\2.7.9\HikariCP-2.7.9.jar;D:\repository\org\springframework\spring-jdbc\5.0.8.RELEASE\spring-jdbc-5.0.8.RELEASE.jar;D:\repository\org\hibernate\hibernate-core\5.2.17.Final\hibernate-core-5.2.17.Final.jar;D:\repository\org\hibernate\javax\persistence\hibernate-jpa-2.1-api\1.0.2.Final\hibernate-jpa-2.1-api-1.0.2.Final.jar;D:\repository\org\javassist\javassist\3.22.0-GA\javassist-3.22.0-GA.jar;D:\repository\antlr\antlr\2.7.7\antlr-2.7.7.jar;D:\repository\org\jboss\jandex\2.0.3.Final\jandex-2.0.3.Final.jar;D:\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar;D:\repository\org\hibernate\common\hibernate-commons-annotations\5.0.1.Final\hibernate-commons-annotations-5.0.1.Final.jar;D:\repository\javax\transaction\javax.transaction-api\1.2\javax.transaction-api-1.2.jar;D:\repository\org\springframework\data\spring-data-jpa\2.0.9.RELEASE\spring-data-jpa-2.0.9.RELEASE.jar;D:\repository\org\springframework\data\spring-data-commons\2.0.9.RELEASE\spring-data-commons-2.0.9.RELEASE.jar;D:\repository\org\springframework\spring-orm\5.0.8.RELEASE\spring-orm-5.0.8.RELEASE.jar;D:\repository\org\springframework\spring-aspects\5.0.8.RELEASE\spring-aspects-5.0.8.RELEASE.jar;D:\repository\com\alibaba\dubbo\2.5.3\dubbo-2.5.3.jar;D:\repository\org\jboss\netty\netty\3.2.5.Final\netty-3.2.5.Final.jar;D:\repository\org\apache\zookeeper\zookeeper\3.4.6\zookeeper-3.4.6.jar;D:\repository\org\slf4j\slf4j-api\1.7.25\slf4j-api-1.7.25.jar;D:\repository\jline\jline\0.9.94\jline-0.9.94.jar;D:\repository\io\netty\netty\3.7.0.Final\netty-3.7.0.Final.jar;D:\repository\com\github\sgroschupf\zkclient\0.1\zkclient-0.1.jar;D:\repository\net\sf\json-lib\json-lib\2.4\json-lib-2.4-jdk15.jar;D:\repository\commons-beanutils\commons-beanutils\1.8.0\commons-beanutils-1.8.0.jar;D:\repository\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar;D:\repository\commons-lang\commons-lang\2.5\commons-lang-2.5.jar;D:\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;D:\repository\net\sf\ezmorph\ezmorph\1.0.6\ezmorph-1.0.6.jar;D:\repository\org\springframework\kafka\spring-kafka\2.2.0.RELEASE\spring-kafka-2.2.0.RELEASE.jar;D:\repository\org\springframework\spring-context\5.0.8.RELEASE\spring-context-5.0.8.RELEASE.jar;D:\repository\org\springframework\spring-messaging\5.0.8.RELEASE\spring-messaging-5.0.8.RELEASE.jar;D:\repository\org\springframework\spring-tx\5.0.8.RELEASE\spring-tx-5.0.8.RELEASE.jar;D:\repository\org\springframework\retry\spring-retry\1.2.2.RELEASE\spring-retry-1.2.2.RELEASE.jar;D:\repository\org\apache\kafka\kafka-clients\1.0.2\kafka-clients-1.0.2.jar;D:\repository\org\lz4\lz4-java\1.4\lz4-java-1.4.jar;D:\repository\org\xerial\snappy\snappy-java\1.1.4\snappy-java-1.1.4.jar;D:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.2.5\lib\idea_rt.jar" com.tzb.myspringboot.ServiceApplication
Connected to the target VM, address: '127.0.0.1:55027', transport: 'socket'
=====开始启动springboot项目=======
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.4.RELEASE)
2019-06-01 19:37:55.612 INFO 5848 --- [ main] com.tzb.myspringboot.ServiceApplication : Starting ServiceApplication on T440S-PC with PID 5848 (D:\workspace\dubbospringboot\dubbo-provider\target\classes started by Administrator in D:\workspace\dubbospringboot)
2019-06-01 19:37:55.619 INFO 5848 --- [ main] com.tzb.myspringboot.ServiceApplication : No active profile set, falling back to default profiles: default
2019-06-01 19:37:55.927 INFO 5848 --- [ main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@15a34df2: startup date [Sat Jun 01 19:37:55 CST 2019]; root of context hierarchy
2019-06-01 19:37:57.520 INFO 5848 --- [ main] o.s.b.f.xml.XmlBeanDefinitionReader : Loading XML bean definitions from class path resource [application-dubbo.xml]
2019-06-01 19:37:57.778 INFO 5848 --- [ main] o.s.b.f.xml.XmlBeanDefinitionReader : Loading XML bean definitions from class path resource [application-dubbo-provider.xml]
2019-06-01 19:37:57.885 INFO 5848 --- [ main] o.s.b.f.xml.XmlBeanDefinitionReader : Loading XML bean definitions from class path resource [application-dubbo-consumer.xml]
2019-06-01 19:37:59.108 INFO 5848 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.kafka.annotation.KafkaBootstrapConfiguration' of type [org.springframework.kafka.annotation.KafkaBootstrapConfiguration$$EnhancerBySpringCGLIB$$780b7c23] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-06-01 19:37:59.214 INFO 5848 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$a4596aa0] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-06-01 19:38:00.219 INFO 5848 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 7722 (http)
2019-06-01 19:38:00.274 INFO 5848 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2019-06-01 19:38:00.274 INFO 5848 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.32
2019-06-01 19:38:00.295 INFO 5848 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\bin;D:\Aimsen\myDevelopKit\1.software\jdk\64位\1.8\jdk-8-windows-x64\jre\bin;d:\Program Files\Git\cmd;D:\Program Files\PuTTY\;d:\Program Files\OpenVPN\bin;.]
2019-06-01 19:38:00.715 INFO 5848 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2019-06-01 19:38:00.717 INFO 5848 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 4795 ms
2019-06-01 19:38:00.874 INFO 5848 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Servlet dispatcherServlet mapped to [/]
2019-06-01 19:38:00.883 INFO 5848 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2019-06-01 19:38:00.883 INFO 5848 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2019-06-01 19:38:00.883 INFO 5848 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2019-06-01 19:38:00.883 INFO 5848 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2019-06-01 19:38:01.215 INFO 5848 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...
2019-06-01 19:38:01.700 INFO 5848 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.
2019-06-01 19:38:01.786 INFO 5848 --- [ main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'primaryPersistenceUnit'
2019-06-01 19:38:01.827 INFO 5848 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [
name: primaryPersistenceUnit
...]
2019-06-01 19:38:02.045 INFO 5848 --- [ main] org.hibernate.Version : HHH000412: Hibernate Core {5.2.17.Final}
2019-06-01 19:38:02.049 INFO 5848 --- [ main] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found
2019-06-01 19:38:02.329 INFO 5848 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
2019-06-01 19:38:02.602 INFO 5848 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
2019-06-01 19:38:03.556 INFO 5848 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'primaryPersistenceUnit'
2019-06-01 19:38:03.669 INFO 5848 --- [ main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'secondPersistenceUnit'
2019-06-01 19:38:03.670 INFO 5848 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [
name: secondPersistenceUnit
...]
2019-06-01 19:38:03.721 INFO 5848 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-2 - Starting...
2019-06-01 19:38:03.729 INFO 5848 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-2 - Start completed.
2019-06-01 19:38:03.729 INFO 5848 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
2019-06-01 19:38:03.781 INFO 5848 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'secondPersistenceUnit'
2019-06-01 19:38:05.182 INFO 5848 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-06-01 19:38:05.695 INFO 5848 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@15a34df2: startup date [Sat Jun 01 19:37:55 CST 2019]; root of context hierarchy
2019-06-01 19:38:05.783 WARN 5848 --- [ main] aWebConfiguration$JpaWebMvcConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2019-06-01 19:38:05.862 INFO 5848 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/test]}" onto public java.lang.String com.tzb.myspringboot.controller.TestController.test()
2019-06-01 19:38:05.869 INFO 5848 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2019-06-01 19:38:05.870 INFO 5848 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2019-06-01 19:38:05.941 INFO 5848 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-06-01 19:38:05.942 INFO 5848 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-06-01 19:38:06.481 WARN 5848 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'kafkaListenerContainerFactoryConfigurer' defined in class path resource [org/springframework/boot/autoconfigure/kafka/KafkaAnnotationDrivenConfiguration.class]: Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [org.springframework.boot.autoconfigure.kafka.ConcurrentKafkaListenerContainerFactoryConfigurer] from ClassLoader [sun.misc.Launcher$AppClassLoader@58644d46]
2019-06-01 19:38:06.482 INFO 5848 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
2019-06-01 19:38:06.485 INFO 5848 --- [ main] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'secondPersistenceUnit'
2019-06-01 19:38:06.486 INFO 5848 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-2 - Shutdown initiated...
2019-06-01 19:38:06.496 INFO 5848 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-2 - Shutdown completed.
2019-06-01 19:38:06.497 INFO 5848 --- [ main] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'primaryPersistenceUnit'
2019-06-01 19:38:06.497 INFO 5848 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
2019-06-01 19:38:06.501 INFO 5848 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
2019-06-01 19:38:06.504 INFO 5848 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2019-06-01 19:38:06.524 INFO 5848 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2019-06-01 19:38:06.534 ERROR 5848 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'kafkaListenerContainerFactoryConfigurer' defined in class path resource [org/springframework/boot/autoconfigure/kafka/KafkaAnnotationDrivenConfiguration.class]: Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [org.springframework.boot.autoconfigure.kafka.ConcurrentKafkaListenerContainerFactoryConfigurer] from ClassLoader [sun.misc.Launcher$AppClassLoader@58644d46]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:550) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$$Lambda$91/1517328406.getObject(Unknown Source) ~[na:na]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:759) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869) ~[spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:762) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:398) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:330) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1258) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1246) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE]
at com.tzb.myspringboot.ServiceApplication.main(ServiceApplication.java:27) [classes/:na]
Caused by: java.lang.IllegalStateException: Failed to introspect Class [org.springframework.boot.autoconfigure.kafka.ConcurrentKafkaListenerContainerFactoryConfigurer] from ClassLoader [sun.misc.Launcher$AppClassLoader@58644d46]
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:659) ~[spring-core-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.util.ReflectionUtils.doWithLocalMethods(ReflectionUtils.java:519) ~[spring-core-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.buildPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:421) ~[spring-orm-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:395) ~[spring-orm-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(PersistenceAnnotationBeanPostProcessor.java:333) ~[spring-orm-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:1013) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:547) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
... 16 common frames omitted
Caused by: java.lang.NoClassDefFoundError: org/springframework/kafka/listener/config/ContainerProperties
at java.lang.Class.getDeclaredMethods0(Native Method) ~[na:na]
at java.lang.Class.privateGetDeclaredMethods(Unknown Source) ~[na:na]
at java.lang.Class.getDeclaredMethods(Unknown Source) ~[na:na]
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:641) ~[spring-core-5.0.8.RELEASE.jar:5.0.8.RELEASE]
... 22 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.kafka.listener.config.ContainerProperties
at java.net.URLClassLoader$1.run(Unknown Source) ~[na:na]
at java.net.URLClassLoader$1.run(Unknown Source) ~[na:na]
at java.security.AccessController.doPrivileged(Native Method) ~[na:na]
at java.net.URLClassLoader.findClass(Unknown Source) ~[na:na]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:na]
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) ~[na:na]
at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:na]
... 26 common frames omitted
Disconnected from the target VM, address: '127.0.0.1:55027', transport: 'socket'
Process finished with exit code 1
解决:
将版本号注释掉。
不需要设置依赖包的版本,spring-boot-starter-parent已经帮我们添加了版本的管理。
org.springframework.kafka
spring-kafka
然后启动成功。
参考:
https://majing.io/posts/10000005201221
https://blog.csdn.net/wang_jun_jie/article/details/83824889