cancel
Showing results for 
Search instead for 
Did you mean: 

Access an Oracle DB using JDBC adapter

former_member181967
Participant
0 Kudos

Hi, I'm trying to make an simple test for checking if the connection between XI and Oracle DB is working fine and following the weblog nr. 2018 ( Save Time with generalized JDBC datatypes ) i've made my structures in order to achived that. I've declared the field action as SELECT than the table name ... and in the IB set the needed configurations. So when i exec my interface i've got the black/white flag bur if i look at the adapter engine i see that the JDBC adapter is achieved but i got 2 errors " <b>No 'action' attribute found in XML document('action' attribute missing or wrong XML structure)</b> and <b>Exception caught by adapter framework: error processing request in sax parser: No 'action' attribute found in XML document('action' attribute missing or wrong XML structure)</b>. Can anybody provide me some help ??? Thanks in advance.

JMMatos

Accepted Solutions (1)

Accepted Solutions (1)

moorthy
Active Contributor
0 Kudos

Hi,

Check your mapped xml is in correct format as required by JDBC adapter.

Check this blog- /people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30

Regards,

Moorthy

former_member181967
Participant
0 Kudos

Hi Moorthy, thanks for your attention. I've changed my data type for the field action, but now when I test my interface I've got the following error : <b>Exception caught by adapter framework: Error processing request in sax parser: Error when executing statement for table/stored proc. 'v01_sap_xi' (structure 'Statement'): java.lang.IndexOutOfBoundsException: Index: 4, Size: 4</b>.

Can you give me some help ??? Thanks again ...

JMMatos

moorthy
Active Contributor
0 Kudos

HI,

Again some problem with the XML structure .

Test the message mapping in IR with Test option, by giving input data from SXMB_MONI. And check are you getting any exception in the mapping?

Did you give correct parameters in the JDBC adapter? Check once again..

Regards,

Moorthy

bhavesh_kantilal
Active Contributor
0 Kudos

Jose,

Can you give us the destination datatype that is being passed to thwe JDBC adapter.

Regards,

Bhavesh

former_member181967
Participant
0 Kudos

Hi,

This is how my DT looks like:

Structure Category Type

Data_JDBCReceiver Complex Type

Statement

Table_name

action Attribute

table

access Data_FileSender

cod

key Data_FileSender

cod

This is my DT and in MM i fill field <b>action</b> with constant value(SELECT/INSERT), field <b>table</b> with the name of the corresponding DB table, fields <b>access/key</b> with constant value(empty). At this moment, I got the following error <b>Exception caught by adapter framework: Error processing request in sax parser: Error when executing statement for table/stored proc. 'v01_sap_xi' (structure 'Statement'): java.sql.SQLException: FATAL ERROR: Column 'cod' does not exist in table 'v01_sap_xi'</b>; according with the people responsible for the DB this column named <b>cod</b> does really exist !! What can I do ?!?!? Some help will be ... Thanks !!!

former_member181967
Participant
0 Kudos

Hi again,

I've done the test u suggest but no error is generated ... the JDBC parameters were confirmed to me as the correct ones ... now I got the error message : <b>Exception caught by adapter framework: Error processing request in sax parser: Error when executing statement for table/stored proc. 'v01_sap_xi' (structure 'Statement'): java.sql.SQLException: FATAL ERROR: Column 'cod' does not exist in table 'v01_sap_xi'</b>; but I've been confirmed that this column/field does really exist on DB table ... this field named <b>cod</b> belongs to my source DT definition ... Any help will be thankfull ...

JMMatos

moorthy
Active Contributor
0 Kudos

HI,

Can you give entire XML output after Mapping. (get from SXMB_MONI after mapping) This xml will be a input to JDBC adapter.

I think, some parameters,special characters, extra spaces,fields causing this problem.

Regards,

Moorthy

former_member181967
Participant
0 Kudos

<?xml version="1.0" encoding="UTF-8" ?>

- <ns0:Data_JDBCReceiver xmlns:ns0="http://liberbtn/xi">

- <Statement>

- <Table_Name action="INSERT">

<table>v01_sap_xi</table>

- <access>

<cod>02</cod>

</access>

</Table_Name>

</Statement>

</ns0:Data_JDBCReceiver>

Thanks

JMMatos

bhavesh_kantilal
Active Contributor
0 Kudos

Jose,

Can you make <b>COD in capitals</b> and try in your datatype.

Regards,

Bhavesh

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi

Map some constant to action attribute.Its a standard structure.You hav to map something to action cant leave it without mappin.

Regards

Vineetha

Former Member
0 Kudos

Jose,

Make sure that u have entered the action as an attribute?

As per the error messages that u got, the error seems to be in the DT definition.

-Naveen.

Former Member
0 Kudos

Hi Jose,

refer to the SAP Help for the proper document format: http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm

There is an attribute action to the tag dbTableName. If this is not filled, the adapter will not work. So check if that attribute has been filled in the message you try to send.

Regards

Christine