Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0018585
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminorsometimes2011-09-21 18:292011-11-22 17:43
ReportermarvintmView Statuspublic 
Assigned Toalostale 
PrioritynormalResolutionout of dateFixed in Version
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseOracleJava version
OS VersionDatabase versionAnt version
Product Version2.50MP33SCM revision 
Review Assigned To
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0018585: Grid shows a Javascript error alert when you scroll down to the last record

DescriptionIn an OB 2.50 environment with Oracle database, if a grid has a moderate amount of records, when you scroll down to the last record in the grid, a Javascript alert showing an error appears:

Missing IN or OUT parameter at index:: 9

There is also an exception in Tomcat:

QL error in query: SELECT COALESCE(TO_CHAR(AD_Table.Name),'') AS Name , COALESCE(TO_CHAR(AD_Table.Description),'') AS Description , COALESCE(AD_Table.IsActive, 'N') AS IsActive , COALESCE(TO_CHAR(AD_Table.TableName),'') AS TableName , COALESCE(AD_Table.IsView, 'N') AS IsView , COALESCE(TO_CHAR(AD_Table.Classname),'') AS Classname , AD_Table.AccessLevel AS AccessLevel , ((CASE td0.isActive WHEN 'N' THEN '**' ELSE '' END)|| (CASE WHEN td_trl0.name IS NULL THEN td0.name ELSE td_trl0.name END)) AS AccessLevel_R , AD_Table.Treetype AS Treetype , ((CASE td1.isActive WHEN 'N' THEN '**' ELSE '' END)|| (CASE WHEN td_trl1.name IS NULL THEN td1.name ELSE td_trl1.name END)) AS Treetype_R , AD_Table.AD_Window_ID AS AD_Window_ID , (CASE WHEN td_trl3.Name IS NULL THEN COALESCE(TO_CHAR(td2.Name),'') ELSE COALESCE(TO_CHAR(td_trl3.Name),'') END) AS AD_Window_ID_R , AD_Table.PO_Window_ID AS PO_Window_ID , (CASE WHEN td_trl5.Name IS NULL THEN COALESCE(TO_CHAR(td4.Name),'') ELSE COALESCE(TO_CHAR(td_trl5.Name),'') END) AS PO_Window_ID_R , COALESCE(AD_Table.IsDeleteable, 'N') AS IsDeleteable , COALESCE(AD_Table.IsHighVolume, 'N') AS IsHighVolume , COALESCE(AD_Table.IsFullyAudited, 'N') AS IsFullyAudited , AD_Table.Developmentstatus AS Developmentstatus , ((CASE td6.isActive WHEN 'N' THEN '**' ELSE '' END)|| (CASE WHEN td_trl6.name IS NULL THEN td6.name ELSE td_trl6.name END)) AS Developmentstatus_R , AD_Table.Acctdate_Column_ID AS Acctdate_Column_ID , COALESCE(TO_CHAR(td7.ColumnName),'') AS Acctdate_Column_ID_R , COALESCE(TO_CHAR(AD_Table.Acctclassname),'') AS Acctclassname , COALESCE(TO_CHAR(AD_Table.AD_Table_ID),'') AS AD_Table_ID
FROM AD_Table
left join (select IsActive, ad_ref_list_id, ad_reference_id, value, name from ad_ref_list) td0 on AD_Table.AccessLevel = td0.value AND td0.ad_reference_id = ?
left join (SELECT ad_language, name, ad_ref_list_id from ad_ref_list_trl) td_trl0 on td0.ad_ref_list_id = td_trl0.ad_ref_list_id AND td_trl0.ad_language = ?
left join (select IsActive, ad_ref_list_id, ad_reference_id, value, name from ad_ref_list) td1 on AD_Table.Treetype = td1.value AND td1.ad_reference_id = ?
left join (SELECT ad_language, name, ad_ref_list_id from ad_ref_list_trl) td_trl1 on td1.ad_ref_list_id = td_trl1.ad_ref_list_id AND td_trl1.ad_language = ?
left join (SELECT AD_Window_ID, Name FROM AD_Window) td2 on AD_Table.AD_Window_ID = td2.AD_Window_ID
 
left join (SELECT AD_Language, AD_Window_ID, Name FROM AD_Window_Trl) td_trl3 on td2.AD_Window_ID = td_trl3.AD_Window_ID AND td_trl3.AD_Language = ?
left join (SELECT AD_Window_ID AS tableID, Name FROM AD_Window) td4 on AD_Table.PO_Window_ID = td4.tableID
left join (SELECT AD_Language, AD_Window_ID, Name FROM AD_Window_Trl) td_trl5 on td4.tableID = td_trl5.AD_Window_ID AND td_trl5.AD_Language = ?
left join (select IsActive, ad_ref_list_id, ad_reference_id, value, name from ad_ref_list) td6 on AD_Table.Developmentstatus = td6.value AND td6.ad_reference_id = ?
left join (SELECT ad_language, name, ad_ref_list_id from ad_ref_list_trl) td_trl6 on td6.ad_ref_list_id = td_trl6.ad_ref_list_id AND td_trl6.ad_language = ?
left join (SELECT AD_Column_ID AS tableID, ColumnName FROM AD_Column) td7 on AD_Table.Acctdate_Column_ID = td7.tableID
WHERE (AD_Table.AD_Table_ID) IN (SELECT AD_Table_ID
 FROM (SELECT ROWNUM AS rn1, A.* FROM (
 SELECT AD_Table.AD_Table_ID
 FROM AD_Table
 WHERE AD_Table.AD_Client_ID IN ('0','0')
 AND AD_Table.AD_Org_ID IN ('0','0')
ORDER BY AD_Table.Name ASC, AD_Table.AD_Table_ID)
A)
  WHERE rn1 >= ?)
ORDER BY AD_Table.Name ASC, AD_Table.AD_Table_IDException:java.sql.SQLException: Missing IN or OUT parameter at index:: 9
4257684 [http-8080-4] ERROR org.openbravo.erpCommon.utility.DataGrid - Error in print page data: javax.servlet.ServletException: @CODE=17041@Missing IN or OUT parameter at index:: 9
javax.servlet.ServletException: @CODE=17041@Missing IN or OUT parameter at index:: 9
    at org.openbravo.erpCommon.utility.ExecuteQuery.select(ExecuteQuery.java:312)
    at org.openbravo.erpCommon.utility.DataGrid.printPageData(DataGrid.java:266)
    at org.openbravo.erpCommon.utility.DataGrid.doPost(DataGrid.java:84)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at org.openbravo.base.HttpBaseServlet.serviceInitialized(HttpBaseServlet.java:225)
    at org.openbravo.base.secureApp.HttpSecureAppServlet.service(HttpSecureAppServlet.java:483)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.openbravo.utils.SessionExpirationFilter.doFilter(SessionExpirationFilter.java:66)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.openbravo.utils.CharsetFilter.doFilter(CharsetFilter.java:35)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.openbravo.dal.core.DalRequestFilter$1.doAction(DalRequestFilter.java:81)
    at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:46)
    at org.openbravo.dal.core.DalRequestFilter.doFilter(DalRequestFilter.java:103)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:636)
Steps To Reproduce- In an OB 2.50 with Oracle, go to the Tables and Columns window
- Scroll down to the last record in that window.
- An error appears
Proposed SolutionSeems like the problem stems from the fact that in the TableSQLData class (which constructs the SQL statement finally executed), when rangeLength==0, but startPosition!=0, a part of the SQL statement is not added, but a parameter (which corresponds to the part of the SQL which wasn't added) is still generated, finally causing the error.

The underlying request done by the client seems not to make sense (as rangeLength==0, which is the equivalent of the client asking for no rows), but in any case, the Java class could be made more robust by taking into account this special situation, and producing an SQL which would return 0 rows, but would not fail.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to backport 00184362.50MP34 closedmarvintm 2.50 grid, cursors in Oracle are not reused 

-  Notes
(0043086)
alostale (manager)
2011-11-22 17:43

It doesn't apply to 3.0 grid

- Issue History
Date Modified Username Field Change
2011-09-21 18:29 marvintm New Issue
2011-09-21 18:29 marvintm Assigned To => alostale
2011-09-21 18:29 marvintm Modules => Core
2011-09-21 18:30 marvintm Relationship added related to 0018436
2011-09-21 21:41 shuehner Issue Monitored: shuehner
2011-11-22 17:43 alostale Note Added: 0043086
2011-11-22 17:43 alostale Status new => closed
2011-11-22 17:43 alostale Resolution open => out of date


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker