cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC : error converting nvarchar to int

0 Kudos

Hi Experts,

I have RFC-> JDBC scenario which execute mssql stored procedure(SP).

All fields are varchar except one field is int.

I defined my data type as SP data types.

The output xml for int field is <ID type="INTEGER">1</ID>

I defined it as xsd:integer.

Rest of fields type is varchar and idefined them as xsd:string.

Now, if I trigger the RFC I got system failure error message.

I checked logs and i found respnse message that part of it is "error converting nvarchar to int".

I tried to investigate but no avail.

Regards,

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Thanks a lot for all.

I asked our basis team to restart our server. After that it works without any issue.

Regards,

Answers (3)

Answers (3)

0 Kudos

Thanks all.

Thanks Amit.

Yes i found the mapping output is in diffrent order than mapping fields (message type) sequence. .

I don't know why it generates diffrent xml tags orders.

For example:

Message type as the following:

A

B

C

But the mapping XML output is:

B

C

A

Regards,

Former Member
0 Kudos

i think it should not happen that the order of the XML tags get changed from target msg structure.

pls check the output msg type structure and see if the output XML is having tags in the same order. if you find there is a difference in tag order, then check in interface mapping if there is any other mapping like java/xslt/abap mapping called after the graphical mapping.

Former Member
0 Kudos

one workaround can be: in the stored procedure, put all the variables as type string and inside the procedure code, transform it from string to integer where needed. then in XI in your data type have all fields as string. then rerun your scenario and it shall then work.

Former Member
0 Kudos

Hi,

This exception generally ocurrs when the  order of the fields in SP does not matches with that mentioned in PI . Similarly in ur scenario due to the order mismatch, SP can’t able to populate varchar values into int fields, when values are flowing into the SP from PI.

Resolution:

Chk and maintain the sequence of the fields in PI in the same way as mentioned in SP .

Thanks

Amit Srivastava