cancel
Showing results for 
Search instead for 
Did you mean: 

SMP 3.0 SP5 PL1 - Integration Gateway and SQL Server

Former Member
0 Kudos

Hi,

I have a strange problem with integration gateway. I have 3 table on sql server, but for 2 I can see the entity on Odata Service created with Integration  Gateway plugin for eclipse. For one table I receive a message "an exception occurred", with no more details.

Below I show the image of my environment and sql server table.

In particular, for table/entity BRAND I receive the error, while for tblPersone and Books all work.

The only difference is that for BRAND the key is a uniqueidentifier (and in the model I used the type Edm.Guid).

I'm using SMP 3.0 SP5 PL1 (pay no attention at model name). And on Eclipse Kepler I have updated all plugins.

I hope that some one have idea about the problem

Let me know if need more details.

Thanks in advanced,

Elia.

SQL SERVER TABLES

ODATA MODEL

QUERY RESULT tblPersone (is OK)

QUERY RESULT for BRAND (is KO)

Accepted Solutions (1)

Accepted Solutions (1)

midhun_vp
Active Contributor
0 Kudos

Hi Elia,

You can find more information on the error from the SMP server logs.

After changing the Integration gateway log level to debug ( Login to SMP admin cockpit>Logs> settings) perform the query and look at the server logs (Login to SMP admin cockpit>Logs> log files>hostname-smp-server.log).

Regards, Midhun

SAP Technology RIG

Former Member
0 Kudos

Hi All,

this morning I make a new test. Create a copy of BRAND table, BRANDCOPY, and changed  IdBrand data type, from uniqueidentifier to varchar(50). And now it work.

But, this not solve my problem, because I need to use uniqueidentifier as DB specification.

How Midhun suggest, I have enabled log on Integration Gateway Cockpit, and the log is:

com.sap.gateway.core.api.provider.data.GenericODataProcessor: readEntitySet failed: entity set = BRAND, content type = application/xml;charset=utf-8, message = org.apache.olingo.odata2.api.ep.EntityProviderException: An exception occurred.

Some one are using sql server as back-end and table with uniqueidentifier field? (in sp5 pl1).

Regards,

Elia.

midhun_vp
Active Contributor
0 Kudos

Hi Elia,

What is the value carried my idBrand?

Did you try with other edm data types based on the value returned by idBrand? You can find emd data types and it's definitions here: Overview | OData - The Protocol for REST APIs

Regards, Midhun

SAP Technology RIG

Former Member
0 Kudos

Hi Midhun,

in idBrand there are value like D3B1FACB-DC9D-4D81-A492-001AC41E9E35. normal GUID.

I tried to use Edm.String instead of Edm.Guid and now the request get the data correctly. But, a this point, the question is: When I should use Edm.Guid?

I am using Edm.Guid data type in wrong way or there is an issue on this data type?

Regards,

Elia.

bjoernw
Employee
Employee
0 Kudos

Hi Elia,

our dev team looked into this and found the following explanation. It looks like SQL server database is returning a string type, so casting becomes a problem.

Some database behave differently for different data type. So using it as a string is the solution for this problem.

I hope this helps.

Kind regards

Björn

Answers (2)

Answers (2)

Jitendra_Kansal
Product and Topic Expert
Product and Topic Expert
0 Kudos

this point, the question is: When I should use Edm.Guid?

I am using Edm.Guid data type in wrong way or there is an issue on this data type?

I couldnt find anything related to above in documentation, probably , can give info.

Regards,

JK

agentry_src
Active Contributor
0 Kudos

Can you change nome to NotNull and rerun the test?

Regards, Mike

SAP P&I Technology RIG

Former Member
0 Kudos

Hi Michael,  I think I have not figured out what to change.  I should change the field nome of tblPersone to NotNull?

But my problem is not on tblPersone table, is on BRAND table.


Regards,

Elia.

agentry_src
Active Contributor
0 Kudos

Hi Elia,

I misunderstood which table.  My mistake.

Regards, Mike

SAP P&I Technology RIG

rakshit_doshi
Active Contributor
0 Kudos

Dear Elia,

What is the datatype oif the IdBrand primary key. Is it possible for you to change it to int and remove it from unique identifier and try.

Thanks,

Rakshit Doshi