Warning statement left open

By: Peter Lamprecht - lampocello
Warning statement left open
2003-11-19 08:17
Hi,

after calling JasperFillManager.fillReport(InputStream, Map, Connection) in a sessionbean, the applicationserver brings following message:

WARN: "Closing a statement you left open, please do your own housekeeping".

I am using jboss with oracle thin driver. The report is produced fine.
Do you have any idea?

Thanks in advance,
Peter




By: Teodor Danciu - teodord
RE: Warning statement left open
2003-11-28 14:14

Hi,

The JasperReports code that deals with openning the SQL statement and executing it needs a little
refactoring as it is possible for the statements
to remain open in some cases.

I'll do this refactoring for the next version and I hope
it will solve your problems.

Thank you,
Teodor





By: Peter Severin - peter_p_s
RE: Warning statement left open
2003-11-26 06:54
Hi,

How about calling the connection.close() method after the fillReport ? You are passing an already opened connection so it is your task to make sure you are closing it at the end.

Peter.




By: Peter Lamprecht - lampocello
RE: Warning statement left open
2003-12-02 01:34
Hi Peter,

my Code looks like this:

Connection con = null;
try {
con = ds.getConnection();
return JasperFillManager.fillReport
(jasperURL.openStream(), params, con);
} catch (...) {...}
} finally{
if (con != null)
try {con.close();}
catch (...){...}
}

So I think my own housekeeping should be ok, but thanks for your concern.

In the meanwhile Teodord gave me a new hope - so I will wait for the next release.

Thanks Teodord

Regards, Lampocello
2002 JI Open Discussion's picture
Joined: Aug 10 2006 - 3:28am
Last seen: 16 years 7 months ago

0 Answers:

No answers yet
Feedback