zoukankan      html  css  js  c++  java
  • elastic-job和spring cloud版本冲突2

    ***************************
    APPLICATION FAILED TO START
    ***************************

    Description:

    An attempt was made to call a method that does not exist. The attempt was made from the following location:

    org.apache.curator.framework.listen.ListenerContainer.addListener(ListenerContainer.java:41)

    The following method did not exist:

    com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor()Lcom/google/common/util/concurrent/ListeningExecutorService;

    The method's class, com.google.common.util.concurrent.MoreExecutors, is available from the following locations:

    jar:file:/J:/program/myprogram/maven/repository/com/google/guava/guava/28.2-android/guava-28.2-android.jar!/com/google/common/util/concurrent/MoreExecutors.class

    It was loaded from the following location:

    file:/J:/program/myprogram/maven/repository/com/google/guava/guava/28.2-android/guava-28.2-android.jar


    Action:

    Correct the classpath of your application so that it contains a single, compatible version of com.google.common.util.concurrent.MoreExecutors

    Disconnected from the target VM, address: '127.0.0.1:1109', transport: 'socket'

    Process finished with exit code 1

    解决办法

    把 com.google.guava 版本降低到20.0以下就可以了

    我引用的版本是

        <properties>
            <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
            <java.version>1.8</java.version>
            <elastic-job.version>2.1.5</elastic-job.version>
            <curator.version>2.10.0</curator.version>
        </properties>
    
    
    
    
    <!-- 任务调度elastic-job开始 -->
            <dependency>
                <groupId>com.dangdang</groupId>
                <artifactId>elastic-job-lite-core</artifactId>
                <version>${elastic-job.version}</version>
                <exclusions>
                    <exclusion>
                        <artifactId>curator-client</artifactId>
                        <groupId>org.apache.curator</groupId>
                    </exclusion>
                    <exclusion>
                        <artifactId>curator-framework</artifactId>
                        <groupId>org.apache.curator</groupId>
                    </exclusion>
                    <exclusion>
                        <artifactId>curator-recipes</artifactId>
                        <groupId>org.apache.curator</groupId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.curator</groupId>
                <artifactId>curator-framework</artifactId>
                <version>${curator.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.curator</groupId>
                <artifactId>curator-client</artifactId>
                <version>${curator.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.curator</groupId>
                <artifactId>curator-recipes</artifactId>
                <version>${curator.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>20.0</version>
            </dependency>
            <!-- 任务调度elastic-job结束 -->
    
    
    
      <dependencyManagement>
            <dependencies>
                <dependency>
                    <groupId>org.springframework.cloud</groupId>
                    <artifactId>spring-cloud-dependencies</artifactId>
                    <version>Hoxton.SR3</version>
                    <type>pom</type>
                    <scope>import</scope>
                </dependency>
                <dependency>
                    <groupId>com.alibaba.cloud</groupId>
                    <artifactId>spring-cloud-alibaba-dependencies</artifactId>
                    <version>2.2.1.RELEASE</version>
                    <type>pom</type>
                    <scope>import</scope>
                </dependency>
            </dependencies>
        </dependencyManagement>
        <build>
            <finalName>${project.artifactId}</finalName>
            <plugins>
                <!-- 编译插件 -->
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                </plugin>
            </plugins>
        </build>
  • 相关阅读:
    Linux mint下firefox安装flashplayer
    Linux mint下安装iNode遇到的几个问题
    FireFox浏览器访问ip6域名的问题
    用牛顿迭代法和二分法求方程的根
    VC6工程向导制作
    配置多个版本的python的系统环境变量
    C语言习题解答:求某一天为一年中的第几天
    使用Python求解水仙花问题
    Python语言中round函数的一个疑惑
    Linux下安卓手机管理软件QtADB的使用
  • 原文地址:https://www.cnblogs.com/zhian/p/14980414.html
Copyright © 2011-2022 走看看