Closed henry-aj-jones closed 2 years ago
For ClassNotFoundException, we develop a tool called Linkage Checker. Would you try this?
https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/Linkage-Checker-Enforcer-Rule
@henry-aj-jones Thanks for your patience.
Spring Cloud GCP is no longer part of the Spring Cloud release train since June, 2021.
The compatibility with Spring Cloud/Spring Boot/Spring Framework versions and Spring Cloud GCP versions is outlined here.
Please check out this migration guide for migrating from Spring Cloud GCP 1.x to 2.x.
For spring-cloud-gcp-starter-pubsub
specifically, you can also check out these examples and this tutorial.
I have an issue when I try and publish a message to gcp pubsub:
Environment details
OS type and version:
Red Hat Linux
Java version:
OpenJDK Runtime Environment (build 1.8.0_252-b09) OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)
google-cloud-java version(s):
Looking at
mvn dependency:tree
[INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:2.2.5.RELEASE:compile [INFO] | +- org.springframework.boot:spring-boot-starter-aop:jar:2.2.5.RELEASE:compile [INFO] | | +- org.springframework:spring-aop:jar:5.2.4.RELEASE:compile [INFO] | | - org.aspectj:aspectjweaver:jar:1.9.5:compile [INFO] | +- org.springframework.boot:spring-boot-starter-jdbc:jar:2.2.5.RELEASE:compile [INFO] | | +- com.zaxxer:HikariCP:jar:3.4.2:compile [INFO] | | - org.springframework:spring-jdbc:jar:5.2.4.RELEASE:compile [INFO] | +- jakarta.activation:jakarta.activation-api:jar:1.2.2:compile [INFO] | +- jakarta.persistence:jakarta.persistence-api:jar:2.2.3:compile [INFO] | +- jakarta.transaction:jakarta.transaction-api:jar:1.3.3:compile [INFO] | +- org.hibernate:hibernate-core:jar:5.4.12.Final:compile [INFO] | | +- org.jboss.logging:jboss-logging:jar:3.4.1.Final:compile [INFO] | | +- org.javassist:javassist:jar:3.24.0-GA:compile [INFO] | | +- net.bytebuddy:byte-buddy:jar:1.10.8:compile [INFO] | | +- antlr:antlr:jar:2.7.7:compile [INFO] | | +- org.jboss:jandex:jar:2.1.1.Final:compile [INFO] | | +- com.fasterxml:classmate:jar:1.5.1:compile [INFO] | | +- org.dom4j:dom4j:jar:2.1.1:compile [INFO] | | +- org.hibernate.common:hibernate-commons-annotations:jar:5.1.0.Final:compile [INFO] | | - org.glassfish.jaxb:jaxb-runtime:jar:2.3.2:compile [INFO] | | +- org.glassfish.jaxb:txw2:jar:2.3.2:compile [INFO] | | +- com.sun.istack:istack-commons-runtime:jar:3.0.8:compile [INFO] | | +- org.jvnet.staxex:stax-ex:jar:1.8.1:compile [INFO] | | - com.sun.xml.fastinfoset:FastInfoset:jar:1.2.16:compile [INFO] | +- org.springframework.data:spring-data-jpa:jar:2.2.5.RELEASE:compile [INFO] | | +- org.springframework.data:spring-data-commons:jar:2.2.5.RELEASE:compile [INFO] | | +- org.springframework:spring-orm:jar:5.2.4.RELEASE:compile [INFO] | | +- org.springframework:spring-tx:jar:5.2.4.RELEASE:compile [INFO] | | - org.springframework:spring-beans:jar:5.2.4.RELEASE:compile [INFO] | - org.springframework:spring-aspects:jar:5.2.4.RELEASE:compile [INFO] +- mysql:mysql-connector-java:jar:8.0.18:compile [INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:2.2.5.RELEASE:compile [INFO] | +- org.springframework.boot:spring-boot-starter:jar:2.2.5.RELEASE:compile [INFO] | | +- org.springframework.boot:spring-boot:jar:2.2.5.RELEASE:compile [INFO] | | +- org.springframework.boot:spring-boot-autoconfigure:jar:2.2.5.RELEASE:compile [INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:2.2.5.RELEASE:compile [INFO] | | | +- ch.qos.logback:logback-classic:jar:1.2.3:compile [INFO] | | | | - ch.qos.logback:logback-core:jar:1.2.3:compile [INFO] | | | +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.12.1:compile [INFO] | | | | - org.apache.logging.log4j:log4j-api:jar:2.12.1:compile [INFO] | | | - org.slf4j:jul-to-slf4j:jar:1.7.30:compile [INFO] | | +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile [INFO] | | - org.yaml:snakeyaml:jar:1.25:runtime [INFO] | +- org.springframework.boot:spring-boot-actuator-autoconfigure:jar:2.2.5.RELEASE:compile [INFO] | | +- org.springframework.boot:spring-boot-actuator:jar:2.2.5.RELEASE:compile [INFO] | | +- com.fasterxml.jackson.core:jackson-databind:jar:2.10.2:compile [INFO] | | | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.10.2:compile [INFO] | | | - com.fasterxml.jackson.core:jackson-core:jar:2.10.2:compile [INFO] | | - com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.10.2:compile [INFO] | - io.micrometer:micrometer-core:jar:1.3.5:compile [INFO] | +- org.hdrhistogram:HdrHistogram:jar:2.1.11:compile [INFO] | - org.latencyutils:LatencyUtils:jar:2.0.3:compile [INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.2.5.RELEASE:compile [INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:2.2.5.RELEASE:compile [INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.10.2:compile [INFO] | | - com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.10.2:compile [INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.2.5.RELEASE:compile [INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.31:compile [INFO] | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:9.0.31:compile [INFO] | | - org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.31:compile [INFO] | +- org.springframework.boot:spring-boot-starter-validation:jar:2.2.5.RELEASE:compile [INFO] | | +- jakarta.validation:jakarta.validation-api:jar:2.0.2:compile [INFO] | | - org.hibernate.validator:hibernate-validator:jar:6.0.18.Final:compile [INFO] | +- org.springframework:spring-web:jar:5.2.4.RELEASE:compile [INFO] | - org.springframework:spring-webmvc:jar:5.2.4.RELEASE:compile [INFO] | - org.springframework:spring-expression:jar:5.2.4.RELEASE:compile [INFO] +- org.springframework.cloud:spring-cloud-gcp-starter-pubsub:jar:1.2.3.RELEASE:compile [INFO] | +- org.springframework.cloud:spring-cloud-gcp-starter:jar:1.2.3.RELEASE:compile [INFO] | | +- org.springframework.cloud:spring-cloud-gcp-core:jar:1.2.3.RELEASE:compile [INFO] | | | - com.google.cloud:google-cloud-core:jar:1.93.4:compile [INFO] | | | +- com.google.protobuf:protobuf-java-util:jar:3.11.4:compile [INFO] | | | +- com.google.auth:google-auth-library-credentials:jar:0.20.0:compile [INFO] | | | +- com.google.auth:google-auth-library-oauth2-http:jar:0.20.0:compile [INFO] | | | - com.google.http-client:google-http-client-jackson2:jar:1.35.0:compile [INFO] | | - org.springframework.cloud:spring-cloud-gcp-autoconfigure:jar:1.2.3.RELEASE:compile [INFO] | +- org.springframework.cloud:spring-cloud-gcp-pubsub:jar:1.2.3.RELEASE:compile [INFO] | | - com.google.cloud:google-cloud-pubsub:jar:1.105.0:compile [INFO] | | +- io.grpc:grpc-api:jar:1.29.0:compile [INFO] | | | +- io.grpc:grpc-context:jar:1.29.0:compile [INFO] | | | - org.codehaus.mojo:animal-sniffer-annotations:jar:1.18:compile [INFO] | | +- io.grpc:grpc-stub:jar:1.29.0:compile [INFO] | | +- io.grpc:grpc-protobuf:jar:1.29.0:compile [INFO] | | | - io.grpc:grpc-protobuf-lite:jar:1.29.0:compile [INFO] | | +- com.google.api:api-common:jar:1.9.0:compile [INFO] | | | - javax.annotation:javax.annotation-api:jar:1.3.2:compile [INFO] | | +- com.google.protobuf:protobuf-java:jar:3.11.4:compile [INFO] | | +- com.google.api.grpc:proto-google-common-protos:jar:1.17.0:compile [INFO] | | +- com.google.api.grpc:proto-google-cloud-pubsub-v1:jar:1.87.0:compile [INFO] | | +- com.google.api.grpc:proto-google-iam-v1:jar:0.13.0:compile [INFO] | | +- com.google.guava:guava:jar:29.0-android:compile [INFO] | | | +- com.google.guava:failureaccess:jar:1.0.1:compile [INFO] | | | +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile [INFO] | | | +- org.checkerframework:checker-compat-qual:jar:2.5.5:compile [INFO] | | | - com.google.j2objc:j2objc-annotations:jar:1.3:compile [INFO] | | +- com.google.api:gax:jar:1.56.0:compile [INFO] | | +- com.google.api:gax-grpc:jar:1.56.0:compile [INFO] | | | +- io.grpc:grpc-auth:jar:1.29.0:compile [INFO] | | | +- io.grpc:grpc-netty-shaded:jar:1.29.0:compile [INFO] | | | - io.grpc:grpc-alts:jar:1.29.0:compile [INFO] | | | +- io.grpc:grpc-grpclb:jar:1.29.0:compile [INFO] | | | - org.conscrypt:conscrypt-openjdk-uber:jar:2.2.1:compile [INFO] | | +- org.threeten:threetenbp:jar:1.4.3:compile [INFO] | | +- com.google.code.findbugs:jsr305:jar:3.0.2:compile [INFO] | | +- io.opencensus:opencensus-api:jar:0.26.0:compile [INFO] | | +- io.grpc:grpc-core:jar:1.29.0:compile [INFO] | | | +- com.google.android:annotations:jar:4.1.1.4:compile [INFO] | | | - io.perfmark:perfmark-api:jar:0.19.0:compile [INFO] | | +- com.google.errorprone:error_prone_annotations:jar:2.3.4:compile [INFO] | | +- com.google.auto.value:auto-value-annotations:jar:1.7:compile [INFO] | | - com.google.http-client:google-http-client:jar:1.35.0:compile [INFO] | | - io.opencensus:opencensus-contrib-http-util:jar:0.24.0:compile [INFO] | - org.slf4j:slf4j-api:jar:1.7.30:compile [INFO] +- org.springframework.boot:spring-boot-starter-amqp:jar:2.2.5.RELEASE:compile [INFO] | +- org.springframework:spring-messaging:jar:5.2.4.RELEASE:compile [INFO] | - org.springframework.amqp:spring-rabbit:jar:2.2.5.RELEASE:compile [INFO] | - org.springframework.amqp:spring-amqp:jar:2.2.5.RELEASE:compile [INFO] +- org.springframework.amqp:spring-rabbit-junit:jar:2.2.5.RELEASE:test [INFO] | +- com.rabbitmq:amqp-client:jar:5.7.3:compile [INFO] | +- com.rabbitmq:http-client:jar:3.2.0.RELEASE:test [INFO] | +- org.assertj:assertj-core:jar:3.13.2:test [INFO] | +- org.springframework:spring-core:jar:5.2.4.RELEASE:compile [INFO] | | - org.springframework:spring-jcl:jar:5.2.4.RELEASE:compile [INFO] | - org.springframework:spring-test:jar:5.2.4.RELEASE:compile [INFO] +- org.springframework.amqp:spring-rabbit-test:jar:2.2.5.RELEASE:test [INFO] | +- org.hamcrest:hamcrest-core:jar:2.1:compile [INFO] | +- org.hamcrest:hamcrest-library:jar:2.1:test [INFO] | - org.mockito:mockito-core:jar:3.1.0:test [INFO] | +- net.bytebuddy:byte-buddy-agent:jar:1.10.8:test [INFO] | - org.objenesis:objenesis:jar:2.6:test [INFO] +- org.springframework.boot:spring-boot-starter-integration:jar:2.2.5.RELEASE:compile [INFO] | - org.springframework.integration:spring-integration-core:jar:5.2.4.RELEASE:compile [INFO] | +- io.projectreactor:reactor-core:jar:3.3.3.RELEASE:compile [INFO] | | - org.reactivestreams:reactive-streams:jar:1.0.3:compile [INFO] | - org.springframework.retry:spring-retry:jar:1.2.5.RELEASE:compile [INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.2.5.RELEASE:test [INFO] | +- org.springframework.boot:spring-boot-test:jar:2.2.5.RELEASE:test [INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.2.5.RELEASE:test [INFO] | +- com.jayway.jsonpath:json-path:jar:2.4.0:test [INFO] | | - net.minidev:json-smart:jar:2.3:test [INFO] | | - net.minidev:accessors-smart:jar:1.2:test [INFO] | | - org.ow2.asm:asm:jar:5.0.4:test [INFO] | +- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.2:compile [INFO] | +- org.junit.jupiter:junit-jupiter:jar:5.5.2:test [INFO] | | +- org.junit.jupiter:junit-jupiter-params:jar:5.5.2:test [INFO] | | - org.junit.jupiter:junit-jupiter-engine:jar:5.5.2:test [INFO] | | - org.junit.platform:junit-platform-engine:jar:1.5.2:test [INFO] | +- org.mockito:mockito-junit-jupiter:jar:3.1.0:test [INFO] | +- org.hamcrest:hamcrest:jar:2.1:compile [INFO] | +- org.skyscreamer:jsonassert:jar:1.5.0:test [INFO] | | - com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test [INFO] | - org.xmlunit:xmlunit-core:jar:2.6.3:test [INFO] +- org.apache.commons:commons-lang3:jar:3.9:compile [INFO] +- org.testcontainers:mysql:jar:1.12.5:compile [INFO] | - org.testcontainers:jdbc:jar:1.12.5:compile [INFO] | - org.testcontainers:database-commons:jar:1.12.5:compile [INFO] +- org.testcontainers:junit-jupiter:jar:1.14.2:compile [INFO] | +- org.testcontainers:testcontainers:jar:1.14.2:compile [INFO] | | +- junit:junit:jar:4.12:compile [INFO] | | +- org.jetbrains:annotations:jar:19.0.0:compile [INFO] | | +- org.apache.commons:commons-compress:jar:1.20:compile [INFO] | | +- org.rnorth.duct-tape:duct-tape:jar:1.0.8:compile [INFO] | | +- org.rnorth.visible-assertions:visible-assertions:jar:2.1.2:compile [INFO] | | +- org.rnorth:tcp-unix-socket-proxy:jar:1.0.2:compile [INFO] | | | +- com.kohlschutter.junixsocket:junixsocket-native-common:jar:2.0.4:compile [INFO] | | | | - org.scijava:native-lib-loader:jar:2.0.2:compile [INFO] | | | - com.kohlschutter.junixsocket:junixsocket-common:jar:2.0.4:compile [INFO] | | - net.java.dev.jna:jna-platform:jar:4.5.2:compile [INFO] | | - net.java.dev.jna:jna:jar:4.5.2:compile [INFO] | - org.junit.jupiter:junit-jupiter-api:jar:5.5.2:compile [INFO] | +- org.apiguardian:apiguardian-api:jar:1.1.0:compile [INFO] | +- org.opentest4j:opentest4j:jar:1.2.0:compile [INFO] | - org.junit.platform:junit-platform-commons:jar:1.5.2:compile [INFO] +- net.mohc.testingtools:testingtools:jar:1.0.0:compile [INFO] | - org.springframework:spring-context:jar:5.2.4.RELEASE:compile [INFO] +- com.konghq:unirest-java:jar:standalone:3.7.02:compile [INFO] | +- org.apache.httpcomponents:httpclient:jar:4.5.11:compile [INFO] | | +- org.apache.httpcomponents:httpcore:jar:4.4.13:compile [INFO] | | - commons-codec:commons-codec:jar:1.13:compile [INFO] | +- org.apache.httpcomponents:httpmime:jar:4.5.11:compile [INFO] | +- org.apache.httpcomponents:httpcore-nio:jar:4.4.13:compile [INFO] | +- org.apache.httpcomponents:httpasyncclient:jar:4.1.4:compile [INFO] | - com.google.code.gson:gson:jar:2.8.6:compile [INFO] +- io.github.resilience4j:resilience4j-core:jar:1.4.0:compile [INFO] | - io.vavr:vavr:jar:0.10.2:compile [INFO] | - io.vavr:vavr-match:jar:0.10.2:compile [INFO] +- io.github.resilience4j:resilience4j-retry:jar:1.4.0:compile [INFO] +- io.github.resilience4j:resilience4j-circuitbreaker:jar:1.4.0:compile [INFO] - io.github.resilience4j:resilience4j-timelimiter:jar:1.4.0:compile
Stack trace
With:
java.net.preferIPv4Stack=true
External references such as API reference guides used
This is using the spring boot GCP libs
Any additional information below
Thanks!