Skip to content

No getService method in google-cloud-storage #1813

Closed

Description

@elharo

README.MD for google-cloud-storage refers to

Storage storage = StorageOptions.getDefaultInstance().getService();

and a few other times. It appears this is no longer accurate at 0.10.alpha.

I.e. the StorageOptions class does not have a getService method. I'm not sure what it should be replaced with.

Activity

  1. garrettjonesgoogle commented on Mar 27, 2017

    @garrettjonesgoogle
    Contributor

    getService() is present on ServiceOptions which StorageOptions extends. It was never changed. The code you pasted here should work fine.

  2. added
    api: storageIssues related to the Cloud Storage API.
    type: questionRequest for information or clarification. Not an issue.
    on Mar 27, 2017
  3. elharo commented on Mar 27, 2017

    @elharo
    ContributorAuthor

    OK, I must be doing something wrong. I'll dig into this further.

  4. elharo commented on Mar 27, 2017

    @elharo
    ContributorAuthor
    Multiple markers at this line
    	- The method getService() is undefined for the type StorageOptions
    	- The type com.google.cloud.HttpServiceOptions cannot be resolved. It is indirectly referenced 
    	 from required .class files
    
  5. elharo commented on Mar 27, 2017

    @elharo
    ContributorAuthor

    Digging into my jar I do see the getService method. I don't see com.google.cloud.HttpServiceOptions in google-cloud-core-0.10.0-alpha.jar. What jar should that be in?

  6. garrettjonesgoogle commented on Mar 27, 2017

    @garrettjonesgoogle
    Contributor

    I think you are out of sync somehow. If you build both -core and -storage fresh, or make sure that they are both at 0.10.0, it should all work. It looks like you might have the old version of -storage pointing to the new version of -core. (HttpServiceOptions was taken out of the hierarchy and is now a standalone class, HttpTransportOptions)

  7. elharo commented on Mar 28, 2017

    @elharo
    ContributorAuthor

    This appears to be the problem. Thanks. Closing.

  8. 1 remaining item

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

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the Cloud Storage API.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions