{"action":"created","issue":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-gcp/issues/734","repository_url":"https://api.github.com/repos/spring-cloud/spring-cloud-gcp","labels_url":"https://api.github.com/repos/spring-cloud/spring-cloud-gcp/issues/734/labels{/name}","comments_url":"https://api.github.com/repos/spring-cloud/spring-cloud-gcp/issues/734/comments","events_url":"https://api.github.com/repos/spring-cloud/spring-cloud-gcp/issues/734/events","html_url":"https://github.com/spring-cloud/spring-cloud-gcp/issues/734","id":331069554,"node_id":"MDU6SXNzdWUzMzEwNjk1NTQ=","number":734,"title":"Caused by: java.lang.ClassCastException: org.springframework.web.context.support.ServletContextResource cannot be cast to org.springframework.core.io.WritableResource","user":{"login":"sayi65","id":8959015,"node_id":"MDQ6VXNlcjg5NTkwMTU=","avatar_url":"https://avatars1.githubusercontent.com/u/8959015?v=4","gravatar_id":"","url":"https://api.github.com/users/sayi65","html_url":"https://github.com/sayi65","followers_url":"https://api.github.com/users/sayi65/followers","following_url":"https://api.github.com/users/sayi65/following{/other_user}","gists_url":"https://api.github.com/users/sayi65/gists{/gist_id}","starred_url":"https://api.github.com/users/sayi65/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sayi65/subscriptions","organizations_url":"https://api.github.com/users/sayi65/orgs","repos_url":"https://api.github.com/users/sayi65/repos","events_url":"https://api.github.com/users/sayi65/events{/privacy}","received_events_url":"https://api.github.com/users/sayi65/received_events","type":"User","site_admin":false},"labels":[{"id":955535065,"node_id":"MDU6TGFiZWw5NTU1MzUwNjU=","url":"https://api.github.com/repos/spring-cloud/spring-cloud-gcp/labels/awaiting","name":"awaiting","color":"41dbb4","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-06-11T07:14:01Z","updated_at":"2018-09-28T13:42:22Z","closed_at":"2018-08-13T15:34:21Z","author_association":"NONE","body":"I referred this URL:\r\nhttps://docs.spring.io/spring-cloud-gcp/docs/1.0.0.M3/reference/htmlsingle/#_google_cloud_storage\r\n\r\n#254 has same error\r\n\r\n**code:**\r\n```java\r\n                   String bucket = \"gs://BUCKET-NAME/\";\r\n\r\n                   filename = UUID.randomUUID().toString() + \".jpg\";\r\n\r\n                   WritableResource gcs = (WritableResource)\r\n                           context.getResource(bucket + \"/\" + filename);\r\n\r\n                   try (OutputStream os = gcs.getOutputStream()) {\r\n                       os.write(profile.getAvatar().getBytes());\r\n                   } catch (IOException e) {\r\n                       e.printStackTrace();\r\n                   }\r\n\r\n```\r\n\r\napplication.properties\r\n```\r\nspring.cloud.gcp.project-id=PROJECT-ID\r\nspring.cloud.gcp.credentials.location=file://*.json\r\nspring.cloud.gcp.storage.credentials.scopes=https://www.googleapis.com/auth/devstorage.read_write\r\n\r\n```\r\n\r\nbuild.gradle\r\n```\r\ndependencies {\r\n    compile 'org.springframework.cloud:spring-cloud-gcp:1.0.0.M3'\r\n}repositories {\r\n    maven {\r\n        url 'https://repo.spring.io/libs-milestone'\r\n    }\r\n}\r\n```\r\n\r\nERROR:\r\n`java.lang.ClassCastException: org.springframework.web.context.support.ServletContextResource cannot be cast to org.springframework.core.io.WritableResource`\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/spring-cloud/spring-cloud-gcp/issues/comments/425439424","html_url":"https://github.com/spring-cloud/spring-cloud-gcp/issues/734#issuecomment-425439424","issue_url":"https://api.github.com/repos/spring-cloud/spring-cloud-gcp/issues/734","id":425439424,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNTQzOTQyNA==","user":{"login":"meltsufin","id":17732492,"node_id":"MDQ6VXNlcjE3NzMyNDky","avatar_url":"https://avatars2.githubusercontent.com/u/17732492?v=4","gravatar_id":"","url":"https://api.github.com/users/meltsufin","html_url":"https://github.com/meltsufin","followers_url":"https://api.github.com/users/meltsufin/followers","following_url":"https://api.github.com/users/meltsufin/following{/other_user}","gists_url":"https://api.github.com/users/meltsufin/gists{/gist_id}","starred_url":"https://api.github.com/users/meltsufin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meltsufin/subscriptions","organizations_url":"https://api.github.com/users/meltsufin/orgs","repos_url":"https://api.github.com/users/meltsufin/repos","events_url":"https://api.github.com/users/meltsufin/events{/privacy}","received_events_url":"https://api.github.com/users/meltsufin/received_events","type":"User","site_admin":false},"created_at":"2018-09-28T13:42:22Z","updated_at":"2018-09-28T13:42:22Z","author_association":"COLLABORATOR","body":"@orhan-swe Are you able to reproduce the issue? If so, can you share some code that we can try?"}}
{"actor":{"display_login":"meltsufin"}}