ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » IBM IIB - Invalid column index - URGENT

Post new topic  Reply to topic
 IBM IIB - Invalid column index - URGENT « View previous topic :: View next topic » 
Author Message
ajayrana
PostPosted: Fri May 09, 2014 6:27 pm    Post subject: IBM IIB - Invalid column index - URGENT Reply with quote

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
View user's profile Send private message
fjb_saper
PostPosted: Fri May 09, 2014 6:58 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
ajayrana
PostPosted: Sun May 11, 2014 7:39 pm    Post subject: Reply with quote

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
View user's profile Send private message
ajayrana
PostPosted: Tue May 13, 2014 12:54 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » IBM IIB - Invalid column index - URGENT
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.