Derby
  1. Derby
  2. DERBY-4479

after rename table a to b then create table a statement execute cause null point exception

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.0.2.1, 10.1.1.0, 10.2.2.0, 10.3.3.0, 10.4.2.0, 10.5.3.0, 10.6.1.0
    • Fix Version/s: 10.5.3.1, 10.6.1.0
    • Component/s: SQL
    • Labels:
      None
    • Environment:
      Windows XP SP2

      java version "1.5.0_16"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b02)
      Java HotSpot(TM) Client VM (build 1.5.0_16-b02, mixed mode, sharing)
    • Issue & fix info:
      Repro attached

      Description

      step 1 : create original table

      CREATE TABLE BPEL_ARCHIVE (
      EVENT_TIME CHAR(17) NOT NULL,
      BUSINESS_ID VARCHAR(100) NOT NULL,
      EVENT_TYPE INT,
      EVENT_CONTENT BLOB,
      PRIMARY KEY ( EVENT_TIME )
      )

      step 2 : rename original table to backup table
      RENAME TABLE BPEL_ARCHIVE TO BPEL_ARCHIVE_200912171148_200912171148

      step 3 : create original table
      cause error...

      java.sql.SQLException: Java exception: ': java.lang.NullPointerException'.
      at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
      at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
      at org.apache.derby.impl.jdbc.Util.javaException(Unknown Source)
      at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
      at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
      at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
      at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
      at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
      at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
      at org.apache.derby.impl.jdbc.EmbedStatement.executeUpdate(Unknown Source)
      at world.dragon.service.bpel.event.derby.DerbyArchiveEndpoint.switchTargetTable(DerbyArchiveEndpoint.java:295)
      ...................................
      Caused by: java.lang.NullPointerException
      at org.apache.derby.impl.sql.execute.CreateIndexConstantAction.executeConstantAction(Unknown Source)
      at org.apache.derby.impl.sql.execute.CreateConstraintConstantAction.executeConstantAction(Unknown Source)
      at org.apache.derby.impl.sql.execute.CreateTableConstantAction.executeConstantAction(Unknown Source)
      at org.apache.derby.impl.sql.execute.MiscResultSet.open(Unknown Source)
      at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(Unknown Source)
      at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown Source)
      ... 28 more

      1. patch.diff
        2 kB
        Bryan Pendleton

        Issue Links

          Activity

          dragon lee created issue -
          Knut Anders Hatlen made changes -
          Field Original Value New Value
          Bug behavior facts [Deviation from standard]
          Affects Version/s 10.4.2.0 [ 12313345 ]
          Affects Version/s 10.3.3.0 [ 12313142 ]
          Affects Version/s 10.2.2.0 [ 12312027 ]
          Affects Version/s 10.1.1.0 [ 10993 ]
          Affects Version/s 10.0.2.1 [ 10991 ]
          Affects Version/s 10.6.0.0 [ 12313727 ]
          Issue & fix info [Repro attached]
          Component/s SQL [ 11408 ]
          Component/s JDBC [ 11407 ]
          Bryan Pendleton made changes -
          Assignee Bryan Pendleton [ bryanpendleton ]
          Bryan Pendleton made changes -
          Attachment patch.diff [ 12431885 ]
          Bryan Pendleton made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 10.6.0.0 [ 12313727 ]
          Resolution Fixed [ 1 ]
          Mike Matrigali made changes -
          Resolution Fixed [ 1 ]
          Status Resolved [ 5 ] Reopened [ 4 ]
          Assignee Bryan Pendleton [ bryanpendleton ] Mike Matrigali [ mikem ]
          Kathey Marsden made changes -
          Link This issue is required by DERBY-4728 [ DERBY-4728 ]
          Mike Matrigali made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Fix Version/s 10.5.4.0 [ 12314154 ]
          Resolution Fixed [ 1 ]
          Mike Matrigali made changes -
          Assignee Mike Matrigali [ mikem ] Bryan Pendleton [ bryanpendleton ]
          Knut Anders Hatlen made changes -
          Fix Version/s 10.5.3.1 [ 12314182 ]
          Fix Version/s 10.5.4.0 [ 12314154 ]
          Knut Anders Hatlen made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Gavin made changes -
          Workflow jira [ 12484966 ] Default workflow, editable Closed status [ 12802754 ]

            People

            • Assignee:
              Bryan Pendleton
              Reporter:
              dragon lee
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development