Skip to content

problem running pubsub spring / spring #4570

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jerryatzoom opened this issue Jan 19, 2021 · 7 comments · Fixed by #5508
Closed

problem running pubsub spring / spring #4570

jerryatzoom opened this issue Jan 19, 2021 · 7 comments · Fixed by #5508
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. samples Issues that are directly related to samples. type: question Request for information or clarification. Not an issue.

Comments

@jerryatzoom
Copy link

I downloaded the zip file and built and ran the maven project at https://github.com/GoogleCloudPlatform/java-docs-samples/tree/master/pubsub/spring and got the following error:

`Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-01-19 11:39:17.567 ERROR 98439 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :


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.springframework.cloud.stream.function.FunctionConfiguration$1.afterPropertiesSet(FunctionConfiguration.java:220)

The following method did not exist:

org.springframework.integration.dsl.IntegrationFlowBuilder.route(Ljava/lang/Class;Ljava/util/function/Function;)Lorg/springframework/integration/dsl/IntegrationFlowDefinition;

The method's class, org.springframework.integration.dsl.IntegrationFlowBuilder, is available from the following locations:

jar:file:/Users/jerry.thomas/.m2/repository/org/springframework/integration/spring-integration-core/5.4.3/spring-integration-core-5.4.3.jar!/org/springframework/integration/dsl/IntegrationFlowBuilder.class

The class hierarchy was loaded from the following locations:

org.springframework.integration.dsl.IntegrationFlowBuilder: file:/Users/jerry.thomas/.m2/repository/org/springframework/integration/spring-integration-core/5.4.3/spring-integration-core-5.4.3.jar
org.springframework.integration.dsl.IntegrationFlowDefinition: file:/Users/jerry.thomas/.m2/repository/org/springframework/integration/spring-integration-core/5.4.3/spring-integration-core-5.4.3.jar
org.springframework.integration.dsl.BaseIntegrationFlowDefinition: file:/Users/jerry.thomas/.m2/repository/org/springframework/integration/spring-integration-core/5.4.3/spring-integration-core-5.4.3.jar

Action:

Correct the classpath of your application so that it contains a single, compatible version of org.springframework.integration.dsl.IntegrationFlowBuilder`

In which file did you encounter the issue?

Did you change the file? If so, how?

No. I ran it as is.

@product-auto-label product-auto-label bot added the samples Issues that are directly related to samples. label Jan 19, 2021
@jerryatzoom
Copy link
Author

Going back to the version from October 2020 (2.3.5.RELEASE). Fixed the problem.

@lesv lesv added priority: p2 Moderately-important priority. Fix may not be included in next release. type: question Request for information or clarification. Not an issue. labels Jan 19, 2021
@lesv lesv assigned anguillanneuf and unassigned lesv Jan 19, 2021
@lesv
Copy link
Contributor

lesv commented Jan 19, 2021

@anguillanneuf PTAL

@anguillanneuf
Copy link
Member

anguillanneuf commented Jan 20, 2021

Thanks @jerryatzoom for reporting this. It looks like we have been updating our package versions to the non-release versions. The latest release version should be 2.3.8.RELEASE: https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-dependencies

@lesv Is there a way to tell the dependency bot to use the RELEASE version? I opened #4579 to track this.

@anguillanneuf
Copy link
Member

Fixed by #4580

@jerryatzoom
Copy link
Author

jerryatzoom commented Jan 20, 2021 via email

@ratulb
Copy link

ratulb commented Jun 27, 2021

  1. Launch a vm instance with default settings(debian buster).
  2. Install git
  3. git clone https://github.com/GoogleCloudPlatform/java-docs-samples.git
  4. /root/java-docs-samples/pubsub/spring
  5. apt install maven
  6. mvn clean spring-boot:run

This fails with following errors:

The following method did not exist:
'org.springframework.integration.dsl.IntegrationFlowDefinition org.springframework.integration.dsl.Integratio
nFlowBuilder.route(java.lang.Class, java.util.function.Function)'
The method's class, org.springframework.integration.dsl.IntegrationFlowBuilder, is available from the following l
ocations:
jar:file:/root/.m2/repository/org/springframework/integration/spring-integration-core/5.5.1/spring-integratio
n-core-5.5.1.jar!/org/springframework/integration/dsl/IntegrationFlowBuilder.class
The class hierarchy was loaded from the following locations:
org.springframework.integration.dsl.IntegrationFlowBuilder: file:/root/.m2/repository/org/springframework/int
egration/spring-integration-core/5.5.1/spring-integration-core-5.5.1.jar
org.springframework.integration.dsl.IntegrationFlowDefinition: file:/root/.m2/repository/org/springframework/
integration/spring-integration-core/5.5.1/spring-integration-core-5.5.1.jar
org.springframework.integration.dsl.BaseIntegrationFlowDefinition: file:/root/.m2/repository/org/springframework/integration/spring-integration-core/5.5.1/spring-integration-core-5.5.1.jar

@anguillanneuf
Copy link
Member

Thank you @ratulb for flagging this. Changing the version from 2.5.2 to the following should fix the problem:

      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>2.3.12.RELEASE</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. samples Issues that are directly related to samples. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants