cancel
Showing results for 
Search instead for 
Did you mean: 

Error in JDBC lookup

Former Member
0 Kudos

I am receiving an error in XI thrown in my Java UDF. The error is as follows:

com.sap.aii.mapping.lookup.LookupException: Exception during processing the payload.Problem when calling an adapter by using communication channel Portal_DB_Receiver (Party: , Service: SUPPCONN_DATABASE_D, Object ID: 83faea76ab6738869ee4f0bde6aa28c5) XI AF API call failed. Module exception: (No information available). Cause Exception: 'Error processing request in sax parser: Error when executing statement for table/stored proc. 'table' (structure 'statement'): java.sql.SQLException: ORA-01009: missing mandatory parameter '. com.sap.aii.mapping.lookup.LookupException: Problem when calling an adapter by using communication channel Portal_DB_Receiver (Party: , Service: SUPPCONN_DATABASE_D, Object ID: 83faea76ab6738869ee4f0bde6aa28c5) XI AF API call failed. Module exception: (No information available). Cause Exception: 'Error processing request in sax parser: Error when executing statement for table/stored proc. 'table' (structure 'statement'): java.sql.SQLException: ORA-01009: missing mandatory parameter '.

The UDF is reponsible for querying/posting/deleting data from and to the database I am connecting to. There are about an average of 25 SQL statements being run however, on the last statement, this error shows up. Would the appearance of the & character have something to do with this (since the JDBC adapter converts the SQL statement to XML format)?

Here is the sample of the generated SQL statement that fails: INSERT INTO VENDOR_DELIVERY_SCH_HEADER(CONTRACT_NUMBER,PODATE,VENDOR_SAP_CODE_ID,VENDOR_NAME,VENDOR_STREET,CITY,PO_BOX,POSTAL_CODE,COUNTRY_KEY,COUNTRY_ISO,PGPLANT,PGPLANTNO) VALUES ('N6A-5500003691','20080414','0010001155','INTERNATIONAL FLAVORS & F','600 STATE HWY 36','HAZLET',null,'07730','US','US','AVENEL PLANT','1728').

Thanks.

Accepted Solutions (0)

Answers (8)

Answers (8)

Former Member
0 Kudos

Hi Rommel,

Can you paste the xml structure as coming in the Moni payload after mapping?

Regards,

Shamly.

Former Member
0 Kudos

Hi Shamly,

Yep, already did that. I use DBVisualizer and it posts the data using the SQL statement I posted here.

Best Regards,

Rommel

aashish_sinha
Active Contributor
0 Kudos

Hi,

Make sure the length field of the VARCHAR variable used to hold the SQL statement has been set correctly before calling the PREPARE statement also Check the syntax for the call and enter all required parameters.

Regards

Aashish Sinha

PS : reward points if helpful

Former Member
0 Kudos

Already did that. I copied the generated SQL Statement to a tool which exposes the database and the query successfuly posts the data so there shouldn't be an issue with the compliance of the inserted data to the schema of the database.

GabrielSagaya
Active Contributor
0 Kudos

INSERT INTO VENDOR_DELIVERY_SCH_HEADER(CONTRACT_NUMBER,PODATE,VENDOR_SAP_CODE_ID,VENDOR_NAME,VENDOR_STREET,CITY,PO_BOX,POSTAL_CODE,COUNTRY_KEY,COUNTRY_ISO,PGPLANT,PGPLANTNO) VALUES ('N6A-5500003691','20080414','0010001155','INTERNATIONAL FLAVORS','600 STATE HWY 36','HAZLET',null,'07730','US','US','AVENEL PLANT','1728')

please remove & or

use \& in 'INTERNATIONAL FLAVORS & F'

http://ncr-01009.ora-code.com/

Former Member
0 Kudos

Hi Rommel,

Did you copy this SQL statement from the message display tool?

Can you run this statement directly through some oracle tool and see whether it is inserting?

Regards,

Shamly.

Former Member
0 Kudos

Hi Shamly,

All of the database fields are VARCHAR.

Thanks!

Former Member
0 Kudos

Hi Rommel,

Is the PODATE field defined as a varchar2 in the DB table or is it a date field?

Regards,

Shamly.

Former Member
0 Kudos

check the belwo threads

regards

chandra

Former Member
0 Kudos