Comments (6)
BTW, I have created only aws-s3 instance. No GCP.
from cloud-objectstore-java-sample.
Hi Manjuath,
From the logs its evident that the objectstore credentials which are required to configure AmazonWebServiceConfiguration.java class are not able to be injected from the VCAP_SERVICE and so its throwing the error: 2020-06-26T15:54:14.99+0530 [APP/PROC/WEB/0] OUT java.lang.NullPointerException: identity
Could you please verify the service-instance name you would have created in aws landscape.
For instance if the service-instance name is "objectstore-service" the same instance name should be used in the manifest.yaml file as well as in the AmazonWebServiceConfiguration.java class at the given line:
@ConfigurationProperties(prefix = "vcap.services.objectstore-service.credentials")
The same information can also be found in readme in step 2 here.
Thanks
from cloud-objectstore-java-sample.
Hi-
Thanks for your reply.
Yes, I have used the same service name.
I have created aws-s3
as instance of objectstore with s3-standard plan.
Same instance name I have used in AmazonWebServiceConfiguration.java
```public BlobStoreContext getBlobStoreContext() {
return ContextBuilder.newBuilder("aws-s3").credentials(this.getAccessKeyId(), this.getSecretAccessKey())
.buildView(BlobStoreContext.class);
}```
and also, in yaml file
applications:
- name: objectstore-sample-svc
host: i302342-objectstore-sample-svc
memory: 2G
buildpack: https://github.com/cloudfoundry/java-buildpack.git
path: target/objectstore-sample-1.0.0.jar
services:
- aws-s3
I think Im doing it correctly.
from cloud-objectstore-java-sample.
Hi,
As I mentioned in my previous reply the service-instance that you have created as "aws-s3" should match in two places:
- manifest.yaml (You did it correctly)
- At
@ConfigurationProperties(prefix = "vcap.services.aws-s3.credentials")
in AmazonWebServiceConfiguration.java class (Have you changed this as well?)
You've placed the instance name in the below code which is not correct.
public BlobStoreContext getBlobStoreContext() {
return ContextBuilder.newBuilder("aws-s3").credentials(this.getAccessKeyId(), this.getSecretAccessKey())
.buildView(BlobStoreContext.class);
}
The job of the above code is to configure aws provider with the objectstore credentials which application automatically injects from VCAP_SERVICES. Please don't change the getBlobStoreContext() method.
Thanks
from cloud-objectstore-java-sample.
Yes, thanks for rectifying my mistake. Its working fine now after changing,
from
"vcap.services.objectstore-service.credentials"
to
"vcap.services.aws-s3.credentials"
from cloud-objectstore-java-sample.
Thanks for your confirmation.
from cloud-objectstore-java-sample.
Related Issues (18)
- Streaming support for upload/download content from/to object store HOT 1
- return HTTP Status 400 – Bad Request for any request HOT 5
- Unable to upload file in GCP landscape HOT 3
- 500 Internal Server Error: injection from VCAP_SERVICES not working HOT 1
- [rl-vulnerability_alerts-1] Violation against OSS Rules of Play HOT 1
- [rl-assigned_teams-2] Violation against OSS Rules of Play
- [rl-assigned_teams-3] Violation against OSS Rules of Play
- [rl-assigned_teams-1] Violation against OSS Rules of Play
- Unable to Create File HOT 2
- Using JClouds with Spring 2.7.* throws an exception HOT 1
- unable to get any serviceplan HOT 2
- When is the plan to support for azure blob storage via jcloud? HOT 1
- [rl-reuse_tool-4] Violation against OSS Rules of Play
- How to add authentication? HOT 7
- 404 Not Found error for POST request HOT 3
- Is there any admin page to manage blob storage? HOT 2
- Will enhance it to support Alibaba Cloud OSS with Jcloud? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloud-objectstore-java-sample.