Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-5606

NullPointerException at EncryptContainerOperation

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not A Problem
    • Affects Version/s: 10.8.2.2
    • Fix Version/s: 10.8.2.2
    • Component/s: JDBC
    • Labels:
      None
    • Environment:
      windows 7 professional 64 bits and xp with Oracle jre1.6.0_30
    • Urgency:
      Urgent
    • Issue & fix info:
      Workaround attached
    • Bug behavior facts:
      Crash

      Description

      As I try to change encryption key from a working encrypted db using:
      <code>
      jdbc:derby:c:\gexcat\gexcat.db5;dataEncryption=true;encryptionAlgorithm=AES/CBC/NoPadding;newEncryptionKey=0CE9CC799AADABAB295E4D91EAE86346;encryptionKey=0A023619DFD37A71263BEFCABBD68EA8
      </code>
      I get this error (from Stack trace):
      <code>
      java.sql.SQLException: Failed to start database 'c:\gexcat\gexcat.db5' with class loader net.sourceforge.squirrel_sql.fw.sql.SQLDriverClassLoader@21aac775, see the next exception for details.
      at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
      at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
      at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source)
      at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source)
      at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
      at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown Source)
      at org.apache.derby.impl.jdbc.EmbedConnection40.<init>(Unknown Source)
      at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source)
      at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
      at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
      at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:133)
      at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.execute(OpenConnectionCommand.java:97)
      at net.sourceforge.squirrel_sql.client.mainframe.action.ConnectToAliasCommand$SheetHandler.run(ConnectToAliasCommand.java:280)
      at net.sourceforge.squirrel_sql.client.mainframe.action.ConnectToAliasCommand$SheetHandler.performOK(ConnectToAliasCommand.java:237)
      at net.sourceforge.squirrel_sql.client.gui.db.ConnectionInternalFrame.connect(ConnectionInternalFrame.java:311)
      at net.sourceforge.squirrel_sql.client.gui.db.ConnectionInternalFrame.access$300(ConnectionInternalFrame.java:56)
      at net.sourceforge.squirrel_sql.client.gui.db.ConnectionInternalFrame$MyOkClosePanelListener.okPressed(ConnectionInternalFrame.java:461)
      at net.sourceforge.squirrel_sql.client.gui.OkClosePanel.fireButtonPressed(OkClosePanel.java:148)
      at net.sourceforge.squirrel_sql.client.gui.OkClosePanel.access$100(OkClosePanel.java:33)
      at net.sourceforge.squirrel_sql.client.gui.OkClosePanel$1.actionPerformed(OkClosePanel.java:174)
      at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
      at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
      at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
      at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
      at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
      at java.awt.Component.processMouseEvent(Component.java:6290)
      at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
      at java.awt.Component.processEvent(Component.java:6055)
      at java.awt.Container.processEvent(Container.java:2039)
      at java.awt.Component.dispatchEventImpl(Component.java:4653)
      at java.awt.Container.dispatchEventImpl(Container.java:2097)
      at java.awt.Component.dispatchEvent(Component.java:4481)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
      at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)
      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
      at java.awt.Container.dispatchEventImpl(Container.java:2083)
      at java.awt.Window.dispatchEventImpl(Window.java:2482)
      at java.awt.Component.dispatchEvent(Component.java:4481)
      at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:648)
      at java.awt.EventQueue.access$000(EventQueue.java:84)
      at java.awt.EventQueue$1.run(EventQueue.java:607)
      at java.awt.EventQueue$1.run(EventQueue.java:605)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
      at java.awt.EventQueue$2.run(EventQueue.java:621)
      at java.awt.EventQueue$2.run(EventQueue.java:619)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:618)
      at net.sourceforge.squirrel_sql.client.Main$1.dispatchEvent(Main.java:99)
      at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
      at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
      at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
      Caused by: java.sql.SQLException: Failed to start database 'c:\gexcat\gexcat.db5' with class loader net.sourceforge.squirrel_sql.fw.sql.SQLDriverClassLoader@21aac775, see the next exception for details.
      at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
      at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
      ... 57 more
      Caused by: java.sql.SQLException: Java exception: ': java.lang.NullPointerException'.
      at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
      at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
      at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
      at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
      at org.apache.derby.impl.jdbc.Util.javaException(Unknown Source)
      ... 54 more
      Caused by: java.lang.NullPointerException
      at org.apache.derby.impl.store.raw.data.EncryptContainerOperation.<init>(Unknown Source)
      at org.apache.derby.impl.store.raw.data.EncryptData.encryptContainer(Unknown Source)
      at org.apache.derby.impl.store.raw.data.EncryptData.encryptAllContainers(Unknown Source)
      at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.encryptAllContainers(Unknown Source)
      at org.apache.derby.impl.store.raw.RawStore.configureDatabaseForEncryption(Unknown Source)
      at org.apache.derby.impl.store.raw.RawStore.boot(Unknown Source)
      at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
      at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
      at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
      at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
      at org.apache.derby.impl.store.access.RAMAccessManager.boot(Unknown Source)
      at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
      at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
      at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
      at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
      at org.apache.derby.impl.db.BasicDatabase.bootStore(Unknown Source)
      at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
      at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
      at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
      at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source)
      at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(Unknown Source)
      at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(Unknown Source)
      at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(Unknown Source)
      at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Unknown Source)
      ... 54 more
      </code>

        Attachments

        1. c3010.dat
          8 kB
          Jesus Marin
        2. c3021.dat
          8 kB
          Jesus Marin

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jesusaplsoft Jesus Marin
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: