Derby
  1. Derby
  2. DERBY-4077

Intermittent failure java.lang.NullPointerException: name can't be null with IBM 1.6 and encryptionECB/encryptDatabase test

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 10.5.1.1
    • Fix Version/s: None
    • Component/s: Store
    • Environment:
    • Urgency:
      Normal
    • Bug behavior facts:
      Data corruption, Regression Test Failure

      Description

      Very rarely on IBM 1.6 on Linux we get this failure with the
      encryptDatabase test.

      The trace looks like:

      java.lang.NullPointerException: name can't be null
      at java.io.FilePermission.init(FilePermission.java:183)
      at
      java.io.FilePermission.<init>(FilePermission.java:267)
      at
      java.lang.SecurityManager.checkRead(SecurityManager.java:871)
      at java.io.File.list(File.java:983)
      at
      org.apache.derby.impl.store.raw.data.BaseDataFileFactory.run(Bas
      eDataFileFactory.java:2640)
      at
      java.security.AccessController.doPrivileged(AccessController.jav
      a:251)
      at
      org.apache.derby.impl.store.raw.data.BaseDataFileFactory.removeS
      tubs(BaseDataFileFactory.java:1591)
      at
      org.apache.derby.impl.store.raw.data.BaseDataFileFactory.stop(Ba
      seDataFileFactory.java:499)
      at
      org.apache.derby.impl.services.monitor.TopService.stop(TopServic
      e.java:405)
      at
      org.apache.derby.impl.services.monitor.TopService.shutdown(TopSe
      rvice.java:349)
      at
      org.apache.derby.impl.services.monitor.BaseMonitor.shutdown(Base
      Monitor.java:239)
      at
      org.apache.derby.impl.db.DatabaseContextImpl.cleanupOnError(Data
      baseContextImpl.java:60)
      at
      org.apache.derby.iapi.services.context.ContextManager.cleanupOnE
      rror(ContextManager.java:332)
      at
      org.apache.derby.impl.jdbc.TransactionResourceImpl.cleanupOnErro
      r(TransactionResourceImpl.java:419)
      at
      org.apache.derby.impl.jdbc.EmbedConnection.<init>(EmbedConnec
      tion.java:584)
      at
      org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Driver40.ja
      va:68)
      at
      org.apache.derby.jdbc.InternalDriver.connect(InternalDriver.java
      :238)
      at
      org.apache.derby.jdbc.AutoloadedDriver.connect(AutoloadedDriver.
      java:119)
      at
      java.sql.DriverManager.getConnection(DriverManager.java:316)
      at
      java.sql.DriverManager.getConnection(DriverManager.java:297)
      at
      org.apache.derby.impl.tools.ij.ij.dynamicConnection(ij.java:1329
      )
      at
      org.apache.derby.impl.tools.ij.ij.ConnectStatement(ij.java:1179)

      at
      org.apache.derby.impl.tools.ij.ij.ijStatement(ij.java:1007)
      at
      org.apache.derby.impl.tools.ij.utilMain.runScriptGuts(utilMain.j
      ava:328)
      at
      org.apache.derby.impl.tools.ij.utilMain.go(utilMain.java:248)
      at org.apache.derby.impl.tools.ij.Main.go(Main.java:215)
      at
      org.apache.derby.impl.tools.ij.Main.mainCore(Main.java:181)
      at org.apache.derby.impl.tools.ij.Main.main(Main.java:73)
      at org.apache.derby.tools.ij.main(ij.java:59)

      or something similar. It happens at different areas of the code
      but always with File.list().

      I haven't been able to reproduce despite running the test 1500 times. I also haven't figured out yet how to get the java.lang.NullPointerException: name can't be null message in a stand alone java program.

      I will attache the test files.

      1. encryptionECB.zip
        159 kB
        Kathey Marsden

        Activity

        Hide
        Kathey Marsden added a comment -

        Attached is the database and test output files from a failed run. I was able to reconnect to the database with:
        ij> connect 'jdbc:derby:wombat;dataEncryption=true;bootPassword=Wednesday;encryptionAlgorithm=DES/ECB/NoPadding';
        ij> select count from sys.systables;
        1
        -----------
        20

        The first time I saw this I wasn't able to reconnect to the db, but I am sorry I don't seem to have the output files from that run anymore.

        In this particular run we didn't get the error in the derby.log, perhaps it was overwritten. The stack trace in the description was from an earlier failed run. For this run the error came in shutdown:

        call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('bootPassword', 'Thursday, Wednesday');
        0 rows inserted/updated/deleted
        ij> disconnect;
        ij> connect 'jdbc:derby:;shutdown=true';
        JAVA ERROR: java.lang.NullPointerException: name can't be null

        Show
        Kathey Marsden added a comment - Attached is the database and test output files from a failed run. I was able to reconnect to the database with: ij> connect 'jdbc:derby:wombat;dataEncryption=true;bootPassword=Wednesday;encryptionAlgorithm=DES/ECB/NoPadding'; ij> select count from sys.systables; 1 ----------- 20 The first time I saw this I wasn't able to reconnect to the db, but I am sorry I don't seem to have the output files from that run anymore. In this particular run we didn't get the error in the derby.log, perhaps it was overwritten. The stack trace in the description was from an earlier failed run. For this run the error came in shutdown: call SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('bootPassword', 'Thursday, Wednesday'); 0 rows inserted/updated/deleted ij> disconnect; ij> connect 'jdbc:derby:;shutdown=true'; JAVA ERROR: java.lang.NullPointerException: name can't be null
        Hide
        Knut Anders Hatlen added a comment -

        Triaged for 10.5.2. Flagging data corruption since one of the databases wasn't bootable afterwards. Leaving urgency at Normal since it seems to be limited to one particular platform.

        Show
        Knut Anders Hatlen added a comment - Triaged for 10.5.2. Flagging data corruption since one of the databases wasn't bootable afterwards. Leaving urgency at Normal since it seems to be limited to one particular platform.
        Hide
        Rick Hillegas added a comment -

        Hi Kathey,

        I noticed that you assigned this bug to yourself a year ago. Do you still plan to work on this bug? Thanks.

        Show
        Rick Hillegas added a comment - Hi Kathey, I noticed that you assigned this bug to yourself a year ago. Do you still plan to work on this bug? Thanks.
        Hide
        Kathey Marsden added a comment -

        Thank you Rick for pointing out that I was assigned to this issue. I am not currently working on it as I don't have a good repro.

        Show
        Kathey Marsden added a comment - Thank you Rick for pointing out that I was assigned to this issue. I am not currently working on it as I don't have a good repro.
        Hide
        Rick Hillegas added a comment -

        This is a serious bug. However, it cannot be reproduced and it's been more than 2 years since any substantive work was done on this issue. Can this be closed as Not Reproducible?

        Show
        Rick Hillegas added a comment - This is a serious bug. However, it cannot be reproduced and it's been more than 2 years since any substantive work was done on this issue. Can this be closed as Not Reproducible?
        Hide
        Rick Hillegas added a comment -

        Another year has passed. Are we still seeing this error? Thanks.

        Show
        Rick Hillegas added a comment - Another year has passed. Are we still seeing this error? Thanks.
        Hide
        Rick Hillegas added a comment -

        Closing this issue as not reproducible.

        Show
        Rick Hillegas added a comment - Closing this issue as not reproducible.

          People

          • Assignee:
            Unassigned
            Reporter:
            Kathey Marsden
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development