Derby
  1. Derby
  2. DERBY-2456

File stream is left open when an exception occurs while setting up a character stream for data export.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.3.1.4
    • Fix Version/s: 10.3.1.4
    • Component/s: Tools
    • Labels:
      None

      Description

      The JUnit test tools/ImportExportTest.java has been failing since it was first contributed with the following error:

      ImportExportTest:embeddedjunit.framework.AssertionFailedError: extinout\T1.dat
      at org.apache.derbyTesting.junit.DropDatabaseSetup.removeDir(DropDatabaseSetup.java:102)
      at org.apache.derbyTesting.junit.DropDatabaseSetup.access$000(DropDatabaseSetup.java:38)
      at org.apache.derbyTesting.junit.DropDatabaseSetup$1.run(DropDatabaseSetup.java:77)
      at java.security.AccessController.doPrivileged1(Native Method)
      at java.security.AccessController.doPrivileged(AccessController.java:287)
      at org.apache.derbyTesting.junit.DropDatabaseSetup.removeDirectory(DropDatabaseSetup.java:74)
      at org.apache.derbyTesting.junit.SupportFilesSetup.tearDown(SupportFilesSetup.java:107)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:20)
      at junit.extensions.TestSetup.run(TestSetup.java:23)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
      at junit.extensions.TestSetup.run(TestSetup.java:23)

      Also fails with the client, as well.

      Per the comment posted by Suresh to DERBY-2295, it looks like the cause of this failure is that the "openFile()" method of java/engine/org/apache/derby/impl/load/ExportWriteData.java does not close the file stream in cases where an invalid encoding is specified.

        Activity

        Gavin made changes -
        Workflow jira [ 12399669 ] Default workflow, editable Closed status [ 12798339 ]
        A B made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        A B made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        A B made changes -
        Affects Version/s 10.3.0.0 [ 12310800 ]
        Fix Version/s 10.3.0.0 [ 12310800 ]
        Suresh Thalamati made changes -
        Field Original Value New Value
        Assignee Suresh Thalamati [ tsuresh ]
        A B created issue -

          People

          • Assignee:
            Suresh Thalamati
            Reporter:
            A B
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development