on 08-24-2009 11:09 PM
Hi Experts,
I have a CSV to JDBC scenario.
My sender data type is defined as
dt_sender
row element 1...unbounded
field1 element xsd:string 1...unbounded
field2 element xsd:string 1...unbounded
....
field15 element xsd:string 1...unbounded
My receiver data type is defined as
dt_receiver
statement element 1...1
test element 1...1
action attribute string optional
table element string 1...1
access element 1...unbounded
field1 element xsd:string 1...unbounded
field2 element xsd:string 1...unbounded
....
field15 element xsd:string 1...unbounded
I need to insert the data from the CSV file into the database.
I have done simple graphical mapping. The xml structure for the sender MT is
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_sender xmlns:ns0="http://csv2jdbc">
<row>
<field1/>
...
<field15/>
</Row>
</ns0:MT_sender>
When I test the mapping...it executes successfully. In the sender CC, I did filecontentconversion with the parameters
Recordset structure : row,*
row.fieldSeparator : \t
row.endSeparator : 'nl'
row.fieldNames : field1,...,field15
The xml file is being created successfully in the sender CC but is not being dropped into the receiver JDBC.
THe JDBC receiver channel is also connected properly. I know that there is some problem with mapping.
But I am unable to find what the error is. No data is being inserted into the table.
The actual payload from the file is
<?xml version="1.0" encoding="utf-8" ?>
- <ns:MT_sender xmlns:ns="http://csv2jdbc">
- <Recordset>
- <row>
<field1>xxxxxx</field1>
...
<field15>xxxxxx</field15>
</row>
- <row>
<field1>xxxxxx</field1>
...
<field15>xxxxxx</field15>
</row>
- <row>
<field1>xxxxxx</field1>
...
<field15>xxxxxx</field15>
</row>
</Recordset>
</ns:MT_sender>
PS: I did this scenario with the blog available for Flat file to JDBC.
Please help me out finding the error.
Regards.
HI DNSPK,
You can go two things:-
1. Take your source payload and test it in the message mapping. I believe that you might get an error there.
2. I feel your target structure is not well-defined. Make sure the values of all fields are coming in the incoming payload. Make sure you need the required cardinality. What you need is "0.. n", change your Datatype and/or mapping and it will work.
Try these and let us know if you still have problem.
Regards,
Neetesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
I have same issue,Can provide any inputs to reslove the issue.
The message successfully in SXMB_MONI.
But it is error on the RWB and my target message format below.
<?xml version="1.0" encoding="UTF-8" ?>
- <ns1:EmployeTable xmlns:ns1="urn:sample.com:I_Legacy_JDBC_Application">
- <STATEMENT>
- <ROW action="INSERT">
<TABLE>EMP_PI</TABLE>
- <Access>
<EMPLOYENAME>1234</EMPLOYENAME>
<EMPLOYENUMBER>Ramesh</EMPLOYENUMBER>
<SALERY>30000</SALERY>
</Access>
</ROW>
</STATEMENT>
</ns1:EmployeTable>
Regards,
Ramesh
Hi Rajesh,
I got error in RWB below
Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'EMP_PI' (structure 'STATEMENT'): java.sql.SQLException: ORA-00984: column not allowed here
8/25/09 12:09:01 PM 001517a9-63ac-1dee-a4a8-3f0beb53647a Error processing request in sax parser: Error when executing statement for table/stored proc. 'EMP_PI' (structure 'STATEMENT'): java.sql.SQLException: ORA-00984: column not allowed here
8/25/09 12:09:01 PM 001517a9-63ac-1dee-a4a8-3f0beb53647a Error while parsing or executing XML-SQL document: Error processing request in sax parser: Error when executing statement for table/stored proc. 'EMP_PI' (structure 'STATEMENT'): java.sql.SQLException: ORA-00984: column not allowed here
Regards,
Ramesh
Hi Neetesh,
I did not map the root nodes.
It is still giving the error
Cannot produce target element /ns0:MT_receiver/STATEMENT/ROW/access. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd
when I paste the original payload.
Any help will be greatly appreciated.
Regards.
Edited by: DNSPK on Aug 25, 2009 5:49 PM
Hi Neetesh,
I got it solved.
The problem was that in the data type I created the element "Row" has "R" as capital and the payload has "row" where "r" is in small letter. That's where the problem was. After carefully looking at it, I tried with the small "r" and it worked like a charm.
Thank you very much for all the help.
Regards.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.