donclary Posted September 14, 2008 Share Posted September 14, 2008 I have a master report and three subreports that were created using iReport. The master and subreports all work correctly when run from iReport. The master report passes a LABELID parameter to the LabelSubreport to print a mailing label. The master report and label subreport jrxml files are attached.I am now calling the master report from a java app and the error below is generated by the first subreport.Table LABELLIST is the list of mailing labels and does exist. The LabelSubreport uses the same datasource as the Master. I could not get the SubreportApp.java example to work, but seems to imply that the subreports need to be set up as parameters?Any advice on the cause of my problem would be appreciated.Thank you!============================================================Filling report...Sep 13, 2008 4:07:37 PM net.sf.jasperreports.engine.fill.JRFillSubreport prepareSEVERE: Fill 15312834: exceptionnet.sf.jasperreports.engine.JRException: Error preparing statement for executing the report query :SELECT *FROM "LABELLIST" LABELLISTWHERE LABELID = ? at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createStatement(JRJdbcQueryExecuter.java:192) at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:123) at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:656) at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:588) at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:1196) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:833) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:782) at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:532) at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:63) at net.sf.jasperreports.engine.fill.JRThreadSubreportRunner.run(JRThreadSubreportRunner.java:209) at java.lang.Thread.run(Thread.java:595)Caused by: java.sql.SQLException: Table/View 'LABELLIST' does not exist. at org.apache.derby.client.am.SQLExceptionFactory.getSQLException(Unknown Source) at org.apache.derby.client.am.SqlException.getSQLException(Unknown Source) at org.apache.derby.client.am.Connection.prepareStatement(Unknown Source) at org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:248) at org.apache.commons.dbcp.PoolingDriver$PoolGuardConnectionWrapper.prepareStatement(PoolingDriver.java:367) at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createStatement(JRJdbcQueryExecuter.java:162) ... 10 moreCaused by: org.apache.derby.client.am.SqlException: Table/View 'LABELLIST' does not exist. at org.apache.derby.client.am.Statement.completeSqlca(Unknown Source) at org.apache.derby.client.net.NetStatementReply.parsePrepareError(Unknown Source) at org.apache.derby.client.net.NetStatementReply.parsePRPSQLSTTreply(Unknown Source) at org.apache.derby.client.net.NetStatementReply.readPrepareDescribeOutput(Unknown Source) at org.apache.derby.client.net.StatementReply.readPrepareDescribeOutput(Unknown Source) at org.apache.derby.client.net.NetStatement.readPrepareDescribeOutput_(Unknown Source) at org.apache.derby.client.am.Statement.readPrepareDescribeOutput(Unknown Source) at org.apache.derby.client.am.PreparedStatement.readPrepareDescribeInputOutput(Unknown Source) at org.apache.derby.client.am.PreparedStatement.flowPrepareDescribeInputOutput(Unknown Source) at org.apache.derby.client.am.PreparedStatement.prepare(Unknown Source) at org.apache.derby.client.am.Connection.prepareStatementX(Unknown Source) ... 14 moreException in thread "Thread-3" net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: Error preparing statement for executing the report query : Link to comment Share on other sites More sharing options...
andysusanto Posted September 5, 2009 Share Posted September 5, 2009 hai, i got this error too, when using a subreport. but this error i got after i upgrade to jasperreports-3.5.2 Regards, Andy Susanto Link to comment Share on other sites More sharing options...
Teodor Danciu Posted September 29, 2009 Share Posted September 29, 2009 Hi, I think you just need to check again that you are connecting indeed to the database you think you connect to.The exception tells exactly what is wrong and this has nothing to do with JasperReports.Simply the table or the view is not found in that database. I hope this helps.Teodor Link to comment Share on other sites More sharing options...
colighto Posted January 13, 2010 Share Posted January 13, 2010 "Caused by: java.sql.SQLException: Table/View 'LABELLIST' does not exist."This is just part of the error report being generated by the code you just might not be able to create a table or view that does have the name you indicated in your query. To solve it just double check whether the table does really exist in your database if does then check the accessibility of it in your server, you might just be able to set a particular settings that causes limitation on the accessibility of the table/view.Post Edited by colighto at 01/13/2010 10:47Post Edited by colighto at 01/13/2010 10:47 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