If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Number of input values does not match number of question

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-12-07, 03:22
theozaf theozaf is offline
Registered User
 
Join Date: Sep 2007
Posts: 2
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
Reply With Quote
  #2 (permalink)  
Old 09-14-07, 05:54
Tyveleyn Tyveleyn is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 09-14-07, 06:02
theozaf theozaf is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On