cancel
Showing results for 
Search instead for 
Did you mean: 

Getting error Session restore error from Service Layer odata API

Hello experts,

I am using Orders service layer odata API endpoint to get orders from SAP. It is sometimes working fine and sometimes it gives Session restore error.

I am using below API url currently to get orders.

GET: https://XXX.XXX.X.X:50000/b1s/v1/Orders

Error response for above.

{ "error" : { "code" : 304, "message" : { "lang" : "en-us", "value" : "Session restore error." } } }

Can you please share anything regarding this error. It would be helpful for us.

Thanks

Irfan

0 Kudos

Hi all,

Our customer are facing the same issue. Is there any solution for this issue?

Thanks,

Steven

Accepted Solutions (0)

Answers (2)

Answers (2)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert

Dear tricia.hartigan,

Yes, Service Layer can be uninstalled/installed separately without fully re-installing SAP Business One. You just need to run the Server Tools installation wizard and select the option accordingly.

Also, if you can reproduce the error message Session restore error every time you send the request to Service Layer to process, you can create an incident for SAP Business One Support Team under the component SBO-SDK-SVL and provide the detailed Service Layer logs so that a pattern for the error can be observed and investigated accordingly.

Refer to the following topics in SAP Note 2607373:

  • Steps to enable detailed Service Layer error logs [error_50000_log_xxxx_xx_xx]
  • Steps to enable detailed SAP Business One logs for Service Layer operations

Kindly enable both these logs and send those to us. Please help to do it in the following way:

  1. Enable both the detailed logs.
  2. Use Postman and a SAP Business One User to login. Note the exact time when you login.
  3. Send request 3-4 times to Service Layer to process and reproduce the issue. Note the exact time for this process.
  4. Collect the detailed logs.
  5. Disable the detailed logs as mentioned in SAP Note 2607373.
  6. Provide the Logs to us along with the noted times in the incident.

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Dear tricia.hartigan,

Could you try to reinstall Service Layer to check if this issue could be resolved?

This issue may occur if the database password is changed after Service Layer is installed.

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

0 Kudos

Hi Ankit,

Thank you very much for your help.

I tried a DB user password change on my local SAP B1 HANA environment. I didn't get the same error but got an "Invalid session" error when doing a calculation view query request. I'm confirming with my customer if they have a DB password change recently.

The issue is when we login query order/customer with service layer all works good. But when we do calculation view query via semantic layer, it will return error like "Session restore error" on our customer's environment or "invalid session" on our local environment. And a wired thing is when we run the request on Postman, it works.

Is there any other way to fix this issue? I asked this because I'm concerning if we have next DB password change, we have to perform another re-install on service layer.

BTW, I'm wondering if the service layer can be uninstall/install separately without fully re-install SAP B1?

Thanks,

Steven