cancel
Showing results for 
Search instead for 
Did you mean: 

error while retrieving data from sql using jdbc adapter

Former Member
0 Kudos

hi all,

i m working on one scenario where i m sending data using HTTP and receiver is jdbc adapter which is retrieving me data from sql server.

i have checked the structure both for req and res.

i m getting this error

<SAP:Error>

<SAP:Category>Application</SAP:Category>

<SAP:Code>MAPPING.EXCEPTION_DURING_EXECUTE</SAP:Code>

<SAP:P1>com/sap/xi/tf/_INF57285_DB_HR_RES_</SAP:P1>

<SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>

<SAP:P3>RuntimeException in Message-Mapping transformatio~</SAP:P3>

<SAP:Stack>During the application mapping com/sap/xi/tf/_INF57285_DB_HR_RES_ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: RuntimeException in Message-Mapping transformatio~</SAP:Stack>

</SAP:Error>

can somebody help me with this.

Thanks & Regards

Aruna

Accepted Solutions (0)

Answers (1)

Answers (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Aruna,

There is some exception in the mapping.

I think the data recived from the JDBC adapter does not match with the data type you have created and so a mapping exception

For info on how the JDBC response will look like , take a look at these blogs,

/people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step

/people/siva.maranani/blog/2005/09/16/xi-how-to-on-jdbc-receiver-response

Regards,

Bhavesh

Former Member
0 Kudos

thnks bhavesh i made extacly the way it is given in

/people/bhavesh.kantilal/blog/2006/07/03/jdbc-receiver-adapter--synchronous-select-150-step-by-step

my request stucture to jdbc is

<REQUEST>

<EmpNo>57285</EmpNo>

</REQUEST>

my response from jdbc is

<Employee_response>

<row>

<Name>aruna</Name>

<EmpId>57285</EmpId>

<Band>A</Band>

<Salary>4675776</Salary>

</row>

</Employee_response>

and request i m sendind to jdbc is

<ns:INF57285_DB_Request xmlns:ns="http://www.infosys.com/xi/training/hyd/57285">

<Employee>

<EmpDetails action="SELECT">

<table>EmpDetails</table>

<access>

<Name />

<EmpId />

<Band />

<Salary />

</access>

<Key>

<EmpId>57285</EmpId>

</Key>

</EmpDetails>

</Employee>

</ns:INF57285_DB_Request>

and response i m getting from jdbc is

<response>

<row>

<Name>aruna</Name>

<Empld>57285</Empld>

<Salary>4675776</Salary>

</row>

</response>

</ns:INF57285_HR_Res>

i have mapped my req to jdbc request

and response of jdbc to response which i m getting

my scenario is

HR syn-- XI -syn- DB

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

The response datatype should be as follows,

<ns:INF57285_DB_Request_<b>response</b> xmlns:ns="http://www.infosys.com/xi/training/hyd/57285">

<Employee_<b>response</b>>

<b><row></b>

<Name>aruna</Name>

<Empld>57285</Empld>

<Salary>4675776</Salary>

</row>

</Employee_<b>response</b>>

</ns:INF57285_DB_Request_<b>response</b> xmlns:ns="http://www.infosys.com/xi/training/hyd/57285">

Please note : it should <b>_response</b> ( case senssitive )

Change the response datatype as shown above, redo the response mapping and it should work.

From my blog,

<i>This is the trickiest part of the configuration and where most of us go wrong. <b>The JDBC adapter when sending its response back will create a Message Type of the same name as the request message with a _response appended to it.</b>

So, if your Request message type is going to have the name, MT_JDBC_SELECT_JDBC_REQUEST then, the message type for the response that is to be created will have to be MT_JDBC_SELECT_JDBC_REQUEST_response .</i>

Regards,

Bhavesh

Former Member
0 Kudos

thnks bhavesh i think i made it that way

JDBC REQ

<ns:INF57285_DB_Request xmlns:ns="http://www.infosys.com/xi/training/hyd/57285">

<Employee>

<EmpDetails action="SELECT">

<table>EmpDetails</table>

<access>

<Name />

<EmpId />

<Band />

<Salary />

</access>

<Key>

<EmpId>57285</EmpId>

</Key>

</EmpDetails>

</Employee>

</ns:INF57285_DB_Request>

JDBC RES

<ns:INF57285_DB_Request_response xmlns:ns="http://www.infosys.com/xi/training/hyd/57285">

<Employee_response>

<row>

<Name>aruna</Name>

<EmpId>57285</EmpId>

<Band>A</Band>

<Salary>4675776</Salary>

</row>

</Employee_response>

</ns:INF57285_DB_Request_response>

my hr req is which i mapped with DB req

<ns:INF57285_HR_Req xmlns:ns="http://www.infosys.com/xi/training/hyd/57285">

<REQUEST>

<EmpNo>57285</EmpNo>

</REQUEST>

</ns:INF57285_HR_Req>

my hr res is which i mapped with DB res

<ns:INF57285_HR_Res xmlns:ns="http://www.infosys.com/xi/training/hyd/57285">

<response>

<row>

<Name>aruna</Name>

<Empld>57285</Empld>

<Salary>4675776</Salary>

</row>

</response>

</ns:INF57285_HR_Res>

and interestingly i am not getting any error in sxmb_moni

it's not showing any error

plz suggest me something wht to do ....

thnks & regards

Aruna

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

You will need to mappings,

<b>HR REQ -- JDBC REQ

JDBC RES -- HR RES</b>

Is this what you have done?

Regards,

Bhavesh

Former Member
0 Kudos

yes i have done the same thing

bhavesh_kantilal
Active Contributor
0 Kudos

Aruna,

Few Quick questions,

1. Is it a synch scenario or are using a BPM? Can you give us the entire flow?

2. Is there any error in the Adapter Monitoring for your JDBC adapter?

3. Can you give us the mapping structure.

4. no error in MONI?

Regards,

Bhavesh