java.sql.SQLException: Invalid state, the Connection object is closed.

Atlassian JIRA | Jeff Turner | 10 years ago
  1. 0

    After successfully importing a FogBUGZ project, I click the "Return to FogBUGZ importer" button. This takes one back to the screen specifying JDBC connection details. I clicked through the subsequent page to start another import (not changing the configuration file). The first time, this blows up with: {noformat} 2006-12-19 15:12:16,772 Thread-33 INFO [imports.importer.impl.ImportLogger] ************************************************* ************* (0.0s) 2006-12-19 15:12:16,772 Thread-33 INFO [imports.importer.impl.ImportLogger] IMPORTING STARTED (0.0s) 2006-12-19 15:12:16,773 Thread-33 INFO [imports.importer.impl.ImportLogger] ************************************************* ************* (0.0010s) 2006-12-19 15:12:16,773 Thread-33 INFO [imports.importer.impl.ImportLogger] (0.0010s) 2006-12-19 15:12:16,773 Thread-33 INFO [imports.importer.impl.ImportLogger] Importing with ImportBeanType: com.atlassian.jira .imports.fogbugz.FogBugzDataBean (0.0010s) 2006-12-19 15:12:16,773 Thread-33 INFO [imports.importer.impl.ImportLogger] (0.0010s) 2006-12-19 15:12:16,773 Thread-33 INFO [imports.importer.impl.ImportLogger] -------------------------- (0.0010s) 2006-12-19 15:12:16,773 Thread-33 INFO [imports.importer.impl.ImportLogger] Importing of Users started (0.0010s) 2006-12-19 15:12:16,773 Thread-33 INFO [imports.importer.impl.ImportLogger] Only new Users will be imported (0.0010s) 2006-12-19 15:12:16,773 Thread-33 ERROR [web.action.util.DatabaseConnectionBean] SQL Exception accessing data. java.sql.SQLException: Invalid state, the Connection object is closed. at net.sourceforge.jtds.jdbc.ConnectionJDBC2.checkOpen(ConnectionJDBC2.java:1494) at net.sourceforge.jtds.jdbc.ConnectionJDBC2.prepareStatement(ConnectionJDBC2.java:2177) at com.atlassian.jira.web.action.util.DatabaseConnectionBean.queryDb(DatabaseConnectionBean.java:245) at com.atlassian.jira.web.action.util.DatabaseConnectionBean.queryDb(DatabaseConnectionBean.java:230) at com.atlassian.jira.imports.fogbugz.FogBugzDataBean.getUsers(FogBugzDataBean.java:37) at com.atlassian.jira.imports.importer.impl.DefaultJiraDataImporter.importUsers(DefaultJiraDataImporter.java:207) at com.atlassian.jira.imports.importer.impl.DefaultJiraDataImporter.doImport(DefaultJiraDataImporter.java:78) at com.atlassian.jira.imports.importer.impl.ImporterThread.run(ImporterThread.java:21) 2006-12-19 15:12:16,774 Thread-33 INFO [imports.importer.impl.ImportLogger] 0 users associated with import. (0.0020s) 2006-12-19 15:12:16,774 Thread-33 INFO [imports.importer.impl.ImportLogger] 0 users successfully imported. (0.0020s) 2006-12-19 15:12:16,774 Thread-33 INFO [imports.importer.impl.ImportLogger] Importing of Users finished (0.0020s) 2006-12-19 15:12:16,774 Thread-33 INFO [imports.importer.impl.ImportLogger] --------------------------- (0.0020s) 2006-12-19 15:12:16,774 Thread-33 INFO [imports.importer.impl.ImportLogger] Retrieving projects... (0.0020s) 2006-12-19 15:12:16,774 Thread-33 ERROR [web.action.util.DatabaseConnectionBean] SQL Exception accessing data. java.sql.SQLException: Invalid state, the Connection object is closed. at net.sourceforge.jtds.jdbc.ConnectionJDBC2.checkOpen(ConnectionJDBC2.java:1494) at net.sourceforge.jtds.jdbc.ConnectionJDBC2.prepareStatement(ConnectionJDBC2.java:2177) at com.atlassian.jira.web.action.util.DatabaseConnectionBean.queryDb(DatabaseConnectionBean.java:245) at com.atlassian.jira.web.action.util.DatabaseConnectionBean.queryDb(DatabaseConnectionBean.java:230) at com.atlassian.jira.imports.fogbugz.FogBugzDataBean.getProjects(FogBugzDataBean.java:44) at com.atlassian.jira.imports.importer.impl.DefaultJiraDataImporter.doImport(DefaultJiraDataImporter.java:82) at com.atlassian.jira.imports.importer.impl.ImporterThread.run(ImporterThread.java:21) 2006-12-19 15:12:16,775 Thread-33 INFO [imports.importer.impl.ImportLogger] No projects were found to import (0.0030s) 2006-12-19 15:12:17,540 Thread-33 INFO [imports.importer.impl.ImportLogger] Flushing issue cache (0.768s) 2006-12-19 15:12:17,544 Thread-33 INFO [imports.importer.impl.ImportLogger] No issues need to be reindexed. (0.772s) 2006-12-19 15:12:17,544 Thread-33 INFO [imports.importer.impl.ImportLogger] (0.772s) 2006-12-19 15:12:17,544 Thread-33 INFO [imports.importer.impl.ImportLogger] ************************************************* ************* (0.772s) 2006-12-19 15:12:17,544 Thread-33 INFO [imports.importer.impl.ImportLogger] IMPORTING FINISHED (0.772s) 2006-12-19 15:12:17,544 Thread-33 INFO [imports.importer.impl.ImportLogger] ************************************************* ************* (0.772s) {noformat} The second time, it worked, and reimported all the issues again. Third time it blew up again. It looks like we need to make sure the connection bean is properly closed before imports.

    Atlassian JIRA | 10 years ago | Jeff Turner
    java.sql.SQLException: Invalid state, the Connection object is closed.
  2. 0

    After successfully importing a FogBUGZ project, I click the "Return to FogBUGZ importer" button. This takes one back to the screen specifying JDBC connection details. I clicked through the subsequent page to start another import (not changing the configuration file). The first time, this blows up with: {noformat} 2006-12-19 15:12:16,772 Thread-33 INFO [imports.importer.impl.ImportLogger] ************************************************* ************* (0.0s) 2006-12-19 15:12:16,772 Thread-33 INFO [imports.importer.impl.ImportLogger] IMPORTING STARTED (0.0s) 2006-12-19 15:12:16,773 Thread-33 INFO [imports.importer.impl.ImportLogger] ************************************************* ************* (0.0010s) 2006-12-19 15:12:16,773 Thread-33 INFO [imports.importer.impl.ImportLogger] (0.0010s) 2006-12-19 15:12:16,773 Thread-33 INFO [imports.importer.impl.ImportLogger] Importing with ImportBeanType: com.atlassian.jira .imports.fogbugz.FogBugzDataBean (0.0010s) 2006-12-19 15:12:16,773 Thread-33 INFO [imports.importer.impl.ImportLogger] (0.0010s) 2006-12-19 15:12:16,773 Thread-33 INFO [imports.importer.impl.ImportLogger] -------------------------- (0.0010s) 2006-12-19 15:12:16,773 Thread-33 INFO [imports.importer.impl.ImportLogger] Importing of Users started (0.0010s) 2006-12-19 15:12:16,773 Thread-33 INFO [imports.importer.impl.ImportLogger] Only new Users will be imported (0.0010s) 2006-12-19 15:12:16,773 Thread-33 ERROR [web.action.util.DatabaseConnectionBean] SQL Exception accessing data. java.sql.SQLException: Invalid state, the Connection object is closed. at net.sourceforge.jtds.jdbc.ConnectionJDBC2.checkOpen(ConnectionJDBC2.java:1494) at net.sourceforge.jtds.jdbc.ConnectionJDBC2.prepareStatement(ConnectionJDBC2.java:2177) at com.atlassian.jira.web.action.util.DatabaseConnectionBean.queryDb(DatabaseConnectionBean.java:245) at com.atlassian.jira.web.action.util.DatabaseConnectionBean.queryDb(DatabaseConnectionBean.java:230) at com.atlassian.jira.imports.fogbugz.FogBugzDataBean.getUsers(FogBugzDataBean.java:37) at com.atlassian.jira.imports.importer.impl.DefaultJiraDataImporter.importUsers(DefaultJiraDataImporter.java:207) at com.atlassian.jira.imports.importer.impl.DefaultJiraDataImporter.doImport(DefaultJiraDataImporter.java:78) at com.atlassian.jira.imports.importer.impl.ImporterThread.run(ImporterThread.java:21) 2006-12-19 15:12:16,774 Thread-33 INFO [imports.importer.impl.ImportLogger] 0 users associated with import. (0.0020s) 2006-12-19 15:12:16,774 Thread-33 INFO [imports.importer.impl.ImportLogger] 0 users successfully imported. (0.0020s) 2006-12-19 15:12:16,774 Thread-33 INFO [imports.importer.impl.ImportLogger] Importing of Users finished (0.0020s) 2006-12-19 15:12:16,774 Thread-33 INFO [imports.importer.impl.ImportLogger] --------------------------- (0.0020s) 2006-12-19 15:12:16,774 Thread-33 INFO [imports.importer.impl.ImportLogger] Retrieving projects... (0.0020s) 2006-12-19 15:12:16,774 Thread-33 ERROR [web.action.util.DatabaseConnectionBean] SQL Exception accessing data. java.sql.SQLException: Invalid state, the Connection object is closed. at net.sourceforge.jtds.jdbc.ConnectionJDBC2.checkOpen(ConnectionJDBC2.java:1494) at net.sourceforge.jtds.jdbc.ConnectionJDBC2.prepareStatement(ConnectionJDBC2.java:2177) at com.atlassian.jira.web.action.util.DatabaseConnectionBean.queryDb(DatabaseConnectionBean.java:245) at com.atlassian.jira.web.action.util.DatabaseConnectionBean.queryDb(DatabaseConnectionBean.java:230) at com.atlassian.jira.imports.fogbugz.FogBugzDataBean.getProjects(FogBugzDataBean.java:44) at com.atlassian.jira.imports.importer.impl.DefaultJiraDataImporter.doImport(DefaultJiraDataImporter.java:82) at com.atlassian.jira.imports.importer.impl.ImporterThread.run(ImporterThread.java:21) 2006-12-19 15:12:16,775 Thread-33 INFO [imports.importer.impl.ImportLogger] No projects were found to import (0.0030s) 2006-12-19 15:12:17,540 Thread-33 INFO [imports.importer.impl.ImportLogger] Flushing issue cache (0.768s) 2006-12-19 15:12:17,544 Thread-33 INFO [imports.importer.impl.ImportLogger] No issues need to be reindexed. (0.772s) 2006-12-19 15:12:17,544 Thread-33 INFO [imports.importer.impl.ImportLogger] (0.772s) 2006-12-19 15:12:17,544 Thread-33 INFO [imports.importer.impl.ImportLogger] ************************************************* ************* (0.772s) 2006-12-19 15:12:17,544 Thread-33 INFO [imports.importer.impl.ImportLogger] IMPORTING FINISHED (0.772s) 2006-12-19 15:12:17,544 Thread-33 INFO [imports.importer.impl.ImportLogger] ************************************************* ************* (0.772s) {noformat} The second time, it worked, and reimported all the issues again. Third time it blew up again. It looks like we need to make sure the connection bean is properly closed before imports.

    Atlassian JIRA | 10 years ago | Jeff Turner
    java.sql.SQLException: Invalid state, the Connection object is closed.
  3. 0

    how to enable tracing in the jtds jdbc driver

    jtds | 7 years ago | ats2228
    java.sql.SQLException: Invalid state, the Connection object is closed.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Invalid state, the Connection object is closed | Oracle Community

    oracle.com | 8 months ago
    java.sql.SQLException: Invalid state, the Connection object is closed.
  6. 0

    Invalid state, the Connection object is closed

    Oracle Community | 1 decade ago | 843859
    java.sql.SQLException: Invalid state, the Connection object is closed.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.sql.SQLException

      Invalid state, the Connection object is closed.

      at net.sourceforge.jtds.jdbc.ConnectionJDBC2.checkOpen()
    2. jTDS
      ConnectionJDBC2.prepareStatement
      1. net.sourceforge.jtds.jdbc.ConnectionJDBC2.checkOpen(ConnectionJDBC2.java:1494)
      2. net.sourceforge.jtds.jdbc.ConnectionJDBC2.prepareStatement(ConnectionJDBC2.java:2177)
      2 frames
    3. com.atlassian.jira
      ImporterThread.run
      1. com.atlassian.jira.web.action.util.DatabaseConnectionBean.queryDb(DatabaseConnectionBean.java:245)
      2. com.atlassian.jira.web.action.util.DatabaseConnectionBean.queryDb(DatabaseConnectionBean.java:230)
      3. com.atlassian.jira.imports.fogbugz.FogBugzDataBean.getProjects(FogBugzDataBean.java:44)
      4. com.atlassian.jira.imports.importer.impl.DefaultJiraDataImporter.doImport(DefaultJiraDataImporter.java:82)
      5. com.atlassian.jira.imports.importer.impl.ImporterThread.run(ImporterThread.java:21)
      5 frames