Hi All im running ibatis on WAS 5.0 ... this is an abator generated selectByExample query using a Date field....doing a greater or equals.
CODE = public static int getNumberOverdue() { Date now = new Date(); DaoManager daoManager = SQLWriter.getDaoManager(); ManufactureRequestLineDAO mrlDao = (ManufactureRequestLineDAO)daoManager.getDao(ManufactureRequestLineDAO.c lass); ManufactureRequestLineExample mre = new ManufactureRequestLineExample(); mre.setOrderDueD(now); mre.setOrderDueD_Indicator(mre.EXAMPLE_GREATER_THAN_OR_EQUAL); List l = mrlDao.selectByExample(mre); return l.size(); } When I run it standalone on the PC it works ok.....run it in WAS on AIX and I get the exception below. I think it may be British Summer Times fault.... but why does it work on my PC ? Is there anything I can set in ibatis to make this work ok ? Original Exception: Error Message: Failed to queryForList - id [oper_manufacture_request_line.abatorgenerated_selectByExample], parameterObject [{orderDueD=Tue Apr 25 19:55:13 BST 2006, AND_ORDER_DUE_D_GE=Y}]. Cause: com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred while applying a parameter map. --- Check the oper_manufacture_request_line.abatorgenerated_selectByExample-InlinePara meterMap. --- Check the statement (query failed). --- Cause: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0114E Datetime field overflow. SQLSTATE=22008 Caused by: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0114E Datetime field overflow. SQLSTATE=22008 Error Code: 500 Target Servlet: null Error Stack: com.ibatis.dao.client.DaoException: Failed to queryForList - id [oper_manufacture_request_line.abatorgenerated_selectByExample], parameterObject [{orderDueD=Tue Apr 25 19:55:13 BST 2006, AND_ORDER_DUE_D_GE=Y}]. Cause: com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred while applying a parameter map. --- Check the oper_manufacture_request_line.abatorgenerated_selectByExample-InlinePara meterMap. --- Check the statement (query failed). --- Cause: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0114E Datetime field overflow. SQLSTATE=22008 Caused by: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0114E Datetime field overflow. SQLSTATE=22008 Caused by: com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred while applying a parameter map. --- Check the oper_manufacture_request_line.abatorgenerated_selectByExample-InlinePara meterMap. --- Check the statement (query failed). --- Cause: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0114E Datetime field overflow. SQLSTATE=22008 Caused by: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0114E Datetime field overflow. SQLSTATE=22008 at com.ibatis.dao.client.template.SqlMapDaoTemplate.queryForList(SqlMapDaoT emplate.java) at egl.dao.ManufactureRequestLineDAOImpl.selectByExample(ManufactureRequest LineDAOImpl.java) at egl.dao.ManufactureRequestLineDAOImpl.selectByExample(ManufactureRequest LineDAOImpl.java) at java.lang.reflect.Method.invoke(Native Method) at com.ibatis.dao.engine.impl.DaoProxy.invoke(DaoProxy.java) at $Proxy35.selectByExample(Unknown Source) at egl.treetable.WebFacade.getNumberOverdue(WebFacade.java) at egl.treetable.WebFacade.getTable(WebFacade.java) at org.apache.jsp._home._jspService(_home.java) at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java (Compiled Code)) at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code)) at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service (JspServlet.java(Compiled Code)) at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet .java(Compiled Code)) at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java(C ompiled Code)) at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictSe rvletInstance.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLi fecycleServlet.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycle Servlet.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLif ecycleServlet.java(Inlined Compiled Code)) at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance. java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(Vali dServletReferenceState.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(Servle tInstanceReference.java(Inlined Compiled Code)) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispa tch(WebAppRequestDispatcher.java(Compiled Code)) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRe questDispatcher.java(Compiled Code)) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq uestDispatcher.java(Compiled Code)) at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java(C ompiled Code)) at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInv oker.java(Compiled Code)) at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocati on(CachedInvocation.java(Compiled Code)) at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(Servle tRequestProcessor.java(Compiled Code)) at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSELis tener.java(Compiled Code)) at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection .java(Compiled Code)) at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java( Compiled Code)) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java(Compiled Code)) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code)) Caused by: com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred while applying a parameter map. --- Check the oper_manufacture_request_line.abatorgenerated_selectByExample-InlinePara meterMap. --- Check the statement (query failed). --- Cause: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0114E Datetime field overflow. SQLSTATE=22008 Caused by: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0114E Datetime field overflow. SQLSTATE=22008 at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQuery WithCallback(GeneralStatement.java) at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQuery ForList(GeneralStatement.java) at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMap ExecutorDelegate.java) at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMap ExecutorDelegate.java) at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessi onImpl.java) at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClient Impl.java) at com.ibatis.dao.client.template.SqlMapDaoTemplate.queryForList(SqlMapDaoT emplate.java) at egl.dao.ManufactureRequestLineDAOImpl.selectByExample(ManufactureRequest LineDAOImpl.java) at egl.dao.ManufactureRequestLineDAOImpl.selectByExample(ManufactureRequest LineDAOImpl.java) at java.lang.reflect.Method.invoke(Native Method) at com.ibatis.dao.engine.impl.DaoProxy.invoke(DaoProxy.java) at $Proxy35.selectByExample(Unknown Source) at egl.treetable.WebFacade.getNumberOverdue(WebFacade.java) at egl.treetable.WebFacade.getTable(WebFacade.java) at org.apache.jsp._home._jspService(_home.java) at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java (Compiled Code)) at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code)) at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service (JspServlet.java(Compiled Code)) at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet .java(Compiled Code)) at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java(C ompiled Code)) at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictSe rvletInstance.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLi fecycleServlet.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycle Servlet.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLif ecycleServlet.java(Inlined Compiled Code)) at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance. java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(Vali dServletReferenceState.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(Servle tInstanceReference.java(Inlined Compiled Code)) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispa tch(WebAppRequestDispatcher.java(Compiled Code)) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRe questDispatcher.java(Compiled Code)) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq uestDispatcher.java(Compiled Code)) at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java(C ompiled Code)) at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInv oker.java(Compiled Code)) at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocati on(CachedInvocation.java(Compiled Code)) at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(Servle tRequestProcessor.java(Compiled Code)) at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSELis tener.java(Compiled Code)) at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection .java(Compiled Code)) at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java( Compiled Code)) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java(Compiled Code)) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code)) Caused by: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver] CLI0114E Datetime field overflow. SQLSTATE=22008 at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExcepti onGenerator.java(Compiled Code)) at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExcepti onGenerator.java(Inlined Compiled Code)) at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(SQLExceptio nGenerator.java(Compiled Code)) at COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute2(DB2PreparedStatement. java(Compiled Code)) at COM.ibm.db2.jdbc.app.DB2PreparedStatement.execute(DB2PreparedStatement.j ava(Compiled Code)) at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecute(WSJdbcPrepa redStatement.java(Compiled Code)) at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.execute(WSJdbcPrepared Statement.java(Compiled Code)) at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor. java) at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQu ery(GeneralStatement.java) at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQuery WithCallback(GeneralStatement.java) at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQuery ForList(GeneralStatement.java) at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMap ExecutorDelegate.java) at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMap ExecutorDelegate.java) at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessi onImpl.java) at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClient Impl.java) at com.ibatis.dao.client.template.SqlMapDaoTemplate.queryForList(SqlMapDaoT emplate.java) at egl.dao.ManufactureRequestLineDAOImpl.selectByExample(ManufactureRequest LineDAOImpl.java) at egl.dao.ManufactureRequestLineDAOImpl.selectByExample(ManufactureRequest LineDAOImpl.java) at java.lang.reflect.Method.invoke(Native Method) at com.ibatis.dao.engine.impl.DaoProxy.invoke(DaoProxy.java) at $Proxy35.selectByExample(Unknown Source) at egl.treetable.WebFacade.getNumberOverdue(WebFacade.java) at egl.treetable.WebFacade.getTable(WebFacade.java) at org.apache.jsp._home._jspService(_home.java) at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java (Compiled Code)) at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code)) at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service (JspServlet.java(Compiled Code)) at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet .java(Compiled Code)) at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java(C ompiled Code)) at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictSe rvletInstance.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLi fecycleServlet.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycle Servlet.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLif ecycleServlet.java(Inlined Compiled Code)) at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance. java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(Vali dServletReferenceState.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(Servle tInstanceReference.java(Inlined Compiled Code)) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispa tch(WebAppRequestDispatcher.java(Compiled Code)) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRe questDispatcher.java(Compiled Code)) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq uestDispatcher.java(Compiled Code)) at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java(C ompiled Code)) at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInv oker.java(Compiled Code)) at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocati on(CachedInvocation.java(Compiled Code)) at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(Servle tRequestProcessor.java(Compiled Code)) at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSELis tener.java(Compiled Code)) at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection .java(Compiled Code)) at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java( Compiled Code)) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java(Compiled Code)) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code)) Error Page Exception: Error Message: File not found: null Error Code: 404 Target Servlet: SimpleFileServlet Error Stack: com.ibm.ws.webcontainer.webapp.WebAppErrorReport: File not found: null at com.ibm.ws.webcontainer.srt.SRTServletResponseContext.sendError(SRTServl etResponseContext.java:174) at com.ibm.ws.webcontainer.srt.SRTServletResponse.sendError(SRTServletRespo nse.java:676) at com.ibm.ws.webcontainer.servlet.SimpleFileServlet.doGet(SimpleFileServle t.java(Compiled Code)) at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code)) at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictSe rvletInstance.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLi fecycleServlet.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycle Servlet.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLif ecycleServlet.java(Inlined Compiled Code)) at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance. java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(Vali dServletReferenceState.java(Compiled Code)) at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(Servle tInstanceReference.java(Inlined Compiled Code)) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispa tch(WebAppRequestDispatcher.java(Compiled Code)) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRe questDispatcher.java(Compiled Code)) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppReq uestDispatcher.java(Compiled Code)) at com.ibm.ws.webcontainer.webapp.WebApp.handleError(WebApp.java(Compiled Code)) at com.ibm.ws.webcontainer.webapp.WebApp.sendError(WebApp.java(Inlined Compiled Code)) at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java(C ompiled Code)) at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInv oker.java(Compiled Code)) at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocati on(CachedInvocation.java(Compiled Code)) at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(Servle tRequestProcessor.java(Compiled Code)) at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSELis tener.java(Compiled Code)) at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection .java(Compiled Code)) at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java( Compiled Code)) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java(Compiled Code)) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code)) -----Original Message----- From: Ted Schrader [mailto:[EMAIL PROTECTED] Sent: 25 April 2006 16:52 To: user-java@ibatis.apache.org Subject: Re: pager in ibatis Hi, So, let's add caching to the equation. Will the caching mechanism cache the entire results of a query, or simply the paginated "section" of the result set? My assumption is that it will cache the whole result set, or at least as much as the cache definition allows. Thanks! Ted On 12/04/06, Yusuf <[EMAIL PROTECTED]> wrote: > I think it's better off making the paging logic yourself in the > application, and then querying only the records you want to show, for > example in oracle you can use the rownum to fetch the data like > > select * from > (select rownum row, a.* from tabel1 as a) > where row between 21 and 30 > > because using the queryForPaginatedList (without caching) will always > fetch the entire result and then showing only the selected records, and > if the record count is high (like thousands..) then the performance will > be bad. > > cmiiw, > Yusuf. > > -----Original Message----- > From: John Chien [mailto:[EMAIL PROTECTED] > Sent: Wednesday, April 12, 2006 11:27 PM > To: user-java@ibatis.apache.org > Subject: Re: pager in ibatis > > > L:arry: > > Thank you for the information. > The queryForPaginatedList() will return a list, then I can check for the > > existence of successive records by calling the isNextPageAvailable(). > and go to that page by calling gotoPage(); > > However, I can not keep this list in my server due to concurrecy reason. > Does that mean that I have to call the same method every time and give > it the page number for it to return me the records ? > > I am doing the web development. > How can I make use of this returned list in JSP with Struct development > ? > > Should I keep the list in the session or request scope ? > > Thanks, > > John Chien > > Larry Meadors wrote: > > >queryForPaginatedList() > > > >Larry > > > > > >On 4/12/06, John Chien <[EMAIL PROTECTED]> wrote: > > > > > >>Dear sir: > >> > >>I have a feature that requires me to return query result of a > selection > >>statment in certain amount of successive records every time. > >>This is just like a page. > >> > >>For example: > >> > >>SELECT id, name > >>FROM employee; > >> > >>The selection result of this statement is a list. > >>However, I want to only get 30 records every time. > >>For the first call, I want to get the first 30 (1 - 30) records, for > >>thext call, I would like to get the next 30 (31 - 60) records. > >> > >>How can I do this in Ibatis ? > >> > >>Thanks, > >> > >>John Chien > >> > >> > >> > >> > >> > >