g.someda Posted April 13, 2007 Share Posted April 13, 2007 hi, I'm quite new to jasperReports and I have a problem: I use a query on Oracle database as a datasource, and want an Excel file as output.If I run the report on iReport it works fine, but trying to use it in a jsp page on tomcat (any version and JDK) it works only on a single row (or empty) result set.when my query returns more than one row i get the following exception: java.lang.IndexOutOfBoundsException: Index: 11, Size: 11 at java.util.ArrayList.RangeCheck(Unknown Source) at java.util.ArrayList.get(Unknown Source) at com.codestudio.sql.SmartResultSet.getObject(SmartResultSet.java:539) at com.codestudio.sql.SmartResultSet.wasNull(SmartResultSet.java:1302) at net.sf.jasperreports.engine.JRResultSetDataSource.getFieldValue(JRResultSetDataSource.java:237) at net.sf.jasperreports.engine.fill.JRFillDataset.setOldValues(JRFillDataset.java:799) at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:763) at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1078) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:111) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:751) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:660) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402) at org.apache.jsp.printJasperReport_jsp._jspService(printJasperReport_jsp.java:158) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666) at java.lang.Thread.run(Unknown Source) Nested by:net.sf.jasperreports.engine.JRException: Unable to get value for field 'CSE_CDC_SCT' of class 'java.lang.String' at net.sf.jasperreports.engine.JRResultSetDataSource.getFieldValue(JRResultSetDataSource.java:314) at net.sf.jasperreports.engine.fill.JRFillDataset.setOldValues(JRFillDataset.java:799) at net.sf.jasperreports.engine.fill.JRFillDataset.next(JRFillDataset.java:763) at net.sf.jasperreports.engine.fill.JRBaseFiller.next(JRBaseFiller.java:1078) at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:111) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:751) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:660) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402) at org.apache.jsp.printJasperReport_jsp._jspService(printJasperReport_jsp.java:158) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2417) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:193) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:781) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:549) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:589) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:666) at java.lang.Thread.run(Unknown Source) the message is always on the first column of the result set, no matter what column is the first I fetch and no matter how many columns I have. I attach my report jrxml, please tell me what I'm doing wrong. Link to comment Share on other sites More sharing options...
g.someda Posted April 13, 2007 Author Share Posted April 13, 2007 my report is too large to attach it. thanks in advance for any help Link to comment Share on other sites More sharing options...
lucianc Posted April 13, 2007 Share Posted April 13, 2007 I'd say this is a Poolman issue (note that the exception is thrown by com.codestudio.sql.SmartResultSet). Regards,Lucian Link to comment Share on other sites More sharing options...
g.someda Posted April 13, 2007 Author Share Posted April 13, 2007 thanks, but I don't know if that's the cause of the problem...the real problem seems to be that the filler doesn't recognize the end of the record in the result set and doesn't move to the next record...and so the first column of the second result is out of the Array of the fields. Link to comment Share on other sites More sharing options...
g.someda Posted April 13, 2007 Author Share Posted April 13, 2007 thanks a lot, you were perfectly right: using a normal JDBC connection directly in the jsp and normal drivers instead of the poolman it runs just smooth...now I have another problem: i wrote some excek formulas in some cells, but in my output I just have the "=" character. how can I write formulas in my report and have them calculated by Excel?thank you very mutch again for your help Link to comment Share on other sites More sharing options...
lucianc Posted April 13, 2007 Share Posted April 13, 2007 I suggest posting your new question in a fresh thread. Continuing a (logically closed) thread with another question that has nothing to do with the original topic is confusing. Regards,Lucian Link to comment Share on other sites More sharing options...
g.someda Posted April 13, 2007 Author Share Posted April 13, 2007 absolutely right, but i found another problem: the output I had splits all data accordingly to the results I have, but I always have same details in every row. Is that a problem with filling data and evaluation time or just another problem with looping over the result set?thanks again Giovanni Link to comment Share on other sites More sharing options...
g.someda Posted April 13, 2007 Author Share Posted April 13, 2007 as I supposed, that's just a problem with the evaluation time and I got over it already, so i'll just look at the forum and maybe open a new topic about my excel formulas problem.thanks for all your helpbest regards Giovanni Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now