java.sql.SQLException: No value specified for parameter 2

Stack Overflow | Akshay Mehta | 8 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    How to pass null value in stored procedure from Java?

    Stack Overflow | 8 months ago | Akshay Mehta
    java.sql.SQLException: No value specified for parameter 2

    Root Cause Analysis

    1. java.sql.SQLException

      No value specified for parameter 2

      at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException()
    2. com.mysql.cj
      CallableStatement.execute
      1. com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:695)
      2. com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:663)
      3. com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:653)
      4. com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:638)
      5. com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:606)
      6. com.mysql.cj.jdbc.PreparedStatement.checkAllParametersSet(PreparedStatement.java:2166)
      7. com.mysql.cj.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:2146)
      8. com.mysql.cj.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:2083)
      9. com.mysql.cj.jdbc.PreparedStatement.execute(PreparedStatement.java:1120)
      10. com.mysql.cj.jdbc.CallableStatement.execute(CallableStatement.java:790)
      10 frames
    3. org.hibernate.result
      OutputsImpl.<init>
      1. org.hibernate.result.internal.OutputsImpl.<init>(OutputsImpl.java:51)
      1 frame