Jump to content
We've recently updated our Privacy Statement, available here ×

Weird thing happened in JasperServer


kam1

Recommended Posts

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 more
Caused 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

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

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

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

  • 4 weeks later...

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.

 

Sherman

Jaspersoft

Link to comment
Share on other sites

  • 2 weeks later...

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

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

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...