Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2007
    Posts
    2

    Unanswered: Number of input values does not match number of question

    Hi guys, well I am facing a problem last 2 days and I am really sick of it. I am deploying my application java/struts in a BEA Weblogic server and administrating my informix DB with k2 verity server. everything goes fine when I run my app but when trying to index the DB using a multiple choice form I get the following error, I am not posting everything cause it is not that much important.any suggestions? I have found the reason saying that the placeholders in the prepared statement do not match....etc but believe it doesn'match the true...

    [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)']
    09:38:13,484 [DEBUG] Populating cache
    [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)']
    09:38:13,484 [DEBUG] getting message from cache in getLocaleMessage
    [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)']
    09:38:13,484 [DEBUG] Message for key errors.required is null
    [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)']
    09:38:13,484 [DEBUG] Getting message from cache for keysearch.results
    [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)']
    09:38:13,484 [DEBUG] Message for key search.results is null
    [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)']
    09:38:13,484 [DEBUG] Getting properties from database using locale: el and quer
    y: SELECT TRIM(idlabel), TRIM(txtlabelvalue) from dlabelrelease where idapplicat
    ion=1 and idlanguage='en'
    [[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)']
    09:38:13,484 [DEBUG] Failed to load properties
    java.sql.SQLException: Number of input values does not match number of question
    marks
    at com.informix.util.IfxErrMsg.getSQLException(IfxErr Msg.java:373)
    at com.informix.jdbc.IfxPreparedStatement.checkParame terIndex(IfxPrepare
    dStatement.java:2884)
    at com.informix.jdbc.IfxPreparedStatement.setString(I fxPreparedStatement
    .java:1417)
    at weblogic.jdbc.wrapper.PreparedStatement.setString( PreparedStatement.j
    ava:711)
    at net.sf.reloadable.resource.messageresources.DBMess ageResources.getMes
    sagesAsProperties(DBMessageResources.java:85)
    at net.sf.reloadable.resource.messageresources.BaseRe loadableMessageReso
    urce.getMessage(BaseReloadableMessageResource.java :93)
    at net.sf.reloadable.resource.messageresources.BaseRe loadableMessageReso
    urce.getMessage(BaseReloadableMessageResource.java :57)
    at org.apache.struts.taglib.TagUtils.message(TagUtils .java:953)
    at org.apache.struts.taglib.bean.MessageTag.doStartTa g(MessageTag.java:2

  2. #2
    Join Date
    Aug 2006
    Location
    The Netherlands
    Posts
    248
    Hi, I'm not really aquainted with java apps and appservers but this is the message of the Informix finderr utility:
    Code:
    -79749  Number of input values does not match number of question marks.  
                                                                             
    The number of variables that you set using the PreparedStatement.setXXX()
    methods in this statement does not match the number of ? placeholders    
    that you wrote into the statement.                                       
                                                                             
    Locate the text of the statement and verify the number of placeholders,  
    and then check the calls to PreparedStatement.setXXX().
    Could it be that with dynamically building the prepare statement some arguments are omitted, because they have a null value e.g.?

    Regards

  3. #3
    Join Date
    Sep 2007
    Posts
    2
    Hey Tyveleyn I fixed the problem a couple of days back. jeah what you suppose is completely true. Some of my attributes n DB weren't set to "indexed" therefore I was getting those zero values. Thank you for your reply anyway, I hope that post being helpful for others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •