GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — TRANSLATE: Using 0.10.0-alpha from the docs causes java.lang.ClassNotFoundException: com.google.cloud.ServiceDefaults · Issue #1780 · googleapis/google-cloud-java

TRANSLATE: Using 0.10.0-alpha from the docs causes java.lang.ClassNotFoundException: com.google.cloud.ServiceDefaults #1780

New issue
Copy link
New issue
Copy link
Closed
Closed
TRANSLATE: Using 0.10.0-alpha from the docs causes java.lang.ClassNotFoundException: com.google.cloud.ServiceDefaults#1780
Copy link
Assignees
garrettjonesgoogle
Labels
api: corepriority: p2Moderately-important priority. Fix may not be included in next release.

Description

@patflynn
patflynn
opened on Mar 22, 2017
Issue body actions

I think this probably happens if you just follow the getting started but my occurrence happened in:
https://github.com/patflynn/kplay/tree/broken-translate-api

You'll need to run cd into the spring-boot-simple directory and run mvn spring-boot:run
and then hit localhost:8080/visit

(that endpoints uses datastore so you'll need some creds in your environment)

0.9.4-alpha works fine.


java.lang.ClassNotFoundException: com.google.cloud.ServiceDefaults
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_91]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_91]
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[na:1.8.0_91]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_91]
	at hello.DemoController.visit(DemoController.java:36) ~[classes/:na]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_91]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_91]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_91]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91]
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205) ~[spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133) ~[spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:116) ~[spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827) ~[spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738) ~[spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) ~[spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963) ~[spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) ~[spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) ~[spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) ~[spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) ~[spring-webmvc-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) ~[tomcat-embed-websocket-8.5.11.jar:8.5.11]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99) ~[spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
	at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105) ~[spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
	at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81) ~[spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) ~[spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) ~[spring-web-4.3.6.RELEASE.jar:4.3.6.RELEASE]
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) ~[tomcat-embed-core-8.5.11.jar:8.5.11]
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat-embed-core-8.5.11.jar:8.5.11]
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:474) [tomcat-embed-core-8.5.11.jar:8.5.11]
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [tomcat-embed-core-8.5.11.jar:8.5.11]
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.5.11.jar:8.5.11]
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [tomcat-embed-core-8.5.11.jar:8.5.11]
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349) [tomcat-embed-core-8.5.11.jar:8.5.11]
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783) [tomcat-embed-core-8.5.11.jar:8.5.11]
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-embed-core-8.5.11.jar:8.5.11]
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798) [tomcat-embed-core-8.5.11.jar:8.5.11]
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434) [tomcat-embed-core-8.5.11.jar:8.5.11]
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-embed-core-8.5.11.jar:8.5.11]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_91]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_91]
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.5.11.jar:8.5.11]
	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_91]

Activity

Next
  1. garrettjonesgoogle commented on Mar 22, 2017

    @garrettjonesgoogle
    garrettjonesgoogle
    on Mar 22, 2017
    Contributor
    More actions

    You are using version 0.9.3-beta of google-cloud-datastore, so it is likely that version 0.9.3-beta of google-cloud-core is being used, which doesn't have ServiceDefaults. You always need to keep the google-cloud-* packages at the same version.

  2. garrettjonesgoogle
    added
    api: core
    on Mar 22, 2017
  3. patflynn commented on Mar 22, 2017

    @patflynn
    patflynn
    on Mar 22, 2017
    Author
    More actions

    Aha I did not realize this. Do we document it somewhere? It should probably be a big warning on each individual libraries getting started.

    So does that mean that every release entails a release of all the libraries in this repo with a common version?

  4. garrettjonesgoogle commented on Mar 22, 2017

    @garrettjonesgoogle
    garrettjonesgoogle
    on Mar 22, 2017
    Contributor
    More actions

    We don't have it documented anywhere yet. It's worth adding I think.

    Yes, the release process will release all libraries with a common version, even the libraries that haven't changed themselves (since often there will be dependencies that changed).

  5. garrettjonesgoogle
    added
    docs
    on Mar 22, 2017
  6. patflynn commented on Mar 22, 2017

    @patflynn
    patflynn
    on Mar 22, 2017 via email
    Author
    More actions
    how are you guys going to GA subsets of these libraries if they all share the same version?
    …
    On Wed, Mar 22, 2017 at 7:21 AM, garrettjonesgoogle < ***@***.***> wrote: We don't have it documented anywhere yet. It's worth adding I think. Yes, the release process will release all libraries with a common version, even the libraries that haven't changed themselves (since often there will be dependencies that changed). — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#1780 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AHf5HTqd4l88qZfyFuhN4ZHuSpJqntK1ks5roS5fgaJpZM4Mkm-i> .
  7. garrettjonesgoogle commented on Mar 22, 2017

    @garrettjonesgoogle
    garrettjonesgoogle
    on Mar 22, 2017
    Contributor
    More actions

    We'll have a slightly more complicated situation when we go GA - the GA clients will be at one version (1.x), and the alpha/beta clients will be at another version (0.x). They will still all move forward in lockstep, though.

  8. patflynn commented on Mar 22, 2017

    @patflynn
    patflynn
    on Mar 22, 2017
    Author
    More actions

    How do the users of the APIs know which versions go with which?

    I'm having an issue now where I assumed that I would just extract the common version to a property in my pom but 0.10.0-beta from the datastore instructions doesn't resolve to a translate version, and 0.9.4-alpha in the translate API instructions don't resolve to a datastore version.

  9. patflynn commented on Mar 22, 2017

    @patflynn
    patflynn
    on Mar 22, 2017
    Author
    More actions

    @ludoch
    @rdayal

  10. garrettjonesgoogle commented on Mar 22, 2017

    @garrettjonesgoogle
    garrettjonesgoogle
    on Mar 22, 2017
    Contributor
    More actions

    I would suggest just tracking a couple versions like we do in the core google-cloud-java pom.xml:

        <alpha.version>0.10.1-alpha-SNAPSHOT</core.version>
        <beta.version>0.10.1-beta-SNAPSHOT</beta.version>
    

    later, add a GA version:

        <ga.version>1.0.1-SNAPSHOT</core.version>
    

    As for which versions go with which, we'll have the latest coordinating alpha/beta/ga versions in the main README.md.

  11. garrettjonesgoogle commented on May 30, 2017

    @garrettjonesgoogle
    garrettjonesgoogle
    on May 30, 2017
    Contributor
    More actions

    I don't think there is a good way to document this in a way that people will actually read (besides the 1% of people who read reference docs straight through for fun). I'm going to resolve this because there isn't a problem in the scenario where users specify the right versions together.

  12. garrettjonesgoogle
    closed this as completedon May 30, 2017
  13. patflynn commented on May 31, 2017

    @patflynn
    patflynn
    on May 31, 2017
    Author
    More actions

    What about using a BOM?

    http://howtodoinjava.com/maven/maven-bom-bill-of-materials-dependency/

  14. garrettjonesgoogle commented on May 31, 2017

    @garrettjonesgoogle
    garrettjonesgoogle
    on May 31, 2017
    Contributor
    More actions

    We are using dependency management already in our poms, but that doesn't help people depending on the wrong versions of our stuff in their own poms.

  15. patflynn commented on May 31, 2017

    @patflynn
    patflynn
    on May 31, 2017
    Author
    More actions

    but can't we just always tell the user to import our BOM as the first step to importing our libraries?

  16. 8 remaining items

  17. patflynn commented on Jun 23, 2017

    @patflynn
    patflynn
    on Jun 23, 2017 via email
    Author
    More actions
    I wouldn't think that diamond dependency conflicts for libraries we don't control is solvable.
    …
    On Thu, Jun 22, 2017 at 5:55 PM, Garrett Jones ***@***.***> wrote: It would only solve misuse of this library, it wouldn't solve diamond dependency conflicts with other libraries we don't control. I'd like to see more evidence of the priority/impact before committing to working on it. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#1780 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AHf5HSgSqSsURJQqZsauz5sHvruLL6Fnks5sGuK-gaJpZM4Mkm-i> .
  18. garrettjonesgoogle commented on Jun 23, 2017

    @garrettjonesgoogle
    garrettjonesgoogle
    on Jun 23, 2017
    Contributor
    More actions

    There is the "area in between" - solving diamond dependency conflicts among Google's open source libraries, which are technically ones that the team of google-cloud-java doesn't own, but which can be influenced. That is the one worth putting effort into I think.

  19. garrettjonesgoogle commented on Aug 4, 2017

    @garrettjonesgoogle
    garrettjonesgoogle
    on Aug 4, 2017
    Contributor
    More actions

    Closing out this issue - filed a new issue to introduce a BOM: #2307

  20. garrettjonesgoogle
    closed this as completedon Aug 4, 2017
  21. JustinBeckwith
    assigned
    garrettjonesgoogle
    on Feb 1, 2021
  22. meltsufin
    added a commit that references this issue on Dec 22, 2025

    deps: update googleapis/sdk-platform-java action to v2.55.1 (#1780)

    505557e
  23. chingor13
    added a commit that references this issue on Jan 22, 2026

    chore: Update generation configuration at Fri Feb 28 02:25:01 UTC 2025 (

    d5e4e84
  24. suztomo
    added a commit that references this issue on Mar 11, 2026

    deps: update googleapis/sdk-platform-java action to v2.55.1 (googleap…

    7d08311
  25. lqiu96
    added a commit that references this issue on Mar 20, 2026

    chore: Update generation configuration at Fri Feb 28 02:25:01 UTC 2025 (

    4ec68c9
  26. suztomo
    added a commit that references this issue on Mar 23, 2026

    deps: update dependency com.google.cloud:google-cloud-trace to v2.52.0 (

    bc2c85d
  27. meltsufin
    added 4 commits that reference this issue on Apr 29, 2026

    deps: update dependency com.google.cloud:google-cloud-core to v2.26.0 (…

    2d38175

    chore(main): release 1.133.0 (#2206)

    a3b6539

    deps: update dependency com.google.cloud:google-cloud-core to v2.26.0 (…

    b8b91dc

    chore(main): release 1.133.0 (#2206)

    1180af9
  28. benjaminp
    added a commit that references this issue on Jul 13, 2026

    chore(main): release 2.23.3 (googleapis#1780)

    0acac90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @garrettjonesgoogle
    garrettjonesgoogle

Labels

api: corepriority: p2Moderately-important priority. Fix may not be included in next release.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.