cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC Adapter throws error for Null Data

Former Member
0 Kudos

Hi All,

I am running a interface Proxy to JDBC. But in case if proxy has no new data, the message which goes to the database is:

<b> <?xml version="1.0" encoding="utf-8" ?>

- <ns1:MT_Material xmlns:ns1="urn:sce-com:xi:fi:UnitEstimateData">

- <Insert_Material>

- <dbTableName action="INSERT">

<table>SCEI_UE_MATERIALS</table>

</dbTableName>

</Insert_Material>

</ns1:MT_Material></b>

and I get the error in RWB as <b>Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'SCEI_UE_MATERIALS' (structure 'Insert_Material'): java.sql.SQLException: FATAL ERROR document format in structure 'Insert_Material': expected 'access' tag(s) not found</b>.

Is there a way so that the JDBC adapter doesn't throw any error if there is no access node??

Pls advice...

XIer

Accepted Solutions (0)

Answers (1)

Answers (1)

justin_santhanam
Active Contributor
0 Kudos

Xier,

Generate teh node <Insert_Material> only if the data exists in the incoming payload.

You can use exists function for any of the mandatory segments and achieve the same.

raj.

Former Member
0 Kudos

But if I do that Raj, then it will create multiple 'Insert_Mterial' nodes with single 'Access' node each. But what I want is single 'Insert_Mterial' node with multiple 'Access' node.

pls advice. It's urgent...

Xier

Message was edited by:

XIer

Former Member
0 Kudos

I am uable to see the <b> access</b> in your JDBC message type that is required as per the JDBC adapter standard message type.

Thanks

Farooq.

Former Member
0 Kudos

Farooq,

If proxy sends no data, then access node is not created. BUt without access node the JDBC adapter is giving error in RWB.

Xier

justin_santhanam
Active Contributor
0 Kudos

Xier,

Why it will create multiple Insert_Material nodes? Use like this

Mandatory segment ->Remove context->Collapse Context ---> Exists -


>insert_material.

Try the above and let me know if it doesn't helps!!

raj.

former_member192892
Active Contributor
0 Kudos

Hey Raj,

Won't a parsing error be thrown this time also when an unformed XML appears at JDBC receiver??

justin_santhanam
Active Contributor
0 Kudos

Varun,

If i'm not wrong, there is no message at all in the payload hence nothing will be executed, we will wait for Xier and let see what happens.

raj,

former_member192892
Active Contributor
0 Kudos

Yeah, but still an MT_Material node will come isn't it....

I wanna know dis.. if XIer executes this successfully, then cool