I am getting the Exception with the signature No operations allowed after statement closed.
inside my Java code where I am trying to insert values into the data
It may be because of you are using the same prepared statement for two different
methods and you close(pst.close())
the statement in one method and still try to use same statement in another method.
To solve this, get a new connection in a code block you are facing this error and then use statement.
One thing more if you are using same statement for two different methods and if you do not close statement in any method then you may get this error:
Parameter index out of range (2 > number of parameters, which is 1).
because of same statement . So try to get separate connection and statement for block of code and then close the connection and statement.