Jump to content
Changes to the Jaspersoft community edition download ×

Exception in running a report


senthil_teen

Recommended Posts

Hi ,

Iam encountering a strange problm in my project.

Here is the situation.

I have a screen where i execute multiple select,insert queries.At the same time if another user connects to the same server and runs a report encorporated in my project designed using IReports. i get an STRANGE EXCEPTION.I get this only when

when i run the above mentioned screen.

 

In my Project i use the following code to get the connection to excecute the queries for my logic and not for executing the report query....

 

 

 

public static Connection getConnection() throws SQLException{

if(con != null && !(con.isClosed()))

{

return con;

}

DataSource ds = null;

try{

ds = (DataSource)ContextWrapper.lookup("java:/PostgresDS");

con = ds.getConnection();

}

catch(Exception e){

e.printStackTrace();

}

 

return con;

}

 

 

THE EXCEPTION WHICH I GET IN THE SERVER IS

at

 

net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createStatement(JRJdbcQueryExecuter.j

 

ava:164)

at

 

net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.

 

java:103)

at

 

net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:673

 

)

at

 

net.sf.jasperreports.engine.fill.JRFillDataset.setDatasource(JRFillDataset.java:610)

at

 

net.sf.jasperreports.engine.fill.JRFillDataset.setParameterValues(JRFillDataset.java:599)

at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:845)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:683)

at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:641)

at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63)

at

 

net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402)

at

 

net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:234)

at

 

net.sf.jasperreports.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:203)

at com.htc.egov.framework.report.servlet.ReportServlet.generatePDF(Unknown Source)

at com.htc.egov.framework.report.servlet.ReportServlet.process(Unknown Source)

at com.htc.egov.framework.report.servlet.ReportServlet.doGet(Unknown Source)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

at

 

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.jav

 

a:237)

at

 

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

at com.htc.egov.framework.web.AuthorizationFilter.doFilter(Unknown Source)

at

 

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.jav

 

a:186)

at

 

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)

at

 

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.jav

 

a:186)

at

 

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)

at

 

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

at

 

org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)

at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)

at

 

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

at

 

org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:66)

at

 

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

at

 

org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java

 

:153)

at

 

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:54)

at

 

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)

at

 

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)

at

 

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

at

 

org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)

at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)

at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)

at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)

at

 

org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Pro

 

tocol.java:705)

at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)

at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)

at java.lang.Thread.run(Thread.java:534)

Caused by: java.sql.SQLException: Connection handle has been closed and is unusable

at

 

org.jboss.resource.adapter.jdbc.WrappedConnection.checkStatus(WrappedConnection.java:737)

at

 

org.jboss.resource.adapter.jdbc.WrappedConnection.checkTransaction(WrappedConnection.java:7

 

21)

at

 

org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:2

 

02)

at

 

net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createStatement(JRJdbcQueryExecuter.j

 

ava:142)

... 52 more

net.sf.jasperreports.engine.JRException: Error preparing statement for executing the

 

report query :

 

 

 

AT THE SAME TIME THE MESSAGE WHICH I GET IN THE REPORT WINDOW IS

 

 

net.sf.jasperreports.engine.JRException: Error preparing statement for executing the report query : select period_name, ORGS.ORGS_ID, PRS.PRS_ID, PRS.PERSON, RO.RO_DESCRIPTION, PMG.GRD_ID, ACPS.D_AMOUNT, PRS.PRS_DATE_OF_JOIN, RGNO.REGISTRATION_NUMBER from vu_pma_persons prs left outer join pma_grade pmg on prs.prs_grd_sk = pmg.grd_sk, actual_payslip ACPS, pay_period pp, PMA_ORG_PERSON_ROLES OPR, PMA_ORGANIZATION_STRUCTURES ORGS, PMA_ROLES RO, E_D_TYPE EDT, PMA_NATURE_OF_JOBS NOJ, bp_business_partner bp, bp_registration_number RGNO, bp_registration_type RGT where bp.business_partner_sk = prs.prs_bpc_party_sk and ACPS.pay_period_sk = pp.pay_period_sk and ACPS.prs_sk = prs.prs_sk and OPR_PRS_SK = PRS.PRS_SK and OPR.OPR_ORGS_SK = ORGS.ORGS_SK and OPR.OPR_RO_SK = RO.RO_SK and ACPS.E_D_TYPE_SK = EDT.E_D_TYPE_SK and EDT.E_D_TYPE_CODE = 'CTDRD' and PRS.prs_noj_sk = NOJ.NOJ_SK AND RO.RO_IS_SALARIED ='Y' and OPR.OPR_PRIMARY_FLAG ='Y' and pp.pay_period_sk = 12 and rgno.business_partner_sk = bp.business_partner_sk AND RGT.REGISTRATION_TYPE = 'RD_NUMBER' AND RGT.REGISTRATION_TYPE_SK=RGNO.REGISTRATION_TYPE_SK and acps.arrear_flag = 'N' and ORGS.ORGS_IS_PAY_APPLICABLE='Y' order by PRS.PRS_ID

 

 

 

Can Anyone Help me in this situation.......

 

Thanks in advance

Post edited by: senthil_teen, at: 2007/01/22 05:35

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...