Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-4487

NPE if using multi-value prepared INSERT

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 9.1
    • 8.7
    • Query Engine
    • None
    • Hide
      Sample code
      PreparedStatement ps = con.prepareStatement("INSERT INTO Dvqe__c (InternalID__c,MatrixID__c) VALUES (?,?),(?,?),(?,?)");
      ps.setInt(1, 1);
      ps.setString(2, uniqueMatrixID + "01");
      ps.setInt(3, 2);
      ps.setString(4, uniqueMatrixID + "02");
      ps.setInt(5, 3);
      ps.setString(6, uniqueMatrixID + "03");
      int uc = ps.executeUpdate();
      
      Exception
      Unable to find source-code formatter for language: plain. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      14:12:39,934 ERROR [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue3) TEIID30019 Unexpected exception for request 7kiAJNRuK+I4.1: java.lang.NullPointerException
          at org.teiid.query.resolver.command.SetQueryResolver.checkSymbolTypes(SetQueryResolver.java:160) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
          at org.teiid.query.resolver.command.SetQueryResolver.resolveSetQuery(SetQueryResolver.java:86) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
          at org.teiid.query.resolver.command.SetQueryResolver.resolveCommand(SetQueryResolver.java:68) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
          at org.teiid.query.resolver.QueryResolver.resolveCommand(QueryResolver.java:273) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
          at org.teiid.query.resolver.command.SetQueryResolver.resolveCommand(SetQueryResolver.java:61) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
          at org.teiid.query.resolver.QueryResolver.resolveCommand(QueryResolver.java:273) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
          at org.teiid.query.resolver.command.InsertResolver.resolveProceduralCommand(InsertResolver.java:86) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
          at org.teiid.query.resolver.ProcedureContainerResolver.resolveCommand(ProcedureContainerResolver.java:143) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
          at org.teiid.query.resolver.QueryResolver.resolveCommand(QueryResolver.java:273) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
          at org.teiid.query.resolver.QueryResolver.resolveCommand(QueryResolver.java:127) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
          at org.teiid.dqp.internal.process.Request.resolveCommand(Request.java:282) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
          at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:402) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
          at org.teiid.dqp.internal.process.PreparedStatementRequest.generatePlan(PreparedStatementRequest.java:119) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
          at org.teiid.dqp.internal.process.Request.processRequest(Request.java:470) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
          at org.teiid.dqp.internal.process.PreparedStatementRequest.processRequest(PreparedStatementRequest.java:294) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
          at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:642) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
          at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:337) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
          at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
          at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
          at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
          at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
          at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8]
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0-internal]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0-internal]
          at java.lang.Thread.run(Thread.java:744) [rt.jar:1.8.0-internal]
      
      Show
      Sample code PreparedStatement ps = con.prepareStatement( "INSERT INTO Dvqe__c (InternalID__c,MatrixID__c) VALUES (?,?),(?,?),(?,?)" ); ps.setInt(1, 1); ps.setString(2, uniqueMatrixID + "01" ); ps.setInt(3, 2); ps.setString(4, uniqueMatrixID + "02" ); ps.setInt(5, 3); ps.setString(6, uniqueMatrixID + "03" ); int uc = ps.executeUpdate(); Exception Unable to find source-code formatter for language: plain. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml 14:12:39,934 ERROR [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue3) TEIID30019 Unexpected exception for request 7kiAJNRuK+I4.1: java.lang.NullPointerException at org.teiid.query.resolver.command.SetQueryResolver.checkSymbolTypes(SetQueryResolver.java:160) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8] at org.teiid.query.resolver.command.SetQueryResolver.resolveSetQuery(SetQueryResolver.java:86) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8] at org.teiid.query.resolver.command.SetQueryResolver.resolveCommand(SetQueryResolver.java:68) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8] at org.teiid.query.resolver.QueryResolver.resolveCommand(QueryResolver.java:273) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8] at org.teiid.query.resolver.command.SetQueryResolver.resolveCommand(SetQueryResolver.java:61) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8] at org.teiid.query.resolver.QueryResolver.resolveCommand(QueryResolver.java:273) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8] at org.teiid.query.resolver.command.InsertResolver.resolveProceduralCommand(InsertResolver.java:86) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8] at org.teiid.query.resolver.ProcedureContainerResolver.resolveCommand(ProcedureContainerResolver.java:143) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8] at org.teiid.query.resolver.QueryResolver.resolveCommand(QueryResolver.java:273) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8] at org.teiid.query.resolver.QueryResolver.resolveCommand(QueryResolver.java:127) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8] at org.teiid.dqp.internal.process.Request.resolveCommand(Request.java:282) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8] at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:402) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8] at org.teiid.dqp.internal.process.PreparedStatementRequest.generatePlan(PreparedStatementRequest.java:119) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8] at org.teiid.dqp.internal.process.Request.processRequest(Request.java:470) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8] at org.teiid.dqp.internal.process.PreparedStatementRequest.processRequest(PreparedStatementRequest.java:294) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8] at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:642) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8] at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:337) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8] at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8] at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8] at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8] at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8] at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.5.redhat-8.jar:8.12.5.redhat-8] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0-internal] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0-internal] at java.lang. Thread .run( Thread .java:744) [rt.jar:1.8.0-internal]

      If user issues multi-value insert, Teiid throws NPE.

              rhn-engineering-shawkins Steven Hawkins
              jdurani Juraj DurĂ¡ni (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: