cancel
Showing results for 
Search instead for 
Did you mean: 

Socket Timeout Getting While doing create Entity (SAP Cloud Platform SDK for Android)

0 Kudos

Hi Team,

We are unable get response from HCPMS. We are getting error like "Caused by: java.net.SocketTimeoutException: timeout". This issue will happen rare case. We increased Timeout (ms) : 240000 ms in HCPMS. But SAP side entity created.Please help to us.

find below code snippet:

provider.createEntityAsync(entity,success,failure);

Find below full error message in Debug mode: com.sap.cloud.mobile.odata.http.HttpException: https://xxxxxxxxxx.hana.ondemand.com; Caused by: com.sap.cloud.mobile.odata.core.RuntimeIOException; Caused by: java.net.SocketTimeoutException: timeout; Caused by: java.net.SocketException: socket is closed

Regards

Ramakrishna. Amathi

nick_zhang2
Explorer
0 Kudos

Hi Ramakrishna. Amathi,

Do you have further information, step to step instructions how to reproduce the error?

Which odata provider are you using? Online provider or offline provider?

Maybe you can open a ticket for it.

Best regards,

Nick

Accepted Solutions (0)

Answers (5)

Answers (5)

michele-dc
Explorer
0 Kudos

Hi Team,

Any idea about SocketTimeoutException?. Please help us.

Regards

Michele De Crescenzo

david_brandow
Contributor
0 Kudos

You'd need to get logs from a variety of sources. Keep in mind the cause of the timeout could be happening almost anywhere - in the backend, in a firewall, in a load balancer, on the client… What you'll want is logs from as many of those places as you can, and hopefully that will lead you to the root cause.

0 Kudos

Hi Team,

Any idea about SocketTimeoutException. Please help to us.

Regards

Ramakrishna.Amathi

0 Kudos

Hi Team,

Please update.

Regards

Ramakrishna.Amathi

0 Kudos

Hi Nick,

I am using Online provider.

Please find below steps:

1) Open Online store. Find below code snippet.

String serviceUrl = configurationData.getServiceUrl();
providerUploadOnline = new OnlineODataProvider("ESPMContainer", serviceUrl + Config.getDestinationUpload());
providerUploadOnline.getNetworkOptions().setHttpHandler(new OKHttpHandler(ClientProvider.get()));
providerUploadOnline.getServiceOptions().setCheckVersion(false);
providerUploadOnline.getServiceOptions().setRequiresType(true);
providerUploadOnline.getServiceOptions().setCacheMetadata(false);
uploadContainerOnline = new OfflineUploadContainer(providerUploadOnline);

2) Make entity using set properties

3) Create entity asynchronous. Find below code snippet.

uploadContainerOnline.createEntityAsync(entity,success,failure);

Regards

Ramakrishna. Amathi