cancel
Showing results for 
Search instead for 
Did you mean: 

Error inserting the Data in MySQL database

former_member6134
Participant
0 Kudos

Hello Experts,

   I doing a scenarion Client proxy-> PI -> MySQL Database. We are using a stored procedure at the MySQL database end. I am calling this stored procedure in my mapping program of the scenario with the EXECUTE action. When I am firing the scenario, the payload is generated after mapping which I can see in SXMB_MONI. But nothing is going in the MySQL database. Infact it throws an error as follows:

Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. 'sap_response_create_update' (structure 'STATEMENT'): com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Incorrect number of arguments for PROCEDURE tiltest.sap_response_create_update; expected 4, got 1

So I tried to see the string which is generated from the JDBC adapter to insert in MySQL database. To see this I had enabled in Advanced mode logSQLStatement =true to see the string in the AUDIT LOG. But unfortunately the string is not seen in the AUDIT LOG. The string is not generated.So we thought of receving whatever is sent from JDBC Adapter in MySQL Database. After firing the scenario we found value as 'null'. So practically nothing was sent from JDBC Adapater to MySQL Database. Whereas when I am doing the same scenario using insert operation the data is flowing properly into the database.

Only with the stored procedure way it is giving me the problem. I have properly constructed the structure for the stored procedure data type. Also the driver for MySQL is properly installed on PI server as INSERT operation is working fine.

What could be the problem? why the string is not seen in the AUDIT LOG inspite of specifying in the advanced mode as logSQLStatement =true. Why the data string is not generated in the JDBC Adapter, even though the payload is seen in the MONI transaction? Can somebody throw some light on this issue?

Thanking You

With Best Regards

Suk

Accepted Solutions (0)

Answers (2)

Answers (2)

ambrish_mishra
Active Contributor
0 Kudos

Hi,

Did you try to execute the stored procedure directly in the database. you can ask the DB point of contact to do that. Once it executes, you should check if the target JDBC structure is created properly.

This is a syntax issue.

Ambrish

iaki_vila
Active Contributor
0 Kudos

Hi,

What could be the problem? why the string is not seen in the AUDIT LOG inspite of specifying in the advanced mode as logSQLStatement =true.

As far as i know the parameter logSqlStatement doesn't work with stored procedures. (http://scn.sap.com/thread/1359926)

Could you put the XML with the stored procedure call?, i think is a good way to recheck the structure for the scn members.

Regards.