[jira] Commented: (IBATIS-148) Capability to use dynamic sql within iterates
[ http://issues.apache.org/jira/browse/IBATIS-148?page=comments#action_12314804 ] Brandon Goodin commented on IBATIS-148: --- Holy log files and configs batman! ;-) Please provide me a simple example that reproduces the error you are experiencing. > Capability to use dynamic sql within iterates > - > > Key: IBATIS-148 > URL: http://issues.apache.org/jira/browse/IBATIS-148 > Project: iBatis for Java > Type: Improvement > Components: SQL Maps > Versions: 2.0.9b, 2.1.0 > Reporter: Sam Abeyratne > Assignee: Brandon Goodin > > I am getting the following error when I try to run a simple query that has a > dynamic within an iterate tag. Per Brandon, this is a known > issue that needs to be fixed. > Thanks! > Sam > 2005-06-06 17:11:25,284 [HttpRequestHandler-2083] DEBUG xxxDAO.class - > Parameters: {sidList=[abc1, abc2], carrier=ABCDE1, interfaceType=DSP} > 2005-06-06 17:11:25,284 [HttpRequestHandler-2083] DEBUG xxxDAO.class - > Calling queryForList with statementName: queryInterfaceErrorCount and > parameters: {sidList=[abc1, abc2], carrier= ABCDE1, interfaceType=DSP} > 2005-06-06 17:11:25,294 [HttpRequestHandler-2083] ERROR > xxxDispatchAction.class - Entered catch block in viewErrorLog: Exception in > queryInterfaceErrorCount: com.ibatis.common.beans.ProbeException: Error > getting ordinal list from JavaBean. Cause java.lang.NumberFormatException: > For input string: "" Caused by: java.lang.NumberFormatException: For input > string: "" > The sqlmap looks something like: > resultMap="interface_error_count_result" > cacheModel="interface_error_count_cache"> > select sum(count) as count > from > ( > > select count(*) as count > from [EMAIL PROTECTED] > where interface_type = #interfaceType# > > carrier_name = #carrier# > > > ) > > > Java bean looks like: > public class InterfaceErrorCount { > private int count; > public int getCount() { > return count; > } > public void setCount(int count) { > this.count = count; > } > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (IBATIS-148) Capability to use dynamic sql within iterates
[ http://issues.apache.org/jira/browse/IBATIS-148?page=comments#action_12314920 ] Manfred Klug commented on IBATIS-148: - Brandon, a small variation of your test reveals the problem. the java code: public void testIterateNestedListPropertyC() throws SQLException { Account account = new Account(); account.setFirstName("Clinton"); Account newAccount = new Account(); newAccount.setLastName ("Jones"); account.setAccountList(new ArrayList()); account.getAccountList().add(newAccount); List list = sqlMap.queryForList("iterateNestedListPropertyC", account); //assertAccount1((Account) list.get(0)); //assertEquals(3, list.size()); } the mapped statement code: select ACC_ID as id, ACC_FIRST_NAME as firstName, ACC_LAST_NAME as lastName, ACC_EMAIL as emailAddress from ACCOUNT ACC_LAST_NAME = #accountList[].lastName# ACC_FIRST_NAME = #firstName# the final sql statement is: select ACC_ID as id, ACC_FIRST_NAME as firstName, ACC_LAST_NAME as lastName, ACC_EMAIL as emailAddress from ACCOUNT WHERE ACC_LAST_NAME = ? OR ACC_FIRST_NAME = ? the passed in parameters are: [0] = Clinton [1] = Jones and this is the problem. The correct parameters should be: [0] = Jones [1] = Clinton > Capability to use dynamic sql within iterates > - > > Key: IBATIS-148 > URL: http://issues.apache.org/jira/browse/IBATIS-148 > Project: iBatis for Java > Type: Improvement > Components: SQL Maps > Versions: 2.0.9b, 2.1.0 > Reporter: Sam Abeyratne > Assignee: Brandon Goodin > > I am getting the following error when I try to run a simple query that has a > dynamic within an iterate tag. Per Brandon, this is a known > issue that needs to be fixed. > Thanks! > Sam > 2005-06-06 17:11:25,284 [HttpRequestHandler-2083] DEBUG xxxDAO.class - > Parameters: {sidList=[abc1, abc2], carrier=ABCDE1, interfaceType=DSP} > 2005-06-06 17:11:25,284 [HttpRequestHandler-2083] DEBUG xxxDAO.class - > Calling queryForList with statementName: queryInterfaceErrorCount and > parameters: {sidList=[abc1, abc2], carrier= ABCDE1, interfaceType=DSP} > 2005-06-06 17:11:25,294 [HttpRequestHandler-2083] ERROR > xxxDispatchAction.class - Entered catch block in viewErrorLog: Exception in > queryInterfaceErrorCount: com.ibatis.common.beans.ProbeException: Error > getting ordinal list from JavaBean. Cause java.lang.NumberFormatException: > For input string: "" Caused by: java.lang.NumberFormatException: For input > string: "" > The sqlmap looks something like: > resultMap="interface_error_count_result" > cacheModel="interface_error_count_cache"> > select sum(count) as count > from > ( > > select count(*) as count > from [EMAIL PROTECTED] > where interface_type = #interfaceType# > > carrier_name = #carrier# > > > ) > > > Java bean looks like: > public class InterfaceErrorCount { > private int count; > public int getCount() { > return count; > } > public void setCount(int count) { > this.count = count; > } > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (IBATIS-148) Capability to use dynamic sql within iterates
[ http://issues.apache.org/jira/browse/IBATIS-148?page=comments#action_12314970 ] Brandon Goodin commented on IBATIS-148: --- Blargh! I have the same failure in my test too :( CURRENTLY IS: [0] = 99 [1] = 1 [2] = 99 [3] = 2 [4] = 99 [5] = 3 SHOULD BE: [0] = 1 [1] = 99 [2] = 2 [3] = 99 [4] = 3 [5] = 99 I'll fix it > Capability to use dynamic sql within iterates > - > > Key: IBATIS-148 > URL: http://issues.apache.org/jira/browse/IBATIS-148 > Project: iBatis for Java > Type: Improvement > Components: SQL Maps > Versions: 2.0.9b, 2.1.0 > Reporter: Sam Abeyratne > Assignee: Brandon Goodin > > I am getting the following error when I try to run a simple query that has a > dynamic within an iterate tag. Per Brandon, this is a known > issue that needs to be fixed. > Thanks! > Sam > 2005-06-06 17:11:25,284 [HttpRequestHandler-2083] DEBUG xxxDAO.class - > Parameters: {sidList=[abc1, abc2], carrier=ABCDE1, interfaceType=DSP} > 2005-06-06 17:11:25,284 [HttpRequestHandler-2083] DEBUG xxxDAO.class - > Calling queryForList with statementName: queryInterfaceErrorCount and > parameters: {sidList=[abc1, abc2], carrier= ABCDE1, interfaceType=DSP} > 2005-06-06 17:11:25,294 [HttpRequestHandler-2083] ERROR > xxxDispatchAction.class - Entered catch block in viewErrorLog: Exception in > queryInterfaceErrorCount: com.ibatis.common.beans.ProbeException: Error > getting ordinal list from JavaBean. Cause java.lang.NumberFormatException: > For input string: "" Caused by: java.lang.NumberFormatException: For input > string: "" > The sqlmap looks something like: > resultMap="interface_error_count_result" > cacheModel="interface_error_count_cache"> > select sum(count) as count > from > ( > > select count(*) as count > from [EMAIL PROTECTED] > where interface_type = #interfaceType# > > carrier_name = #carrier# > > > ) > > > Java bean looks like: > public class InterfaceErrorCount { > private int count; > public int getCount() { > return count; > } > public void setCount(int count) { > this.count = count; > } > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (IBATIS-148) Capability to use dynamic sql within iterates
[ http://issues.apache.org/jira/browse/IBATIS-148?page=comments#action_12315075 ] Brandon Goodin commented on IBATIS-148: --- This isssue is fixed. The unit tests are now functioning properly. For those who were having problems, please check it out and make sure it is working properly. > Capability to use dynamic sql within iterates > - > > Key: IBATIS-148 > URL: http://issues.apache.org/jira/browse/IBATIS-148 > Project: iBatis for Java > Type: Improvement > Components: SQL Maps > Versions: 2.0.9b, 2.1.0 > Reporter: Sam Abeyratne > Assignee: Brandon Goodin > > I am getting the following error when I try to run a simple query that has a > dynamic within an iterate tag. Per Brandon, this is a known > issue that needs to be fixed. > Thanks! > Sam > 2005-06-06 17:11:25,284 [HttpRequestHandler-2083] DEBUG xxxDAO.class - > Parameters: {sidList=[abc1, abc2], carrier=ABCDE1, interfaceType=DSP} > 2005-06-06 17:11:25,284 [HttpRequestHandler-2083] DEBUG xxxDAO.class - > Calling queryForList with statementName: queryInterfaceErrorCount and > parameters: {sidList=[abc1, abc2], carrier= ABCDE1, interfaceType=DSP} > 2005-06-06 17:11:25,294 [HttpRequestHandler-2083] ERROR > xxxDispatchAction.class - Entered catch block in viewErrorLog: Exception in > queryInterfaceErrorCount: com.ibatis.common.beans.ProbeException: Error > getting ordinal list from JavaBean. Cause java.lang.NumberFormatException: > For input string: "" Caused by: java.lang.NumberFormatException: For input > string: "" > The sqlmap looks something like: > resultMap="interface_error_count_result" > cacheModel="interface_error_count_cache"> > select sum(count) as count > from > ( > > select count(*) as count > from [EMAIL PROTECTED] > where interface_type = #interfaceType# > > carrier_name = #carrier# > > > ) > > > Java bean looks like: > public class InterfaceErrorCount { > private int count; > public int getCount() { > return count; > } > public void setCount(int count) { > this.count = count; > } > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (IBATIS-148) Capability to use dynamic sql within iterates
[ http://issues.apache.org/jira/browse/IBATIS-148?page=comments#action_12315187 ] Sam Abeyratne commented on IBATIS-148: -- It works now! Brandon and Manfred, thank you very much for helping us out on this bug. Again, all of us here truly appreciate your efforts in resolving issues and providing timely responses to our questions. It has been a pleasant experience working with iBatis and the iBatis team! Batman will try to lay low for a while now :-) Thanks again! Sam > Capability to use dynamic sql within iterates > - > > Key: IBATIS-148 > URL: http://issues.apache.org/jira/browse/IBATIS-148 > Project: iBatis for Java > Type: Improvement > Components: SQL Maps > Versions: 2.0.9b, 2.1.0 > Reporter: Sam Abeyratne > Assignee: Brandon Goodin > Fix For: 2.1.5 > > I am getting the following error when I try to run a simple query that has a > dynamic within an iterate tag. Per Brandon, this is a known > issue that needs to be fixed. > Thanks! > Sam > 2005-06-06 17:11:25,284 [HttpRequestHandler-2083] DEBUG xxxDAO.class - > Parameters: {sidList=[abc1, abc2], carrier=ABCDE1, interfaceType=DSP} > 2005-06-06 17:11:25,284 [HttpRequestHandler-2083] DEBUG xxxDAO.class - > Calling queryForList with statementName: queryInterfaceErrorCount and > parameters: {sidList=[abc1, abc2], carrier= ABCDE1, interfaceType=DSP} > 2005-06-06 17:11:25,294 [HttpRequestHandler-2083] ERROR > xxxDispatchAction.class - Entered catch block in viewErrorLog: Exception in > queryInterfaceErrorCount: com.ibatis.common.beans.ProbeException: Error > getting ordinal list from JavaBean. Cause java.lang.NumberFormatException: > For input string: "" Caused by: java.lang.NumberFormatException: For input > string: "" > The sqlmap looks something like: > resultMap="interface_error_count_result" > cacheModel="interface_error_count_cache"> > select sum(count) as count > from > ( > > select count(*) as count > from [EMAIL PROTECTED] > where interface_type = #interfaceType# > > carrier_name = #carrier# > > > ) > > > Java bean looks like: > public class InterfaceErrorCount { > private int count; > public int getCount() { > return count; > } > public void setCount(int count) { > this.count = count; > } > } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
FW: [jira] Commented: (IBATIS-148) Capability to use dynamic sql within iterates
t: [4, null, null, null, 55707, 06/27/2005 19:08:17 GMT, AWSCV2, 0053, 14253397378, 62000, 62140, Data Validation Error, PrevMSISDN and MSISDN values cannot be identical - duplicate msisdn-prevMsisdn, null, null, null, null, Provisioning, CBPS111989929737100, boboapp01a:10010] 2005-06-28 11:39:38,605 [HttpRequestHandler-320] DEBUG java.sql.ResultSet - {rset-100179} Result: [5, null, null, null, 55707, 06/27/2005 19:08:17 GMT, AWSCV2, 1001, 14253397378, 62000, 62140, Data Validation Error, PrevMSISDN and MSISDN values cannot be identical - duplicate msisdn-prevMsisdn, null, null, null, null, Provisioning, CBPS111989929737100, boboapp01a:10010] 2005-06-28 11:39:38,605 [HttpRequestHandler-320] DEBUG java.sql.ResultSet - {rset-100179} Result: [6, null, null, null, 55707, 06/27/2005 19:08:17 GMT, AWSCV2, 1020, 14253397378, 62000, 62140, Data Validation Error, PrevMSISDN and MSISDN values cannot be identical - duplicate msisdn-prevMsisdn, null, null, null, null, Provisioning, CBPS111989929737100, boboapp01a:10010] 2005-06-28 11:39:38,605 [HttpRequestHandler-320] DEBUG java.sql.ResultSet - {rset-100179} Result: [7, null, null, null, 55707, 06/27/2005 19:08:17 GMT, AWSCV2, 4400, 14253397378, 62000, 62140, Data Validation Error, PrevMSISDN and MSISDN values cannot be identical - duplicate msisdn-prevMsisdn, null, null, null, null, Provisioning, CBPS111989929737100, boboapp01a:10010] 2005-06-28 11:39:38,605 [HttpRequestHandler-320] DEBUG mimtools.common.BaseDAO.class - Multiple Query successful. Result list length: 7 2005-06-28 11:39:38,605 [HttpRequestHandler-320] DEBUG mimtools.common.BaseDAO.class - Commit successful 2005-06-28 11:39:38,685 [HttpRequestHandler-320] DEBUG com.ibatis.common.jdbc.SimpleDataSource - Returned connection 303 to pool. 2005-06-28 11:39:38,685 [HttpRequestHandler-320] DEBUG mimtools.common.BaseDAO.class - < performMultiplePRVServerQuery 2005-06-28 11:39:38,685 [HttpRequestHandler-320] DEBUG mimtools.errors.ErrorDAO.class - < queryInterfaceErrorLog 2005-06-28 11:39:38,685 [HttpRequestHandler-320] DEBUG mimtools.errors.ErrorService.class - < getInterfaceErrorLog 2005-06-28 11:39:38,685 [HttpRequestHandler-320] DEBUG mimtools.common.MIMToolsDispatchAction.class - errorLog size: 7 2005-06-28 11:39:38,685 [HttpRequestHandler-320] DEBUG mimtools.common.MIMToolsDispatchAction.class - < viewErrorLog 2005-06-28 11:39:38,685 [HttpRequestHandler-320] DEBUG org.apache.struts.action.RequestProcessor - processForwardConfig(ForwardConfig[name=errorLog,path=/errorLog.jsp,redi rect=false,contextRelative=false]) 2005-06-28 11:39:39,136 [HttpRequestHandler-320] DEBUG mimtools.common.MIMToolsActionServlet.class - < doPost -----Original Message- From: Abeyratne, Sam Sent: Tuesday, June 28, 2005 11:54 AM To: 'Brandon Goodin (JIRA)' Subject: RE: [jira] Commented: (IBATIS-148) Capability to use dynamic sql within iterates Hi Brandon, Sorry for the long delay in getting back to you on this. I am attaching two logs. The first one is when the 'carrier' parameter is set to 'All' (carrier is All.txt) and the second is when the 'carrier' parameter is set to 'AWSCV2' (carrier is AWSCV2.txt). As you can see, although the carrier value gets passed, I end up getting 0 as the result. But, if I run the same query directly on the DB, I get a result back. You may notice the carrier condition with 'AWSCV2' should give the same result since all of the records have a carrier-name of 'AWSCV2' So in this case having 'All', or 'AWSCV2' should result in the same data set. The funny thing is that the issue arises only when I have an extra parameter, in this case, #interfaceType#. I have similar queries which has the iterate and the dynamic portion, but only has sidList[] and #carrier# as parameters in the sqlMap. I am using oracle.jdbc.driver.OracleDriver The Oracle version is 9.2.0.4 Thanks for all your help Sam * My SQLMap looks like this: * select rn, d.error_id, d.event_timestamp, d.msisdn, d.carrier_name, d.subscriber_num, d.error_cleared_ind, d.cleared_by, d.cleared_timestamp, d.locked_ind, d.locked_by, d.locked_timestamp, d.product_id, d.interface_type, d.major_error_code, d.major_error_desc, d.minor_error_code, d.minor_error_desc, d.master_bpid, d.location from ( select rownum as rn, c.error_id, c.event_timestamp, c.msisdn, c.carrier_name, c.subscriber_num, c.error_cleared_ind, c.cleared_by, c.cleared_timestamp, c.locked_ind, c.locked_by, c.locked_timestamp, c.product_id, c.interface_type, c.major_error_code, c.major_er