Erro nesta linha
cstmt.registerOutParameter(2, java.sql.Types.INTEGER);
mudar assim
String sql = "CALL proc_after_topic_add(?,?);";
cstmt.registerOutParameter(2, java.sql.Types.INTEGER);
cstmt.registerOutParameter(2, java.sql.Types.INTEGER);
String sql = "CALL proc_after_topic_add(?,?);";
cstmt.registerOutParameter(2, java.sql.Types.INTEGER);