|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
IBM IIB - Invalid column index - URGENT |
« View previous topic :: View next topic » |
Author |
Message
|
ajayrana |
Posted: Fri May 09, 2014 6:27 pm Post subject: IBM IIB - Invalid column index - URGENT |
|
|
Apprentice
Joined: 08 May 2014 Posts: 35
|
Hi,
I am trying to update a database(Oracle 11g) column with a where clause in the mapping file. I m using an xpath expression to compare the incoming value with database column.
The update where clause looks like this in the property :
Code: |
TO_NUMBER(EMI.CREDIT_CARDS.ACCOUNT_NUMBER) = ?
Xpath Expression : (Place holder -> ?)
$MessageAssembly/EXBS/body/ACCOUNT_NO |
Every time i test the above it is giving me an error :
Code: |
RecoverableException BIP3947E: The map processing for QName ''{default}:CARD_ACOUNTS_UPSERT'' has failed, with the following details: ''RDBUpdate: let $dbupdate1 := jdbc:update('xe', 'EMI.CREDIT_CARDS', $dbupdate1_var_params, 'TO_NUMBER(EMI.CREDIT_CARDS.ACCOUNT_NUMBER) = ? ', ( $Body0/body/ACCOUNT_NO ) , xs:int('0'), false(), true() )''.
The processing of the map has failed.
Review and resolve the problems indicated in the message from the map processing.
2014-05-10 07:07:27.708338 5133 RecoverableException BIP3949E: An error occurred during the processing of a message. The error message is ''java.sql.SQLException: Invalid column index
Invalid column index |
''.
Now, when i change the clause to :
Code: |
TO_NUMBER(EMI.CREDIT_CARDS.ACCOUNT_NUMBER) = 12345 |
the update works perfectly.
Need to know if I'm missing something and how to pass the index value in the Xpath expression.
Thanks in advance !!!
-Ajay Rana |
|
Back to top |
|
 |
fjb_saper |
Posted: Fri May 09, 2014 6:58 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
So when it works, what you're passing to your expression is already a number...
How does it behave if the account number is char type, for example '12345 ' say a number with trailing spaces ??
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
ajayrana |
Posted: Sun May 11, 2014 7:39 pm Post subject: |
|
|
Apprentice
Joined: 08 May 2014 Posts: 35
|
Thanks for the quick reply !!
I'm pretty sure that is not the issue. The same expression works when you send a single record to the flow. The problem is coming when i am doing the update inside the 'for each' when multiple messages are coming.
And in the Xpath expression i don't have any index value coming.
IS there anyone who has used the for update inside for each with Xpath expression ???
Thanks in advance !! |
|
Back to top |
|
 |
ajayrana |
Posted: Tue May 13, 2014 12:54 am Post subject: |
|
|
Apprentice
Joined: 08 May 2014 Posts: 35
|
Hi All,
Found the solution to update inside the for each loop with Xpath expression.
The Xpath value should be :
$body/ACCOUNT_NUMBER
and not
$MessageAssembly/EXBS/body[1]/ACCOUNT_NUMBER
because with the for each we are sending the current body only and we dont need to mention the whole path.
-Ajay Rana |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|