This happened because I didn't call connection.connect().
If it is possible, I suggest to improve the message in such case.
Here is the stacktrace:
Exception in thread "main" java.lang.NullPointerException
at com.github.mauricio.async.db.mysql.codec.MySQLConnectionHandler.com$github$mauricio$async$db$mysql$codec$MySQLConnectionHandler$$writeAndHandleError(MySQLConnectionHandler.scala:324)
at com.github.mauricio.async.db.mysql.codec.MySQLConnectionHandler.sendPreparedStatement(MySQLConnectionHandler.scala:208)
at com.github.mauricio.async.db.mysql.MySQLConnection.sendPreparedStatement(MySQLConnection.scala:241)
This happened because I didn't call connection.connect(). If it is possible, I suggest to improve the message in such case. Here is the stacktrace:
Exception in thread "main" java.lang.NullPointerException at com.github.mauricio.async.db.mysql.codec.MySQLConnectionHandler.com$github$mauricio$async$db$mysql$codec$MySQLConnectionHandler$$writeAndHandleError(MySQLConnectionHandler.scala:324) at com.github.mauricio.async.db.mysql.codec.MySQLConnectionHandler.sendPreparedStatement(MySQLConnectionHandler.scala:208) at com.github.mauricio.async.db.mysql.MySQLConnection.sendPreparedStatement(MySQLConnection.scala:241)