cancel
Showing results for 
Search instead for 
Did you mean: 

Integration Gateway - Internal Server Error 500 after making POST

eamarce23
Participant
0 Kudos

Hello dear experts,

We have a Integration Gateway Project with custom code connecting to a SQL Server Database. We are invoking our service from SAP Gateway. This service has been working fine for several months, however from a couple of days it started failing in 4 distinct SMP environments, and we are wondering what could be the cause. The fail we are experiencing is by the time we insert data into the database, although we can insert the row successfully, we are receiving a HTTP 500 Internal Server Error as response in Gateway.

We reviewed this blog:

https://blogs.sap.com/2014/01/08/how-to-use-integration-gateway-with-smp-30-part-3/

Specifically the part: "In some cases you might get an HTTP 500 Internal Server Error. Then have a closer look. It could be that the entry got successfully inserted and after this an error occurred (happened some times to me)" and it seems close to what we are experiencing.

On the SMP logs we found the following errors:

#2.0#2016-12-06 09:35:29 PM#ERROR#RequestResponse###Integration Gateway#1481081728194746#47afd21e-2185-45ec-8a05-caf9627dd609##com.sap.it.commons.logging.slf4j.internal.LoggerSlf4j:log#SMPCONN#######1333#####[Gateway][TECHNICAL][CoreRtHandleErrorFailed]:Failed to log error. Exception: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.1.v20121003-ad44345): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.ibm.db2.jcc.am.SqlDataException: DB2 SQL Error: SQLCODE=-302, SQLSTATE=22001, SQLERRMC=null, DRIVER=4.11.77 Error Code: -302 Call: INSERT INTO T_EXT_ERRORLOG (ERRORID, BACKENDHTTPSTATUS, BACKENDINFO, ERRORLONGTEXT, ERRORTEXT, ERRORTIMESTAMP, EXCEPTIONCATEGORY, GWUSERNAME, LANGUAGE, LOGLEVEL, SERVICENAME, SERVICENAMESPACE, SERVICEVERSION, STACKTRACE, TRANSACTIONID, tenantID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) bind => [16 parameters bound] Query: InsertObjectQuery(com.sap.gateway.core.service.data.ExtErrorLog@6ec6b944)# #2.0#2016-12-06 09:35:29 PM#ERROR#RequestResponse###Integration Gateway#1481081728194745#47afd21e-2185-45ec-8a05-caf9627dd609##com.sap.gateway.core.service.logging.LogPersistencyProvider:saveErrorInfo#SMPCONN#######1333#####saveErrorInfo() failed# #2.0#2016-12-06 09:35:29 PM#ERROR#RequestResponse###Integration Gateway#1481081728194444#47afd21e-2185-45ec-8a05-caf9627dd609##com.sap.it.commons.logging.slf4j.internal.LoggerSlf4j:log#SMPCONN#######1333#####[Gateway][TECHNICAL][LogsSaveErrorInfoFailed]:Failed to save error info. Exception: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.1.v20121003-ad44345): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: com.ibm.db2.jcc.am.SqlDataException: DB2 SQL Error: SQLCODE=-302, SQLSTATE=22001, SQLERRMC=null, DRIVER=4.11.77 Error Code: -302 Call: INSERT INTO T_EXT_ERRORLOG (ERRORID, BACKENDHTTPSTATUS, BACKENDINFO, ERRORLONGTEXT, ERRORTEXT, ERRORTIMESTAMP, EXCEPTIONCATEGORY, GWUSERNAME, LANGUAGE, LOGLEVEL, SERVICENAME, SERVICENAMESPACE, SERVICEVERSION, STACKTRACE, TRANSACTIONID, tenantID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) bind => [16 parameters bound] Query: InsertObjectQuery(com.sap.gateway.core.service.data.ExtErrorLog@6ec6b944)# #2.0#2016-12-06 09:35:29 PM#DEBUG#RequestResponse###Integration Gateway#1481081728194427#47afd21e-2185-45ec-8a05-caf9627dd609##com.sap.gateway.core.service.dao.BasicDAO:saveNew#SMPCONN#######1333#####Commiting and Closing transaction# #2.0#2016-12-06 09:35:29 PM#ERROR#RequestResponse###Integration Gateway#1481081728194426#47afd21e-2185-45ec-8a05-caf9627dd609##com.sap.gateway.core.odata4sap.ODataErrorCallbackImpl:logError#SMPCONN#######1333#####handleError(): failed to serve request for URI https://testxxxx:8083/gateway/odata/SAP/IGWSERVICESV2;v=1/NotificationsSet/, message = Index: 0, Size: 0: Transaction ID :fd0de00c-9621-4398-9c97-3bbd0b995065#

AND

#2.0#2016-12-06 09:35:28 PM#ERROR#RequestResponse###Integration Gateway#1481081728194391#47afd21e-2185-45ec-8a05-caf9627dd609##com.sap.it.commons.logging.slf4j.internal.LoggerSlf4j:log#SMPCONN#######1333#####[Gateway][BUSINESS][CreateEntityFailed]:Data Provider - createEntity: service = IGWSERVICESV2 , entity set = NotificationsSet , request content type = application/json;charset=utf-8 , message = java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 : Transaction ID: fd0de00c-9621-4398-9c97-3bbd0b995065#

Any help would be greatly appreciated,

Thank you very much in advance,

Best Regards!

Edgar Martínez.

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Edgar,

Have your above query been already resolved? If so, please close it by providing your solution, it will help others.

If not, i would suggest you to reach out to SAP support team by raising an OSS ticket.

Regards,

JK (Moderator)

Accepted Solutions (0)

Answers (0)