I am getting an error from SQLDataSource when I setStartRow(0) and setEndRow(1). This is a com.isomorphic.datasource.DSRequest created and executed server side, not one coming in from the client. If I remove the setStartRow() and setEndRow() the request executes just fine. But I only need one record in the result which could be quite large so I want to limit the request so it uses jdbc windowing to get just one record. Here is the server log showing the request and error.
Code:
=== 2010-07-11 15:43:30,893 [0-13] INFO SQLDataSource - [builtinApplication.getDefaults, builtinApplication.null] Performing fetch operation with criteria: {IVEN:"1",ISTY:"1",ICLS:"100"} values: {IVEN:"1",ISTY:"1",ICLS:"100"} === 2010-07-11 15:43:30,894 [0-13] INFO SQLDataSource - [builtinApplication.getDefaults, builtinApplication.null] derived query: SELECT $defaultSelectClause FROM $defaultTableClause WHERE $defaultWhereClause === 2010-07-11 15:43:30,894 [0-13] DEBUG SQLDataSource - [builtinApplication.getDefaults, builtinApplication.null] Executing row count query: SELECT COUNT(*) FROM $defaultTableClause WHERE $defaultWhereClause === 2010-07-11 15:43:30,894 [0-13] DEBUG SQLDataSource - [builtinApplication.getDefaults, builtinApplication.null] Eval'd row count query: SELECT COUNT(*) FROM IPITHDR WHERE (IPITHDR.IVEN=1 AND IPITHDR.ISTY=1 AND IPITHDR.ICLS=100) === 2010-07-11 15:43:30,894 [0-13] DEBUG PoolableSQLConnectionFactory - [builtinApplication.getDefaults, builtinApplication.null] DriverManager fetching connection for as400 via jdbc url jdbc:as400://iwave;naming=system;prompt=false;user=IPGUI;password=IPGUI;libraries=IPTSFILO,IPWMFILO,IPDSFILO,IPPAFILO,IPASFILO === 2010-07-11 15:43:30,894 [0-13] DEBUG PoolableSQLConnectionFactory - [builtinApplication.getDefaults, builtinApplication.null] Passing JDBC URL only to getConnection === 2010-07-11 15:43:31,457 [0-13] DEBUG PoolableSQLConnectionFactory - [builtinApplication.getDefaults, builtinApplication.null] Returning pooled Connection === 2010-07-11 15:43:31,457 [0-13] INFO SQLDriver - [builtinApplication.getDefaults, builtinApplication.null] Executing SQL query on 'as400': SELECT COUNT(*) FROM IPITHDR WHERE (IPITHDR.IVEN=1 AND IPITHDR.ISTY=1 AND IPITHDR.ICLS=100) === 2010-07-11 15:43:32,033 [0-13] DEBUG SQLDataSource - [builtinApplication.getDefaults, builtinApplication.null] JDBC driver windowed select rows 0->1, result size 1. Query: SELECT IPITHDR.ISLC3, IPITHDR.ISLC4, IPITHDR.ISLC1, IPITHDR.ISLC2, IPITHDR.IUAC4, IPITHDR.IUAC3, IPITHDR.IUAC2, IPITHDR.IUAC1, IPITHDR.IFDC1, IPITHDR.IFDC2, IPITHDR.IFDC3, IPITHDR.IFDC4, IPITHDR.ICTP, IPITHDR.IALT, IPITHDR.IHLD, IPITHDR.IPUU1, IPITHDR.IPUU2, IPITHDR.IPUU3, IPITHDR.IPUU4, IPITHDR.IBSS, IPITHDR.IPKT, IPITHDR.IVPC3, IPITHDR.IVPC2, IPITHDR.IVPC1, IPITHDR.IVPC4, IPITHDR.IRTR3, IPITHDR.IRTR4, IPITHDR.IPLU, IPITHDR.IRTR1, IPITHDR.IRTR2, IPITHDR.IPPI5, IPITHDR.IPPI4, IPITHDR.IPPI1, IPITHDR.IPPI3, IPITHDR.IPPI2, IPITHDR.IBYR, IPITHDR.IPRQ10, IPITHDR.IBGU2, IPITHDR.IBGU1, IPITHDR.ICYC, IPITHDR.IBGU4, IPITHDR.IBGU3, IPITHDR.IPRN10, IPITHDR.ISUQ, IPITHDR.IPKTYPE, IPITHDR.IRNK, IPITHDR.ISUD, IPITHDR.ISUG, IPITHDR.ILVC, IPITHDR.IRTU2, IPITHDR.IRTU3, IPITHDR.IRTU4, IPITHDR.ISTS, IPITHDR.IRTU1, IPITHDR.ISTY, IPITHDR.ISTG, IPITHDR.IPRQ01, IPITHDR.IPRQ05, IPITHDR.IPRQ04, IPITHDR.IPRQ03, IPITHDR.IPRQ02, IPITHDR.IPRQ09, IPITHDR.IPRQ08, IPITHDR.IPRQ07, IPITHDR.IPRQ06, IPITHDR.ITRK, IPITHDR.IAPR4, IPITHDR.IAPR3, IPITHDR.IAPR2, IPITHDR.IAPR1, IPITHDR.ICLS, IPITHDR.ICLR, IPITHDR.IDUN, IPITHDR.IVRR4, IPITHDR.IVRR3, IPITHDR.IVRR2, IPITHDR.IVRR1, IPITHDR.IORDPCT, IPITHDR.IATT01, IPITHDR.IATT02, IPITHDR.IATT03, IPITHDR.IATT04, IPITHDR.IATT05, IPITHDR.IATT06, IPITHDR.IATT07, IPITHDR.IATT09, IPITHDR.IATT08, IPITHDR.IBGR2, IPITHDR.IBGR3, IPITHDR.IBGR1, IPITHDR.IPAR4, IPITHDR.IBGR4, IPITHDR.IPAR3, IPITHDR.ISRC, IPITHDR.IPAR2, IPITHDR.IATT10, IPITHDR.IPAR1, IPITHDR.IORT, IPITHDR.IATT13, IPITHDR.IATT14, IPITHDR.IATT11, IPITHDR.IATT12, IPITHDR.IATT17, IPITHDR.IATT18, IPITHDR.IATT15, IPITHDR.ITRD, IPITHDR.IATT16, IPITHDR.IPRC01, IPITHDR.IPRC02, IPITHDR.ITTO, IPITHDR.IPRC03, IPITHDR.ISPQ, IPITHDR.ITTI, IPITHDR.IPRC04, IPITHDR.ISPR, IPITHDR.IATT19, IPITHDR.IPRC05, IPITHDR.IZPR, IPITHDR.ICOD, IPITHDR.IPRC06, IPITHDR.IRST, IPITHDR.IPMS#1, IPITHDR.IPRC07, IPITHDR.IPRI10, IPITHDR.IGSK, IPITHDR.IPRI03, IPITHDR.ICOM, IPITHDR.IPRN04, IPITHDR.IPRD04, IPITHDR.IPPR5, IPITHDR.ILRD, IPITHDR.IPRI02, IPITHDR.IPRN03, IPITHDR.IPRD03, IPITHDR.IPRI05, IPITHDR.IPRN02, IPITHDR.IPRD06, IPITHDR.IATT20, IPITHDR.IPRI04, IPITHDR.IPRN01, IPITHDR.IPRD05, IPITHDR.IATT21, IPITHDR.IPRI07, IPITHDR.IPPR1, IPITHDR.IPRI06, IPITHDR.ICOR, IPITHDR.IPPR2, IPITHDR.IPRI09, IPITHDR.ISQF, IPITHDR.IPRD02, IPITHDR.IPPR3, IPITHDR.IPRI08, IPITHDR.IPRD01, IPITHDR.IPPR4, IPITHDR.IATT26, IPITHDR.IATT27, IPITHDR.IATT28, IPITHDR.IPRN09, IPITHDR.IATT29, IPITHDR.IPRN08, IPITHDR.IATT22, IPITHDR.IPRN07, IPITHDR.IRSZ, IPITHDR.IATT23, IPITHDR.IPRN06, IPITHDR.IATT24, IPITHDR.ILRI, IPITHDR.IPRN05, IPITHDR.IATT25, IPITHDR.IPRD09, IPITHDR.ILOCF, IPITHDR.IPRI01, IPITHDR.IPRC10, IPITHDR.IRTN, IPITHDR.IPRD07, IPITHDR.IPRD08, IPITHDR.ILOCC, IPITHDR.IATT31, IPITHDR.IVST, IPITHDR.IATT32, IPITHDR.ILSD, IPITHDR.IATT30, IPITHDR.IPRD10, IPITHDR.IHPR1, IPITHDR.IATT39, IPITHDR.IHPR2, IPITHDR.IPRC09, IPITHDR.IHPR3, IPITHDR.IATT37, IPITHDR.IPRC08, IPITHDR.IATT38, IPITHDR.IATT35, IPITHDR.IATT36, IPITHDR.IATT33, IPITHDR.ILSI, IPITHDR.IATT34, IPITHDR.IDQT, IPITHDR.ICR#, IPITHDR.IVSR2, IPITHDR.ILPI, IPITHDR.IVSR3, IPITHDR.IVSR1, IPITHDR.IVSR4, IPITHDR.ILPD, IPITHDR.IRVN, IPITHDR.ITMP, IPITHDR.IDPT, IPITHDR.IMUC, IPITHDR.IITR, IPITHDR.IMTP, IPITHDR.INVC, IPITHDR.IPPC, IPITHDR.IGMR4, IPITHDR.IGMR3, IPITHDR.IGMR1, IPITHDR.IGMR2, IPITHDR.ILNF, IPITHDR.IPUR4, IPITHDR.IAPU1, IPITHDR.IUSER, IPITHDR.IGTINTP, IPITHDR.IAPU2, IPITHDR.IAPU3, IPITHDR.IAPU4, IPITHDR.ISKU, IPITHDR.IUPU2, IPITHDR.IUPU1, IPITHDR.IUPU4, IPITHDR.IUPU3, IPITHDR.IPUR3, IPITHDR.IPPK, IPITHDR.IPUR2, IPITHDR.IPUR1, IPITHDR.IDSTPCT, IPITHDR.IWKH, IPITHDR.IUAU4, IPITHDR.ITKT, IPITHDR.IUAU1, IPITHDR.IUAU2, IPITHDR.IUAU3, IPITHDR.IDES, IPITHDR.ISLR4, IPITHDR.ISLR1, IPITHDR.ISLR3, IPITHDR.ISLR2, IPITHDR.IRTC4, IPITHDR.IUPR1, IPITHDR.IRTC1, IPITHDR.IUPR2, IPITHDR.IUPR3, IPITHDR.IRTC3, IPITHDR.IUPR4, IPITHDR.IRTC2, IPITHDR.IVLC, IPITHDR.IHPI1, IPITHDR.IHPI2, IPITHDR.IHPI3, IPITHDR.IBGC3, IPITHDR.IBGC4, IPITHDR.IBGC1, IPITHDR.IBGC2, IPITHDR.IVMR4, IPITHDR.IVMR3, IPITHDR.IVMR2, IPITHDR.ISLU1, IPITHDR.ISLU2, IPITHDR.ITIR, IPITHDR.ITIU, IPITHDR.IVIR, IPITHDR.IPPS3, IPITHDR.IPPS2, IPITHDR.IPPS5, IPITHDR.IPPS4, IPITHDR.IMKD, IPITHDR.ITIC, IPITHDR.IPPS1, IPITHDR.IATC5, IPITHDR.IATC6, IPITHDR.IATC3, IPITHDR.IATC4, IPITHDR.IATC1, IPITHDR.IATC2, IPITHDR.IMIN, IPITHDR.IATC0, IPITHDR.IATC9, IPITHDR.IATC8, IPITHDR.IATC7, IPITHDR.ISLU4, IPITHDR.ISLU3, IPITHDR.IVMR1, IPITHDR.IMLT, IPITHDR.IVRU2, IPITHDR.IAV#2, IPITHDR.IVRU3, IPITHDR.IAV#1, IPITHDR.IAV#4, IPITHDR.IVRU1, IPITHDR.IAV#3, IPITHDR.IATT50, IPITHDR.IVRU4, IPITHDR.IFRD, IPITHDR.IFRI, IPITHDR.IMMH, IPITHDR.IDIV, IPITHDR.IUAR4, IPITHDR.IUAR3, IPITHDR.IATT49, IPITHDR.IUAR2, IPITHDR.IATT48, IPITHDR.IUAR1, IPITHDR.IATT47, IPITHDR.IATT46, IPITHDR.IVPR, IPITHDR.IATT45, IPITHDR.IATT44, IPITHDR.IATT43, IPITHDR.IATT42, IPITHDR.IATT41, IPITHDR.IATT40, IPITHDR.IFSD, IPITHDR.IFSI, IPITHDR.IAVI1, IPITHDR.IAVI2, IPITHDR.IAVI3, IPITHDR.IAVI4, IPITHDR.IHPD3, IPITHDR.IHPD2, IPITHDR.IHPD1, IPITHDR.ISBN, IPITHDR.IFTC, IPITHDR.IXD2, IPITHDR.ICGP, IPITHDR.ISBD, IPITHDR.ITFR, IPITHDR.IXDI, IPITHDR.ISAL, IPITHDR.ILET, IPITHDR.IVNC, IPITHDR.ITFI, IPITHDR.IWT2, IPITHDR.IVCH, IPITHDR.IVCL, IPITHDR.IVCM, IPITHDR.ICRV4, IPITHDR.ICRV3, IPITHDR.IUCD, IPITHDR.ICRV2, IPITHDR.ICRV1, IPITHDR.IVCT, IPITHDR.ILDL, IPITHDR.IVCU, IPITHDR.ILDI, IPITHDR.ISDS, IPITHDR.IWTP, IPITHDR.IOPEN1, IPITHDR.IOPEN2, IPITHDR.ISBY, IPITHDR.IQCT, IPITHDR.IVCW, IPITHDR.IRCL, IPITHDR.INCI, IPITHDR.IRCR, IPITHDR.INCD, IPITHDR.IRCV, IPITHDR.IPAC3, IPITHDR.IPMC3, IPITHDR.IPAC4, IPITHDR.IPMC4, IPITHDR.IPAC1, IPITHDR.IPMC1, IPITHDR.IPAC2, IPITHDR.IPMC2, IPITHDR.IVAP, IPITHDR.IECT, IPITHDR.IBIN, IPITHDR.IS#T, IPITHDR.IREASON, IPITHDR.ILAD, IPITHDR.ILAI, IPITHDR.ISET, IPITHDR.IADF, IPITHDR.IVAT, IPITHDR.IGMC4, IPITHDR.IGTIN, IPITHDR.IGMC3, IPITHDR.IGMC2, IPITHDR.IGMC1, IPITHDR.IPKQTY, IPITHDR.IFAS, IPITHDR.IVRC2, IPITHDR.IPWM#1, IPITHDR.IVRC3, IPITHDR.IVRC4, IPITHDR.IFAD, IPITHDR.IFAI, IPITHDR.IEAN, IPITHDR.IACC, IPITHDR.IVRC1, IPITHDR.IBAS, IPITHDR.IPUC1, IPITHDR.IPUC2, IPITHDR.IPUC3, IPITHDR.IPUC4, IPITHDR.ICCD, IPITHDR.IVWM#2, IPITHDR.IVWM#3, IPITHDR.IWHB, IPITHDR.IWHE, IPITHDR.IALC3, IPITHDR.IALC4, IPITHDR.IALC1, IPITHDR.IALC2, IPITHDR.IVEN, IPITHDR.IDDC, IPITHDR.IREC, IPITHDR.IDDX, IPITHDR.IRET, IPITHDR.ISIZ FROM IPITHDR WHERE (IPITHDR.IVEN=1 AND IPITHDR.ISTY=1 AND IPITHDR.ICLS=100) === 2010-07-11 15:43:32,035 [0-13] WARN RequestContext - dsRequest.execute() failed: java.lang.NullPointerException at com.isomorphic.sql.SQLDataSource.executeWindowedSelect(SQLDataSource.java:1506) at com.isomorphic.sql.SQLDataSource.SQLExecute(SQLDataSource.java:1145) at com.isomorphic.sql.SQLDataSource.execute(SQLDataSource.java:249) at com.islandpacific.gui.server.customDataSource.IpDataSource.execute(IpDataSource.java:152) at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:721) at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:658) at com.isomorphic.application.AppBase.execute(AppBase.java:491) at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1336) at com.islandpacific.gui.server.customDataSource.PoItemDS.getDefaults(PoItemDS.java:110) at com.islandpacific.gui.server.customDataSource.PoItemDS.execute(PoItemDS.java:42) at com.isomorphic.application.AppBase.executeDefaultDSOperation(AppBase.java:721) at com.isomorphic.application.AppBase.executeAppOperation(AppBase.java:658) at com.isomorphic.application.AppBase.execute(AppBase.java:491) at com.isomorphic.datasource.DSRequest.execute(DSRequest.java:1336) at com.isomorphic.servlet.IDACall.handleDSRequest(IDACall.java:155) at com.islandpacific.gui.server.customDataSource.IpIDACall.handleDSRequest(IpIDACall.java:47) at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:106) at com.isomorphic.servlet.IDACall.doPost(IDACall.java:54) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1097) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:188) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) at com.islandpacific.gui.security.IpConcurrentSessionFilter.doFilter(IpConcurrentSessionFilter.java:55) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:149) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088) at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
Comment