on 01-30-2015 4:23 PM
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)
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you change nome to NotNull and rerun the test?
Regards, Mike
SAP P&I Technology RIG
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.