kam1 Posted April 7, 2009 Share Posted April 7, 2009 I met some problem with JasperServer3.1. I created the report by using ireport3.1.4 .And the weird thing is that the report usually runs well on server.But sometimes it gets error like below. it gets error like 2 of 5 days.(Report is run daily as a schedule). com.jaspersoft.jasperserver.api.JSExceptionWrapper: net.sf.jasperreports.engine.JRException: Error executing SQL statement for : DailyClaimV2 at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:141) at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:668) at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:588) at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:1212) at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:842) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:123) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:420) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:661) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:356) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.executeReport(EngineServiceImpl.java:788) at com.jaspersoft.jasperserver.api.engine.jasperreports.domain.impl.ReportUnitRequest.execute(ReportUnitRequest.java:60) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.execute(EngineServiceImpl.java:288) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.executeReport(ReportExecutionJob.java:441) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.executeAndSendReport(ReportExecutionJob.java:369) at com.jaspersoft.jasperserver.api.engine.scheduling.quartz.ReportExecutionJob.execute(ReportExecutionJob.java:188) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)Caused by: com.ibm.db2.jcc.b.DisconnectException: [ibm][db2][jcc][t4][2030][11211] A communication error has been detected. Communication protocol being used: TCP/IP.Communication API being used: SOCKETS. Location where the error was detected: T4Agent.sendRequest().Communication function detecting the error: OutputStream.flush(). Protocol specific error codes Connection reset by peer: socket write error, *, 0. Message: Connection reset by peer: socket write error at com.ibm.db2.jcc.a.a.a(a.java:365) at com.ibm.db2.jcc.a.a.A(a.java:334) at com.ibm.db2.jcc.a.a.n(a.java:292) at com.ibm.db2.jcc.b.p.c(p.java:280) at com.ibm.db2.jcc.b.rh.d(rh.java:2341) at com.ibm.db2.jcc.b.rh.T(rh.java:426) at com.ibm.db2.jcc.b.rh.executeQuery(rh.java:409) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92) at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:135) ... 16 moreCaused by: java.net.SocketException: Connection reset by peer: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:136) at com.ibm.db2.jcc.a.gb.b(gb.java:1534) at com.ibm.db2.jcc.a.gb.a(gb.java:1483) at com.ibm.db2.jcc.a.a.A(a.java:328) ... 23 more Does anybody have any idea? Thanks in advance Link to comment Share on other sites More sharing options...
developerdude Posted April 7, 2009 Share Posted April 7, 2009 It looks to me like the database behind your datasource is occasionally resetting the connection. Not sure why it would do that, but one workaround, if you are using a connection pool (DBCP? C3PO?) in your datasource, would be to look at the configuration for how it handles reconnects/timeouts. I know JS uses DBCP for the data store for jobs/etc., but I am not sure if/what it uses for datasources, if anything. This also depends on whether you wrote your own datasource or just use the builtin datasource code. Link to comment Share on other sites More sharing options...
kam1 Posted April 7, 2009 Author Share Posted April 7, 2009 I use the jdbc datasource which created in JasperReport console. I provided the drive classand jdbc url .Is that ok? Link to comment Share on other sites More sharing options...
anandharaj Posted April 8, 2009 Share Posted April 8, 2009 As developerdude said, this is related to your DB2 database. Just take a look at the DB configuration related to the connection. BTW, what JDBC you using now? DB2 Universal JDBC Driver? or DB2 JDBC Type 2 Driver? Try change your driver and see the outcome Link to comment Share on other sites More sharing options...
kam1 Posted April 8, 2009 Author Share Posted April 8, 2009 db2jcc-v9.1.jarcom.ibm.db2.jcc.DB2Driver That is what i use Link to comment Share on other sites More sharing options...
swood Posted May 3, 2009 Share Posted May 3, 2009 Behind the scenes, there is a connection pool for the data source, managed by the server if it is a JNDI connection, or by JasperServer if it is a JDBC connection. I suspect that the connections in the pool do not manage connection time out or the DB server restarting properly. Is there an option in the DB2 connect string that retries the connection? There is in other JDBC drivers. You may need to move to a JNDI connection for this. There are options you can set on the JNDI definition in the server to deal with connection hiccups. ShermanJaspersoft Link to comment Share on other sites More sharing options...
kam1 Posted May 4, 2009 Author Share Posted May 4, 2009 Thank you very much! Now I configured a JNDI datasource ,and configed the timeout period in *-ds.xml (i am using jboss). Now Daily reports become fine. Link to comment Share on other sites More sharing options...
funkyenemy Posted May 15, 2009 Share Posted May 15, 2009 Hi swood, I also met similiar problem. Jasper server often throws connection reset exception. I am using oracle 10g as database. I use jdbc datasource. I am using oracle.jdbc.driver.OracleDriver and the connection string jdbc:oracle:thin:@ip:sid . So, I want to know how to set connection retries? Or I have to use jndi datasource? If use jndi datasource, how to set in jasperserver? In context.xml? Thx,funkyenemy Link to comment Share on other sites More sharing options...
ramandeep1980 Posted May 15, 2009 Share Posted May 15, 2009 Hi Sherman, I think this is something wrong with jasper server itself.Coz im facing this problem for a while and whenever this happens i just need to refresh it 5-6 times or log on and log off or wait for a while and it start working fine..and jasper ireport works fine at the same time in separate wndow also DB conection is fine. After a while server will start responding suddenly.So u see there cant be something wrong with report or DB coz they both are working fine outside jasperserver at the same time but server without doing anything will start responding automatically.. Please lookinto this Raman 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