Open cgaillydetaurines opened 1 week ago
What does your local environment variable look like?
VCAP_SERVICES
What does the local CAP env file look like?
default-env.json
Please hide any unrelated / sensitive data.
Hi Alexander:
I have no VCAP_SERVICES env var setup on my machine.
My default-env.json:
If needed, we can setup a call, I can attach easily a debugger to my env.
Tx, Clément.
I have sent an MR for 27th June for a screensharing session.
After screensharing, investigation and discussion also with CAP, we concluded:
cds bind
shall not be used in combination withdefault-env.json
Please approach CAP colleagues directly for a suggestion on how to start the application then.
Context:
DefaultServiceBindingAccessor.getInstance()
shows (among others) the following loaders, each returning equal entries for "destination"
:DefaultEnvFileServiceBindingLoader
yields data via default-env.json
.SapVcapServicesServiceBindingAccessor
yields data via System.getenv("VCAP_SERVICES")
.
cds bind
when running the application results in environment variables being populated. Thus the information is loaded twice. This leads to an error.
Hi Colleagues,
I am trying to run my application locally but I cannot reach destination service because bindings are loaded twice from my "default-env.json" file, and DestinationServiceAdapter class does not accept having several bindings.
In the ServiceBindingMerger, the bindings are doubled:
My supposition is loaded first by SapVcapServicesServiceBindingAccessor class
And a second time by VcapServiceParser from cap.
Appreciate your help, Clément.