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 — Cloud Java APIs should work with a local Cloud SDK with GAE Standard. · Issue #1500 · googleapis/google-cloud-java

Cloud Java APIs should work with a local Cloud SDK with GAE Standard. #1500

New issue
Copy link
New issue
Copy link
Closed
Closed
Cloud Java APIs should work with a local Cloud SDK with GAE Standard.#1500
Copy link
Assignees
shinfan
Labels
api: storageIssues related to the Cloud Storage API.running on app engine

Description

@ludoch
ludoch
opened on Jan 5, 2017
Issue body actions

With the following code in my Java Servlet:

   Storage storage = StorageOptions.getDefaultInstance().getService();
   
   
    String bucketName = "rdayalcloudtest"; // Change this to something unique
    Bucket bucket = storage.create(BucketInfo.of(bucketName));

    // Upload a blob to the newly created bucket
    BlobId blobId = BlobId.of(bucketName, "my_blob_name");
    Blob blob = bucket.create(
        "my_blob_name " + request.hashCode(), "a simple blob".getBytes(UTF_8), "text/plain");

I receive the following exception when attempting to test the code locally, using DevAppServer2:

Problem accessing /hello. Reason:

access denied ("java.io.FilePermission" "/Users/ludo/.config/gcloud/active_config" "read")

Caused by:

java.security.AccessControlException: access denied ("java.io.FilePermission" "/Users/ludo/.config/gcloud/active_config" "read")
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
at java.security.AccessController.checkPermission(AccessController.java:884)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at com.google.appengine.tools.development.devappserver2.DevAppServer2Factory$CustomSecurityManager.checkPermission(DevAppServer2Factory.java:232)
at java.lang.SecurityManager.checkRead(SecurityManager.java:888)
at java.io.FileInputStream.(FileInputStream.java:127)
at com.google.common.io.Files$FileByteSource.openStream(Files.java:125)
at com.google.common.io.Files$FileByteSource.openStream(Files.java:115)
at com.google.common.io.ByteSource$AsCharSource.openStream(ByteSource.java:420)
at com.google.common.io.CharSource.openBufferedStream(CharSource.java:91)
at com.google.common.io.CharSource.readFirstLine(CharSource.java:168)
at com.google.common.io.Files.readFirstLine(Files.java:513)
at com.google.cloud.ServiceOptions.activeGoogleCloudConfig(ServiceOptions.java:354)
at com.google.cloud.ServiceOptions.googleCloudProjectId(ServiceOptions.java:372)
at com.google.cloud.ServiceOptions.getDefaultProject(ServiceOptions.java:348)
at com.google.cloud.ServiceOptions.(ServiceOptions.java:281)
at com.google.cloud.HttpServiceOptions.(HttpServiceOptions.java:179)
at com.google.cloud.storage.StorageOptions.(StorageOptions.java:69)
at com.google.cloud.storage.StorageOptions.(StorageOptions.java:27)
at com.google.cloud.storage.StorageOptions$Builder.build(StorageOptions.java:64)
at com.google.cloud.storage.StorageOptions.getDefaultInstance(StorageOptions.java:99)
at com.example.HelloAppEngine.doGet(HelloAppEngine.java:40)

Reacted by Les Vogel and Orbyt

Activity

Next
  1. lesv commented on Jan 10, 2017

    @lesv
    lesv
    on Jan 10, 2017
    Contributor
    More actions

    Is this the right place to report this? I think this is an issue with the Java SDK.

  2. garrettjonesgoogle
    added
    api: storageIssues related to the Cloud Storage API.
    running on app engine
    on Jan 11, 2017
  3. roku6185 commented on Jan 12, 2017

    @roku6185
    roku6185
    on Jan 12, 2017
    More actions

    I'm having the same problem after updating our maven plugin to:

    <plugin>
      <groupId>com.google.cloud.tools</groupId>
      <artifactId>appengine-maven-plugin</artifactId>
      <version>1.0.0</version>
    </plugin>
    

    I also filed a ticket in the Google Cloud Support Center.

  4. roku6185 commented on Jan 12, 2017

    @roku6185
    roku6185
    on Jan 12, 2017
    More actions

    I solved it by renaming the gcloud directory:

    $ mv ~/.config/gcloud ~/.config/gcloud_backup

    When I started my java service after this fix everything worked okay.

  5. ludoch commented on Jan 12, 2017

    @ludoch
    ludoch
    on Jan 12, 2017
    ContributorAuthor
    More actions

    Les: GAE standard current sandbox rules (for Java7, lifted on Java8) does not allow a web application to read local file...
    The Cloud Java library if running locally should find a way to get the metadata info it needs (project ID, project version etc) in another way than reading local file... (env var, syst prop, GAE API,...)

  6. lesv commented on Jan 12, 2017

    @lesv
    lesv
    on Jan 12, 2017
    Contributor
    More actions

    @GoogleCloudPlatform/cloud-tools-for-java FYI - indirectly affects you.

    @ludoch Try adding:

       <dependency>
          <groupId>com.google.api-client</groupId>
          <artifactId>google-api-client-appengine</artifactId>
          <version>1.21.0</version>
        </dependency>

    @garrettjonesgoogle @anthmgoogle We need to do this right for GAE Standard as we get gRPC working there.

  7. garrettjonesgoogle commented on Jan 13, 2017

    @garrettjonesgoogle
    garrettjonesgoogle
    on Jan 13, 2017
    Contributor
    More actions

    Based on the code flow in https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/google-cloud-core/src/main/java/com/google/cloud/ServiceOptions.java#L336 , if the app engine project id is found in appEngineProjectId(), then googleCloudProjectId() won't be called. Thus, something is going wrong with detecting that this is an app engine use case.

  8. ludoch commented on Jan 14, 2017

    @ludoch
    ludoch
    on Jan 14, 2017 via email
    ContributorAuthor
    More actions
    Maybe this logic has been testing in prod but not in the local GAE Java SDK? Maybe, by making the project id optional in appengine-web.xml the local dev server does not know anymore the project name to use? This might be yet another side effect of changing config in appengine-web.xml?
    …
    On Fri, Jan 13, 2017 at 2:53 PM, garrettjonesgoogle < ***@***.***> wrote: Based on the code flow in https://github.com/GoogleCloudPlatform/google- cloud-java/blob/master/google-cloud-core/src/main/java/com/ google/cloud/ServiceOptions.java#L336 , if the app engine project id is found in appEngineProjectId(), then googleCloudProjectId() won't be called. Thus, something is going wrong with detecting that this is an app engine use case. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#1500 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAE4zaufwEgtXfgbP1FTSYwFPTgIAjWmks5rSABbgaJpZM4LbPIA> .
  9. garrettjonesgoogle
    added
    blocking GA
    on Jan 27, 2017
  10. danoscarmike
    added
    release-blocking
    Status: Release Blocking
    and removed
    release-blocking
    on Feb 20, 2017
  11. ludoch commented on Mar 8, 2017

    @ludoch
    ludoch
    on Mar 8, 2017
    ContributorAuthor
    More actions

    Customer is now escalating the issue with Google support.

  12. shinfan
    self-assigned this
    on Mar 9, 2017
  13. 30 remaining items

  14. github-actions
    added a commit that references this issue on Oct 4, 2022

    chore(main): release 2.3.15 (#1519)

    a87b8fc
  15. meltsufin
    added a commit that references this issue on Dec 22, 2025

    deps: update dependency com.google.cloud:google-cloud-shared-dependen…

    6cce3c9
  16. chingor13
    added a commit that references this issue on Jan 6, 2026

    chore(main): release 0.132.13-alpha-SNAPSHOT (#1500)

    153fb60
  17. chingor13
    added a commit that references this issue on Feb 24, 2026

    ci: adjust owlbot-java for monorepo (#1500) (#953)

    669ed24
  18. suztomo
    added a commit that references this issue on Mar 11, 2026

    deps: update dependency com.google.cloud:google-cloud-shared-dependen…

    0b357a2
  19. chingor13
    added a commit that references this issue on Mar 12, 2026

    ci: adjust owlbot-java for monorepo (#1500) (#953)

    a074df2
  20. lqiu96
    added a commit that references this issue on Mar 20, 2026

    chore(main): release 0.132.13-alpha-SNAPSHOT (#1500)

    245e0a5
  21. suztomo
    added a commit that references this issue on Mar 23, 2026

    chore(main): release 2.15.5 (googleapis#1500)

    655f6f3
  22. suztomo
    added a commit that references this issue on Mar 30, 2026

    chore(deps): update dependency com.google.cloud:google-cloud-nio to v…

    d14231f
  23. lqiu96
    added a commit that references this issue on Apr 1, 2026

    chore(deps): update dependency com.google.cloud:google-cloud-nio to v…

    6ee4b4a
  24. meltsufin
    added 4 commits that reference this issue on Apr 29, 2026

    ci: adjust owlbot-java for monorepo (#1500) (#1200)

    11bef1b

    chore(main): release 1.123.5-SNAPSHOT (#1500)

    bfddf0d

    ci: adjust owlbot-java for monorepo (#1500) (#1200)

    43a5163

    chore(main): release 1.123.5-SNAPSHOT (#1500)

    5c96bcc
  25. benjaminp
    added a commit that references this issue on Jul 13, 2026

    chore(java): update dependencies in java requirements file (googleapi…

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

Metadata

Metadata

Assignees

  • @shinfan
    shinfan

Labels

api: storageIssues related to the Cloud Storage API.running on app engine

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.