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

NullPointerException executing SYSCS_UTIL.SYSCS_IMPORT_TABLE when derby.language.logQueryPlan=true

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.2.1.6
    • Fix Version/s: 10.3.1.4
    • Component/s: SQL
    • Labels:
      None
    • Environment:

      Description

      Derby throws NullPointerException when executing an IMPORT if logging of query plans is turned on in the derby.properties file as in:
      derby.language.logQueryPlan=true

      If logging is turned off, the failure does not occur and the table is successfully loaded.

      I am using the version of Derby that is provided with Java 6.

      Java source code is:

      Statement stmt = oCnxn.createStatement();
      try

      { stmt.execute("CALL SYSCS_UTIL.SYSCS_IMPORT_TABLE ('TEMP', 'ZJVTERMS', 'C:\DOCUME~1\Chip\LOCALS~1\Temp\20070724-124300-ZJVTERMS.dat',';','~',null, 1)"); }

      finally

      { stmt.close(); }

      Derby log output is:

      2007-09-27 15:29:06.843 GMT Thread[AWT-EventQueue-0,6,main] (XID = 311121), (SESSIONID = 0), INSERT INTO "TEMP"."ZJVTERMS"("CODE", "TEXT") PROPERTIES insertMode=replace SELECT cast(COLUMN1 AS INTEGER) , COLUMN2 from new org.apache.derby.impl.load.Import('C:\DOCUME~1\Chip\LOCALS~1\Temp\20070724-124300-ZJVTERMS.dat',';','~',null, 2 ) AS importvti ******* Insert ResultSet using table locking:
      deferred: false
      insert mode: bulk insert
      Rows inserted = 22
      Indexes updated = 0
      Execute Time = 0
      Normalize ResultSet:
      Number of opens = 1
      Rows seen = 22
      constructor time (milliseconds) = 0
      open time (milliseconds) = 0
      next time (milliseconds) = 0
      close time (milliseconds) = 0
      optimizer estimated row count: 10000.00
      optimizer estimated cost: 100000.00

      Source result set:
      Project-Restrict ResultSet (2):
      Number of opens = 1
      Rows seen = 22
      Rows filtered = 0
      restriction = false
      projection = true
      constructor time (milliseconds) = 0
      open time (milliseconds) = 0
      next time (milliseconds) = 0
      close time (milliseconds) = 0
      restriction time (milliseconds) = 0
      projection time (milliseconds) = 0
      optimizer estimated row count: 10000.00
      optimizer estimated cost: 100000.00

      Source result set:
      VTI ResultSet for org.apache.derby.impl.load.Import:
      Number of opens = 1
      Rows seen = 22
      constructor time (milliseconds) = 0
      open time (milliseconds) = 0
      next time (milliseconds) = 0
      close time (milliseconds) = 0
      optimizer estimated row count: 10000.00
      optimizer estimated cost: 100000.00

      2007-09-27 15:29:06.875 GMT Thread[AWT-EventQueue-0,6,main] (XID = 311199), (SESSIONID = 0), (DATABASE = OrderEntryDB), (DRDAID = null), Cleanup action starting
      2007-09-27 15:29:06.875 GMT Thread[AWT-EventQueue-0,6,main] (XID = 311199), (SESSIONID = 0), (DATABASE = OrderEntryDB), (DRDAID = null), Failed Statement is: null

      java.lang.NullPointerException evaluating expression
      org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
      org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
      org.apache.derby.impl.jdbc.Util.javaException(Unknown Source)
      org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
      org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
      org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
      org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
      org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
      org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
      org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
      ...ref to stmt.execute(...) in my code here...

        Attachments

        1. 20070724-124300-ZJVTERMS.dat
          0.5 kB
          Chip Hartney

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jrgchip Chip Hartney
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: