Обработчик исключенийMethodArgumentResolversHolder - PullRequest
0 голосов
/ 27 декабря 2018

Не удается запустить приложение, получая это исключение ниже.

При попытке обновить Java и родительский загрузчик Spring Boot

 java.lang.IllegalStateException: Error processing condition on org.springframework.cloud.stream.config.BindingServiceConfiguration.bindingService
        at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:64)
        at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:108)
        at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:181)
        at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:141)
        at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader
Caused by: java.lang.NoClassDefFoundError: org/springframework/integration/config/HandlerMethodArgumentResolversHolder
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
    at java.lang.Class.getDeclaredMethods(Class.java:1975)
    at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:668)
    ... 39 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.integration.config.HandlerMethodArgumentResolversHolder
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 43 common frames omitted

pom.xml обновил родительский стартер весенней загрузки и Java

Нужно ли для этого добавлять какие-либо другие зависимости Maven?

Попытка добавления зависимости ядро-интеграция-ядро приводит к другому исключению.

<parent>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-parent</artifactId>
            <version>2.1.1.RELEASE</version>
            <relativePath /> <!-- lookup parent from repository -->
        </parent>

        <properties>
            <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
            <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
            <java.version>1.9</java.version>
            <springfox.version>2.6.0</springfox.version>
        </properties>


    <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-jersey</artifactId>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-web</artifactId>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-data-jpa</artifactId>

            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
            </dependency>
            <dependency>
             <groupId>org.springframework.data</groupId>
             <artifactId>spring-data-redis</artifactId>

         </dependency>

            <!-- Circuit Breaker -->
            <dependency>
                <groupId>io.pivotal.spring.cloud</groupId>
                <artifactId>spring-cloud-services-starter-circuit-breaker</artifactId>
            </dependency>

            <!-- Registry & Discovery -->
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
            </dependency>

            <!-- For Config Server -->
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-starter-config</artifactId>
            </dependency>

            <!-- spring reactor -->
            <dependency>
                <groupId>io.projectreactor</groupId>
                <artifactId>reactor-core</artifactId>
                <version>3.1.0.RELEASE</version>
            </dependency>

            <dependency>
                <groupId>commons-beanutils</groupId>
                <artifactId>commons-beanutils</artifactId>
                <version>1.9.3</version>
            </dependency>
                <dependency>
                <groupId>io.rest-assured</groupId>
                <artifactId>rest-assured</artifactId>
                <version>3.0.5</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-core</artifactId>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.7</version>
            </dependency>
            <!-- Excel Generation -->
            <dependency>
                <groupId>org.jxls</groupId>
                <artifactId>jxls-reader</artifactId>
                <version>2.0.2</version>
            </dependency>

            <!--Common jar dependency -->

            <dependency>
                <groupId>net.minidev</groupId>
                <artifactId>json-smart</artifactId>
                <version>2.2.1</version>
            </dependency>

            <dependency>
                <groupId>io.lettuce</groupId>
                <artifactId>lettuce-core</artifactId>
                <version>5.1.1.RELEASE</version> 
            </dependency>
            <dependency>
                <groupId>biz.paluch.redis</groupId>
                <artifactId>lettuce</artifactId>
                <version>4.4.1.Final</version>
            </dependency>
        </dependencies>

        <dependencyManagement>
            <dependencies>
                <!-- <dependency>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-dependencies</artifactId>
                    <version>2.1.1.RELEASE</version>
                    <type>pom</type>
                    <scope>import</scope>
                </dependency> -->
                <dependency>
                    <groupId>org.springframework.cloud</groupId>
                    <artifactId>spring-cloud-dependencies</artifactId>
                    <version>Finchley.SR2</version>
                    <type>pom</type>
                    <scope>import</scope>
                </dependency>
                <dependency>
                    <groupId>io.pivotal.spring.cloud</groupId>
                    <artifactId>spring-cloud-services-dependencies</artifactId>
                    <version>1.3.1.RELEASE</version>
                    <type>pom</type>
                    <scope>import</scope>
                </dependency>
            </dependencies>
        </dependencyManagement>

            </project>

Ответы [ 2 ]

0 голосов
/ 27 декабря 2018

Вы должны обновить ваше весеннее облако до Greenwich.RELEASE.Вы в настоящее время тянете Finchley.SR2, что вытягивает неправильный поток и зависимости SI, которые несовместимы с Spring Boot 2.1.x

0 голосов
/ 27 декабря 2018

Похоже, это проблема:

Проблема № 1521 Несовместимость с ядром интеграции пружины 5.1.0

Эта проблема воспроизводится, когда пружиназагрузочное обновление с 2.0.6 до 2.1.0 (также обновлена ​​версия для весенней интеграции)

...

Это известная проблема, и мы ничего не можем сделать, кроме как гарантировать, чтоопределенный выпуск SCSt работает с определенными выпусками других библиотек.Что усложняет этот случай, так это то, что, как видно из трассировки стека, эта конкретная несовместимость совершенно не связана с spring-cloud-stream, а скорее с spring-boot.Кроме того, мы только что выпустили spring-cloud-stream 2.1.0.RC1, которая основана на загрузке 2.1.0.RELEASE.Он использует SI 5.1.0.RELEASE.- https://spring.io/blog/2018/10/30/spring-cloud-stream-fishtown-rc1-2-1-0-rc1-release-announcement

Итак, я закрываю эту проблему.

Вот аналогичная проблема (также обновление для Spring Boot, также в Spring Cloud):

https://github.com/spring-projects/spring-boot/issues/15088

ПРЕДЛОЖЕНИЯ:

  1. Попробуйте построить другую версию Spring Boot.

  2. Если это работает, пожалуйста, напишитеназад, что вы найдете.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...