2017-09-22 95 views
0

我已經更新了spring-boot依賴到最新版本(1.5.7),我無法啓動我的spring - 啓動應用程序!我得到這個例外java.lang.ClassNotFoundException:org.eclipse.jgit.api.TransportConfigCallback with spring-boot 1.5.7

2017-09-22 19:06:59.230 ERROR 43628 --- [   main] o.s.boot.SpringApplication    : Application startup failed 

java.lang.NoClassDefFoundError: org/eclipse/jgit/api/TransportConfigCallback 
    at java.lang.Class.getDeclaredMethods0(Native Method) ~[na:1.8.0_40] 
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) ~[na:1.8.0_40] 
    at java.lang.Class.getDeclaredMethods(Class.java:1975) ~[na:1.8.0_40] 
    at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:613) ~[spring-core-4.3.11.RELEASE.jar:4.3.11.RELEASE] 
    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:524) ~[spring-core-4.3.11.RELEASE.jar:4.3.11.RELEASE] 
    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:510) ~[spring-core-4.3.11.RELEASE.jar:4.3.11.RELEASE] 
    at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:570) ~[spring-core-4.3.11.RELEASE.jar:4.3.11.RELEASE] 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:697) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:640) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:609) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] 
    at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1484) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] 
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:425) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] 
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:395) ~[spring-beans-4.3.11.RELEASE.jar:4.3.11.RELEASE] 
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:96) ~[spring-context-4.3.11.RELEASE.jar:4.3.11.RELEASE] 
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:687) ~[spring-context-4.3.11.RELEASE.jar:4.3.11.RELEASE] 
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:525) ~[spring-context-4.3.11.RELEASE.jar:4.3.11.RELEASE] 
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] 
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] 
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] 
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] 
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] 
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.7.RELEASE.jar:1.5.7.RELEASE] 
    at com.verifone.pos.mms.MmsConfigServerApplication.main(MmsConfigServerApplication.java:12) [classes/:na] 
Caused by: java.lang.ClassNotFoundException: org.eclipse.jgit.api.TransportConfigCallback 
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_40] 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_40] 
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[na:1.8.0_40] 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_40] 
    ... 23 common frames omitted 

任何想法?

+0

請提供您的POM。 –

+0

感謝達人提供反饋意見。我無法使用pom更新我的文章(stackoverflow正在抱怨我的文章主要包含代碼!)。但是pom與Spring初始化器依賴雲配置生成的相同。 – IKane

+0

啊,你至少能提供'dependencies'嗎? –

回答

1

我終於可以通過添加以下的依賴來解決這個問題:

<!-- https://mvnrepository.com/artifact/org.eclipse.jgit/org.eclipse.jgit --> 
<dependency> 
    <groupId>org.eclipse.jgit</groupId> 
    <artifactId>org.eclipse.jgit</artifactId> 
    <version>4.8.0.201706111038-r</version> 
</dependency>