Caused by: java.lang.ClassNotFoundException: com.alibaba.dubbo.common.Version

Posted 宝宝佩恩天道

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Caused by: java.lang.ClassNotFoundException: com.alibaba.dubbo.common.Version相关的知识,希望对你有一定的参考价值。

        <dependency>
            <groupId>com.alibaba.boot</groupId>
            <artifactId>dubbo-spring-boot-starter</artifactId>
            <version>0.2.1.RELEASE</version>
        </dependency>

Caused by: java.lang.ClassNotFoundException: com.alibaba.dubbo.common.Version

java.lang.NoClassDefFoundError: com/alibaba/dubbo/common/Version
at com.alibaba.boot.dubbo.context.event.WelcomeLogoApplicationListener.buildBannerText(WelcomeLogoApplicationListener.java:79) ~[dubbo-spring-boot-autoconfigure-0.2.1.RELEASE.jar:0.2.1.RELEASE]
at com.alibaba.boot.dubbo.context.event.WelcomeLogoApplicationListener.onApplicationEvent(WelcomeLogoApplicationListener.java:60) ~[dubbo-spring-boot-autoconfigure-0.2.1.RELEASE.jar:0.2.1.RELEASE]
at com.alibaba.boot.dubbo.context.event.WelcomeLogoApplicationListener.onApplicationEvent(WelcomeLogoApplicationListener.java:41) ~[dubbo-spring-boot-autoconfigure-0.2.1.RELEASE.jar:0.2.1.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:76) ~[spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53) ~[spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:345) [spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) [spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
at com.xxx.ticket.ProviderTicketApplication.main(ProviderTicketApplication.java:15) [classes/:na]
Caused by: java.lang.ClassNotFoundException: com.alibaba.dubbo.common.Version
at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_112]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_112]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[na:1.8.0_112]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_112]
... 14 common frames omitted

报错并且dubbo-spring-boot-starter 0.2.1RELEASE 版本中没有 @Service //com.alibaba.dubbo.config.annotation 注解,将 版本换为 dubbo-spring-boot-starter 0.2.0,后启动项目正确;

        <dependency>
            <groupId>com.alibaba.boot</groupId>
            <artifactId>dubbo-spring-boot-starter</artifactId>
            <!--<version>0.2.1.RELEASE</version>-->
            <version>0.2.0</version>
        </dependency>

以上是关于Caused by: java.lang.ClassNotFoundException: com.alibaba.dubbo.common.Version的主要内容,如果未能解决你的问题,请参考以下文章

Mathematical Problems Caused by CCD

Caused by SSLError

Caused by: java.lang.NoClassDefFoundError:

caused by a circular import.

异常Caused by: java.lang.ClassNotFoundException: org.springframework.dao.DataIntegrityViolationExcep

Caused by org hibernate DuplicateMappingException Duplicat