当前位置:   article > 正文

Disconnected from the target VM

disconnected from the target vm

Disconnected from the target VM, address: ‘127.0.0.1:3177’, transport: ‘socket’

前排提示:Disconnected from the target VM是一种常见的错误,导致这个错误可能是方方面面,请根据项目情况和日志进行分析,没有日志的项目建议构建日志。

Connected to the target VM, address: '127.0.0.1:3177', transport: 'socket'
Disconnected from the target VM, address: '127.0.0.1:3177', transport: 'socket'
Process finished with exit code 1
  • 1
  • 2
  • 3

升级项目的jar包版本,从spring-boot-dependencies从2.1.6.RELEASE升级到2.7.0从而保证引用的spring核心jar包的版本升级从5.1.8.RELEASE升级到5.3.20,升级完成后项目无法启动

解决方法

Caused by: java.lang.ClassNotFoundException: org.springframework.boot.context.properties.ConfigurationBeanFactoryMetadata
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[?:1.8.0_181]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[?:1.8.0_181]
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) ~[?:1.8.0_181]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_181]
	at org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration.configurationPropertiesBeans(ConfigurationPropertiesRebinderAutoConfiguration.java:56) ~[spring-cloud-context-2.1.2.RELEASE.jar:2.1.2.RELEASE]
	at org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$b521b47.CGLIB$configurationPropertiesBeans$3(<generated>) ~[spring-cloud-context-2.1.2.RELEASE.jar:2.1.2.RELEASE]
	at org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$b521b47$$FastClassBySpringCGLIB$$f09598d2.invoke(<generated>) ~[spring-cloud-context-2.1.2.RELEASE.jar:2.1.2.RELEASE]
	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-5.3.20.jar:5.3.20]
	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331) ~[spring-context-5.3.20.jar:5.3.20]
	at org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$b521b47.configurationPropertiesBeans(<generated>) ~[spring-cloud-context-2.1.2.RELEASE.jar:2.1.2.RELEASE]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.3.20.jar:5.3.20]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[spring-beans-5.3.20.jar:5.3.20]
	... 32 more
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18

根据项目报错搜索相关文章可知,springboot版本升级后,springcloud的版本没有升级,相应的类在不对应的版本中找不到,升级spring-cloud-dependencies到版本2021.0.0

<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-dependencies</artifactId>
    <version>2021.0.0</version>
    <type>pom</type>
    <scope>import</scope>
</dependency>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家小花儿/article/detail/260122
推荐阅读
相关标签
  

闽ICP备14008679号