I'm getting the following error on these lines of code
BaseServiceInfo baseServiceInfo = cloud.getServiceInfo("upload-rw")
log.info("This is the id: " + baseServiceInfo.getId())
S3ServiceInfo serviceInfo = (S3ServiceInfo) baseServiceInfo
OUT org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object
'org.springframework.cloud.service.BaseServiceInfo@4ad8f682' with class
'org.springframework.cloud.service.BaseServiceInfo' to class
'org.cloudfoundry.community.service.storage.S3ServiceInfo'
The log.info line actually does show the name of the service.
I'm getting this error in CloudFoundry while deploying at a customer site. Surprisingly this error doesn't happen when I deploy the same application locally on my PCFDev.
I see that S3ServiceInfo extends BaseServiceInfo so I don't see a reason for this error.
Are there any steps I can take to better troubleshoot this?
One difference I see in my local CF is when I run cf env myapp I see the following:
I'm getting the following error on these lines of code
The
log.info
line actually does show thename
of the service.I'm getting this error in CloudFoundry while deploying at a customer site. Surprisingly this error doesn't happen when I deploy the same application locally on my PCFDev.
I see that
S3ServiceInfo
extendsBaseServiceInfo
so I don't see a reason for this error.Are there any steps I can take to better troubleshoot this?
One difference I see in my local CF is when I run
cf env myapp
I see the following:However, at customer site I see the following for the same
cf env myapp
command:Notice the difference in
label
fromamazon-s3
toaws-s3
andusername
property missing.Would this cause the error that I'm getting? If so, is there a way I can still do to get the information like below?