java.lang.NullPointerException: Attempt to invoke interface method 'void java.sql.PreparedStatement.close()' on a null object reference

Stack Overflow | jhegedus | 5 months ago
  1. 0

    Slick 3.0 Using AutoInc Primary key value in following update gives NullPointerException

    Stack Overflow | 5 months ago | jhegedus
    java.lang.NullPointerException: Attempt to invoke interface method 'void java.sql.PreparedStatement.close()' on a null object reference
  2. 0
    Use 'dialog' to access views from custom_layout layout.
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0
    The resource was accessed after it was dismissed.
  5. 0
    Initialize the variable before calling a method on it.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke interface method 'void java.sql.PreparedStatement.close()' on a null object reference

      at slick.jdbc.JdbcBackend$SessionDef$class.withPreparedInsertStatement()
    2. slick.jdbc
      JdbcBackend$BaseSession.withPreparedInsertStatement
      1. slick.jdbc.JdbcBackend$SessionDef$class.withPreparedInsertStatement(JdbcBackend.scala:309)
      2. slick.jdbc.JdbcBackend$BaseSession.withPreparedInsertStatement(JdbcBackend.scala:386)
      2 frames
    3. slick.driver
      JdbcActionComponent$InsertActionComposerImpl$$anon$8.run
      1. slick.driver.JdbcInsertInvokerComponent$ReturningInsertInvoker.preparedInsert(JdbcInsertInvokerComponent.scala:321)
      2. slick.driver.JdbcInsertInvokerComponent$BaseInsertInvoker.internalInsert(JdbcInsertInvokerComponent.scala:187)
      3. slick.driver.JdbcInsertInvokerComponent$BaseInsertInvoker.insert(JdbcInsertInvokerComponent.scala:182)
      4. slick.driver.JdbcInsertInvokerComponent$InsertInvokerDef$class.$plus$eq(JdbcInsertInvokerComponent.scala:72)
      5. slick.driver.JdbcInsertInvokerComponent$BaseInsertInvoker.$plus$eq(JdbcInsertInvokerComponent.scala:152)
      6. slick.driver.JdbcActionComponent$InsertActionComposerImpl$$anonfun$$plus$eq$1.apply(JdbcActionComponent.scala:457)
      7. slick.driver.JdbcActionComponent$InsertActionComposerImpl$$anonfun$$plus$eq$1.apply(JdbcActionComponent.scala:457)
      8. slick.driver.JdbcActionComponent$InsertActionComposerImpl$$anon$8.run(JdbcActionComponent.scala:449)
      9. slick.driver.JdbcActionComponent$InsertActionComposerImpl$$anon$8.run(JdbcActionComponent.scala:447)
      9 frames
    4. slick.backend
      DatabaseComponent$DatabaseDef$$anon$2.run
      1. slick.backend.DatabaseComponent$DatabaseDef$$anon$2.liftedTree1$1(DatabaseComponent.scala:231)
      2. slick.backend.DatabaseComponent$DatabaseDef$$anon$2.run(DatabaseComponent.scala:231)
      2 frames
    5. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
      3. java.lang.Thread.run(Thread.java:818)
      3 frames