cor Posted October 26, 2009 Share Posted October 26, 2009 Making a preview of a reports for the seconde time with a connection to a sybase database, i get thefollowing message after upgrading to Ireports 3.6.0 "connection is already closed"Workaround is to dis- and reconnect.Sybase driver jconn3 06-29-2009Someone familiar with this problem ? Post Edited by cor at 10/26/2009 14:53 Link to comment Share on other sites More sharing options...
rberquist Posted October 28, 2009 Share Posted October 28, 2009 I am seeing the same behavior with an ojdbc14.jar connection for Oracle.This with iReport 3.6 for Netbeans. Some how the connection closes after a report preview. Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted October 28, 2009 Share Posted October 28, 2009 How do you configure the connection?Please submit a bug with a step by step procedure to reproduce.Thanks a lotGiulio Link to comment Share on other sites More sharing options...
alexturner Posted October 29, 2009 Share Posted October 29, 2009 I had the same problem using first the provided and then a different version of the mysql driver in a 3.6.0 version of ireport downloaded last week, on ubuntu jaunty jackalope. Yesterday I installed 3.6.1 and the problem went away.However, "show grid" and "snap to grid" still do not work.Also, I'm new to ireport and I couldn't see a way to connect my existing reports to a database connection short of using the wizard to create a new report -- but I suspect that was because I had not used the drop down in the toolbar, but had only started the connection via the services frame. I don't know what would make this more intuitive, and I see the reasoning, but it did confuse me for a while. it occurs to me the "connection is already closed" problem might be related to the order in which the capabilities are switched on between the drop down and the services pane, which is why I mention it. A coworker here did not experience the problem, working in a similar OS.Alex Link to comment Share on other sites More sharing options...
sohara Posted November 11, 2009 Share Posted November 11, 2009 Is there a solution to this problem? We're using 3.6.1We have been chasing our own tails thinking it was an issue with our own JDBC driver but the exact same behaviour occurs using SQLiteJDBC i.e. previews once but never again.From debugging our driver we can tell that iReports is making 2 connections, one during the main report design and another when it previews the report. The latter is closed after the first preview - this is the problem because the next time it tries to preview, it uses the closed connection object. One assumes that it should be re-connecting for each preview?Any ideas?Stevebtw - tried to run it in NetBeans to debug but as we're all Intellij fiends here we couldn't get off word go with NB complaining about some sort of configuration error.... Post Edited by sohara at 11/11/2009 18:13 Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted November 11, 2009 Share Posted November 11, 2009 this is something I have to fix. How did you create the JDBC connections? I'm asking that because there are two ways to configre a JDBC connection in iReport: the first is by using the Runtime view and import a "NetBeans" JDBC connection as datasource, the second is by creating the JDBC connection directly in iReport.Giulio Link to comment Share on other sites More sharing options...
rberquist Posted November 12, 2009 Share Posted November 12, 2009 Giulio...This is how I set my Oracle connection.1. Move ojdbc6.jar to /opt/iReport-nb-3.6.1/ide10/modules/ext2. open window->services in iReport.3. Add new database connection in services.4. Click Report Datasources icon in tool bar.5. Click new button.6. Add netbeans datasource (Oracle from above) and set as default. This reacts the same way on 3.6.0 as well. ojdbc14.jar reacts the same way.This on Ubuntu 9.04. I had the same issue on WinXP Pro. Bob Link to comment Share on other sites More sharing options...
sohara Posted November 12, 2009 Share Posted November 12, 2009 Hi GuiloI set it up in the same way as Bob,a) Services | New Connection | New Driverb) Datasource | New | Netbeans Database JDBC ConnectionBTW - how do you create a connection directly in iReports? I assume you mean "Database JDBC Connection", but I've never figured out how to get my custom JDBC driver to appear in the list of drivers.Steve Link to comment Share on other sites More sharing options...
Giulio Toffoli Posted November 12, 2009 Share Posted November 12, 2009 Steve, just add the jar to the ireport classpath (Tools->Options->IReport->Classpath).My guess was exactely that you were using the NetBenas connection which probably use some kind of connection pool, so iReport should not close the connection.You can refer to this bug:http://jasperforge.org/projects/ireport/tracker/view.php?id=4383I'll schedule the fix for one of the next releases.Giulio 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