spring-attic / spring-cloud-gcp

Integration for Google Cloud Platform APIs with Spring
Apache License 2.0
706 stars 693 forks source link

Build error with spring boot project #307

Closed santhh closed 6 years ago

santhh commented 6 years ago

Hello: Any idea about this error below? I keep getting this when tried a sample project for spring boot + GCP pub sub. Pretty much tried everything I could do so far. Any help is appreciated.

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pubSubAdmin' defined in class path resource [org/springframework/cloud/gcp/pubsub/autoconfig/GcpPubSubAutoConfiguration.class]: Unsatisfied dependency expressed through method 'pubSubAdmin' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'topicAdminClient' defined in class path resource [org/springframework/cloud/gcp/pubsub/autoconfig/GcpPubSubAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.google.cloud.pubsub.v1.TopicAdminClient]: Factory method 'topicAdminClient' threw exception; nested exception is java.lang.NoClassDefFoundError: org/threeten/bp/Duration
    at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:467) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867) ~[spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) ~[spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) [spring-boot-1.5.9.RELEASE.jar:1.5.9.RELEASE]
    at hello.PubSubApplication.main(PubSubApplication.java:31) [classes/:na]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'topicAdminClient' defined in class path resource [org/springframework/cloud/gcp/pubsub/autoconfig/GcpPubSubAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.google.cloud.pubsub.v1.TopicAdminClient]: Factory method 'topicAdminClient' threw exception; nested exception is java.lang.NoClassDefFoundError: org/threeten/bp/Duration
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    ... 19 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.google.cloud.pubsub.v1.TopicAdminClient]: Factory method 'topicAdminClient' threw exception; nested exception is java.lang.NoClassDefFoundError: org/threeten/bp/Duration
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    ... 32 common frames omitted
Caused by: java.lang.NoClassDefFoundError: org/threeten/bp/Duration
    at com.google.api.gax.retrying.RetrySettings.newBuilder(RetrySettings.java:134) ~[gax-1.9.0.jar:na]
    at com.google.cloud.pubsub.v1.TopicAdminSettings$Builder.<clinit>(TopicAdminSettings.java:535) ~[google-cloud-pubsub-0.26.0-beta.jar:0.26.0-beta]
    at com.google.cloud.pubsub.v1.TopicAdminSettings.newBuilder(TopicAdminSettings.java:272) ~[google-cloud-pubsub-0.26.0-beta.jar:0.26.0-beta]
    at org.springframework.cloud.gcp.pubsub.autoconfig.GcpPubSubAutoConfiguration.topicAdminClient(GcpPubSubAutoConfiguration.java:159) ~[spring-cloud-gcp-starter-pubsub-1.0.0.BUILD-SNAPSHOT.jar:1.0.0.BUILD-SNAPSHOT]
    at org.springframework.cloud.gcp.pubsub.autoconfig.GcpPubSubAutoConfiguration$$EnhancerBySpringCGLIB$$edf050a2.CGLIB$topicAdminClient$8(<generated>) ~[spring-cloud-gcp-starter-pubsub-1.0.0.BUILD-SNAPSHOT.jar:1.0.0.BUILD-SNAPSHOT]
    at org.springframework.cloud.gcp.pubsub.autoconfig.GcpPubSubAutoConfiguration$$EnhancerBySpringCGLIB$$edf050a2$$FastClassBySpringCGLIB$$2beba9f2.invoke(<generated>) ~[spring-cloud-gcp-starter-pubsub-1.0.0.BUILD-SNAPSHOT.jar:1.0.0.BUILD-SNAPSHOT]
    at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358) ~[spring-context-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    at org.springframework.cloud.gcp.pubsub.autoconfig.GcpPubSubAutoConfiguration$$EnhancerBySpringCGLIB$$edf050a2.topicAdminClient(<generated>) ~[spring-cloud-gcp-starter-pubsub-1.0.0.BUILD-SNAPSHOT.jar:1.0.0.BUILD-SNAPSHOT]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121]
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ~[spring-beans-4.3.13.RELEASE.jar:4.3.13.RELEASE]
    ... 33 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.threeten.bp.Duration
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_121]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_121]
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[na:1.8.0_121]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_121]
    ... 47 common frames omitted
artembilan commented 6 years ago

java.lang.NoClassDefFoundError: org/threeten/bp/Duration

There is no particular dependency in your classpath. I have no idea what is as a transitive one from now because I am on the phone, but you definitely can find it in Maven and add it explicitly in your project.

On the other hand that would be great to see your project to let us to reproduce the issue. That indeed might not be a surprise that some dependency is lost for PubSub implementation during the recent upgrade.

Please, come back to us with more information.

santhh commented 6 years ago

@artembilan Thanks for looking into this in such short notice. Even if I add the dependency in the maven, it gives no class def for some other reason. At the end I added quite a few of them to test out but stopped when I got no def for some IAM related class. Here is my POM.xml. My project is a big data related project, just wanted to see if i could stream some data to a topic. ..

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

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <java.version>1.8</java.version>
</properties>
org.springframework.cloud spring-integration-gcp org.springframework.cloud spring-cloud-gcp-starter-pubsub org.springframework.boot spring-boot-starter-data-rest org.springframework.boot spring-boot-starter-web org.springframework.cloud spring-cloud-gcp-starter-core org.springframework.boot spring-boot-starter-test test com.fasterxml.jackson.core jackson-databind org.springframework.cloud spring-cloud-gcp-dependencies 1.0.0.M1 pom import spring-milestones Spring Milestones https://repo.spring.io/milestone
<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>

artembilan commented 6 years ago

How dose it work if you add this dependency?

<dependency>
      <groupId>org.threeten</groupId>
      <artifactId>threetenbp</artifactId>
      <version>1.3.3</version>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <artifactId>guava-jdk5</artifactId>
          <groupId>com.google.guava</groupId>
        </exclusion>
      </exclusions>
</dependency>

?

Would you mind also do share with us the result of the dependency:tree report for your project?

joaoandremartins commented 6 years ago

mvn dependency:tree should indeed help, since at the time M1 was released, we still weren't using anything from org.threeten.threetenbp.

artembilan commented 6 years ago

Thank you, @joaoandremartins , for confirmation.

So, my local report against current master shows:

[INFO] +- org.springframework.cloud:spring-cloud-gcp-pubsub:jar:1.0.0.BUILD-SNAPSHOT:compile
[INFO] |  +- com.google.cloud:google-cloud-pubsub:jar:0.32.0-beta:compile
...
[INFO] |  +- org.springframework:spring-messaging:jar:4.3.11.RELEASE:compile
...
[INFO] |  \- com.google.api:gax:jar:1.15.0:compile
...
[INFO] |     +- org.threeten:threetenbp:jar:1.3.3:compile

That says that threetenbp is a transitive dependency of the gax. And I really see this one in the M1 pom as well: repo.spring.io/libs-milestone/org/springframework/cloud/spring-cloud-gcp-pubsub/1.0.0.M1/spring-cloud-gcp-pubsub-1.0.0.M1.pom.

So, confusing...

santhh commented 6 years ago

Thanks @artembilan @joaoandremartins

Added the dependancy but still the same error.

here is the dependency tree in my project:

[INFO] --- maven-dependency-plugin:2.10:tree (default-cli) @ soda-chicago-traffic-data-ingest ---
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-dependency-analyzer/1.6/maven-dependency-analyzer-1.6.pom
[INFO] Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-dependency-analyzer/1.6/maven-dependency-analyzer-1.6.pom (6 KB at 85.8 KB/sec)
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-invoker/2.1.1/maven-invoker-2.1.1.pom
[INFO] Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-invoker/2.1.1/maven-invoker-2.1.1.pom (6 KB at 89.1 KB/sec)
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-dependency-analyzer/1.6/maven-dependency-analyzer-1.6.jar
[INFO] Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-dependency-analyzer/1.6/maven-dependency-analyzer-1.6.jar (31 KB at 427.3 KB/sec)
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-invoker/2.1.1/maven-invoker-2.1.1.jar
[INFO] Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-invoker/2.1.1/maven-invoker-2.1.1.jar (30 KB at 427.0 KB/sec)
[INFO] com.gcp.containers:soda-chicago-traffic-data-ingest:jar:0.0.1-SNAPSHOT
[INFO] +- org.springframework.cloud:spring-integration-gcp:jar:1.0.0.M1:compile
[INFO] |  +- org.springframework.integration:spring-integration-core:jar:4.3.12.RELEASE:compile
[INFO] |  |  +- org.springframework:spring-aop:jar:4.3.13.RELEASE:compile
[INFO] |  |  +- org.springframework:spring-context:jar:4.3.13.RELEASE:compile
[INFO] |  |  +- org.springframework:spring-messaging:jar:4.3.13.RELEASE:compile
[INFO] |  |  +- org.springframework:spring-tx:jar:4.3.13.RELEASE:compile
[INFO] |  |  \- org.springframework.retry:spring-retry:jar:1.2.1.RELEASE:compile
[INFO] |  \- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] +- org.springframework.cloud:spring-cloud-gcp-starter-pubsub:jar:1.0.0.M1:compile
[INFO] |  \- org.springframework.cloud:spring-cloud-gcp-pubsub:jar:1.0.0.M1:compile
[INFO] |     +- com.google.cloud:google-cloud-pubsub:jar:0.26.0-beta:compile
[INFO] |     |  +- io.netty:netty-tcnative-boringssl-static:jar:2.0.3.Final:compile
[INFO] |     |  +- com.google.cloud:google-cloud-core-grpc:jar:1.8.0:compile
[INFO] |     |  |  +- com.google.protobuf:protobuf-java:jar:3.3.1:compile
[INFO] |     |  |  +- io.grpc:grpc-protobuf:jar:1.6.1:compile
[INFO] |     |  |  |  \- io.grpc:grpc-protobuf-lite:jar:1.6.1:compile
[INFO] |     |  |  +- io.grpc:grpc-context:jar:1.6.1:compile
[INFO] |     |  |  \- com.google.api:gax-grpc:jar:0.26.0:compile
[INFO] |     |  +- com.google.api.grpc:proto-google-cloud-pubsub-v1:jar:0.1.21:compile
[INFO] |     |  +- com.google.api.grpc:grpc-google-cloud-pubsub-v1:jar:0.1.21:compile
[INFO] |     |  +- io.grpc:grpc-netty:jar:1.6.1:compile
[INFO] |     |  |  +- io.grpc:grpc-core:jar:1.6.1:compile (version selected from constraint [1.6.1,1.6.1])
[INFO] |     |  |  |  +- com.google.errorprone:error_prone_annotations:jar:2.0.19:compile
[INFO] |     |  |  |  +- com.google.instrumentation:instrumentation-api:jar:0.4.3:compile
[INFO] |     |  |  |  \- io.opencensus:opencensus-api:jar:0.5.1:compile
[INFO] |     |  |  +- io.netty:netty-codec-http2:jar:4.1.14.Final:compile (version selected from constraint [4.1.14.Final,4.1.14.Final])
[INFO] |     |  |  |  +- io.netty:netty-codec-http:jar:4.1.14.Final:compile
[INFO] |     |  |  |  |  \- io.netty:netty-codec:jar:4.1.14.Final:compile
[INFO] |     |  |  |  \- io.netty:netty-handler:jar:4.1.14.Final:compile
[INFO] |     |  |  |     \- io.netty:netty-buffer:jar:4.1.14.Final:compile
[INFO] |     |  |  |        \- io.netty:netty-common:jar:4.1.14.Final:compile
[INFO] |     |  |  \- io.netty:netty-handler-proxy:jar:4.1.14.Final:compile
[INFO] |     |  |     +- io.netty:netty-transport:jar:4.1.14.Final:compile
[INFO] |     |  |     |  \- io.netty:netty-resolver:jar:4.1.14.Final:compile
[INFO] |     |  |     \- io.netty:netty-codec-socks:jar:4.1.14.Final:compile
[INFO] |     |  +- io.grpc:grpc-stub:jar:1.6.1:compile
[INFO] |     |  \- io.grpc:grpc-auth:jar:1.6.1:compile
[INFO] |     \- com.google.api:gax:jar:1.9.0:compile
[INFO] |        +- com.google.auto.value:auto-value:jar:1.2:compile
[INFO] |        +- com.google.code.findbugs:jsr305:jar:3.0.0:compile
[INFO] |        +- com.google.guava:guava:jar:20.0:compile
[INFO] |        \- com.google.api:api-common:jar:1.1.0:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-rest:jar:1.5.9.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter:jar:1.5.9.RELEASE:compile
[INFO] |  |  +- org.springframework.boot:spring-boot:jar:1.5.9.RELEASE:compile
[INFO] |  |  +- org.springframework.boot:spring-boot-starter-logging:jar:1.5.9.RELEASE:compile
[INFO] |  |  |  +- ch.qos.logback:logback-classic:jar:1.1.11:compile
[INFO] |  |  |  |  \- ch.qos.logback:logback-core:jar:1.1.11:compile
[INFO] |  |  |  +- org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[INFO] |  |  |  \- org.slf4j:log4j-over-slf4j:jar:1.7.25:compile
[INFO] |  |  \- org.yaml:snakeyaml:jar:1.17:runtime
[INFO] |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.0:compile
[INFO] |  \- org.springframework.data:spring-data-rest-webmvc:jar:2.6.9.RELEASE:compile
[INFO] |     +- org.springframework.data:spring-data-rest-core:jar:2.6.9.RELEASE:compile
[INFO] |     |  +- org.springframework.hateoas:spring-hateoas:jar:0.23.0.RELEASE:compile
[INFO] |     |  +- org.springframework.data:spring-data-commons:jar:1.13.9.RELEASE:compile
[INFO] |     |  +- org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile
[INFO] |     |  \- org.atteo:evo-inflector:jar:1.2.2:compile
[INFO] |     \- org.slf4j:jcl-over-slf4j:jar:1.7.25:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:1.5.9.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-tomcat:jar:1.5.9.RELEASE:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.23:compile
[INFO] |  |  |  \- org.apache.tomcat:tomcat-annotations-api:jar:8.5.23:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.23:compile
[INFO] |  |  \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.23:compile
[INFO] |  +- org.hibernate:hibernate-validator:jar:5.3.6.Final:compile
[INFO] |  |  +- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] |  |  +- org.jboss.logging:jboss-logging:jar:3.3.1.Final:compile
[INFO] |  |  \- com.fasterxml:classmate:jar:1.3.4:compile
[INFO] |  +- org.springframework:spring-web:jar:4.3.13.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-beans:jar:4.3.13.RELEASE:compile
[INFO] |  \- org.springframework:spring-webmvc:jar:4.3.13.RELEASE:compile
[INFO] |     \- org.springframework:spring-expression:jar:4.3.13.RELEASE:compile
[INFO] +- org.springframework.cloud:spring-cloud-gcp-starter-core:jar:1.0.0.M1:compile
[INFO] |  +- org.springframework.cloud:spring-cloud-gcp-core:jar:1.0.0.M1:compile
[INFO] |  |  \- com.google.cloud:google-cloud-core:jar:1.2.3:compile
[INFO] |  |     +- joda-time:joda-time:jar:2.9.9:compile
[INFO] |  |     +- org.json:json:jar:20140107:compile
[INFO] |  |     +- com.google.protobuf:protobuf-java-util:jar:3.3.0:compile
[INFO] |  |     |  \- com.google.code.gson:gson:jar:2.8.2:compile
[INFO] |  |     +- com.google.api.grpc:proto-google-common-protos:jar:0.1.13:compile
[INFO] |  |     \- com.google.api.grpc:proto-google-iam-v1:jar:0.1.13:compile
[INFO] |  +- commons-logging:commons-logging:jar:1.2:compile
[INFO] |  +- com.google.auth:google-auth-library-oauth2-http:jar:0.7.1:compile
[INFO] |  |  +- com.google.auth:google-auth-library-credentials:jar:0.7.1:compile
[INFO] |  |  +- com.google.http-client:google-http-client:jar:1.19.0:compile
[INFO] |  |  |  \- org.apache.httpcomponents:httpclient:jar:4.5.3:compile
[INFO] |  |  |     +- org.apache.httpcomponents:httpcore:jar:4.4.8:compile
[INFO] |  |  |     \- commons-codec:commons-codec:jar:1.10:compile
[INFO] |  |  \- com.google.http-client:google-http-client-jackson2:jar:1.19.0:compile
[INFO] |  \- org.springframework.boot:spring-boot-autoconfigure:jar:1.5.9.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:1.5.9.RELEASE:test
[INFO] |  +- org.springframework.boot:spring-boot-test:jar:1.5.9.RELEASE:test
[INFO] |  +- org.springframework.boot:spring-boot-test-autoconfigure:jar:1.5.9.RELEASE:test
[INFO] |  +- com.jayway.jsonpath:json-path:jar:2.2.0:test
[INFO] |  |  \- net.minidev:json-smart:jar:2.2.1:test
[INFO] |  |     \- net.minidev:accessors-smart:jar:1.1:test
[INFO] |  |        \- org.ow2.asm:asm:jar:5.0.3:test
[INFO] |  +- junit:junit:jar:4.12:test
[INFO] |  +- org.assertj:assertj-core:jar:2.6.0:test
[INFO] |  +- org.mockito:mockito-core:jar:1.10.19:test
[INFO] |  |  \- org.objenesis:objenesis:jar:2.1:test
[INFO] |  +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] |  +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] |  +- org.skyscreamer:jsonassert:jar:1.4.0:test
[INFO] |  |  \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] |  +- org.springframework:spring-core:jar:4.3.13.RELEASE:compile
[INFO] |  \- org.springframework:spring-test:jar:4.3.13.RELEASE:test
[INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.10:compile
[INFO] |  \- com.fasterxml.jackson.core:jackson-core:jar:2.8.10:compile
[INFO] \- org.threeten:threetenbp:jar:1.3.3:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.489 s
[INFO] Finished at: 2018-01-16T10:59:05-05:00
[INFO] Final Memory: 29M/322M
artembilan commented 6 years ago

Added the dependancy but still the same error.

That's impossible since we have org.threeten.bp.Duration in the classpath.

Indeed your report doesn't show threetenbp transitive dependency on the gax, but at the same time I see it as a direct dependency. Strange...

joaoandremartins commented 6 years ago

@santhh thanks for your response.

I know you've pasted bits of your pom.xml but, at this point, I'd like to request for the whole pom.xml if that's possible. I'd like to be able to reproduce the issue you're seeing locally.

artembilan commented 6 years ago

+1 for @joaoandremartins comment. And that's why I even asked to share with us some simple Spring Boot project to let us to play locally.

There is Getting Started Guide on the matter though and the project has a particular sample as well.

joaoandremartins commented 6 years ago

Closing for the time being. Feel free to reopen if you see the issue again.