I have a big problem! when I do this:
String query = \"SELECT * FROM utente WHERE confermato=1 and Username=\'\" + username
+ \"\' AND Password
I meet this problem and solve it by change my mysql-connector version .May be my mysql-connector version in pom is too high.
Stack Print:
Thu Nov 03 18:24:03 CST 2016 WARN: Invalid value 'null' for server variable named 'auto_increment_increment', falling back to sane default of '1'.
Exception in thread "main" com.mysql.jdbc.PacketTooBigException: Packet for query is too large (44 > -1). You can change this value on the server by setting the max_allowed_packet' variable.
at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:577)
at com.mysql.jdbc.MysqlIO.getResultSet(MysqlIO.java:417)
at com.mysql.jdbc.MysqlIO.readResultsForQueryOrUpdate(MysqlIO.java:3105)
at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:2336)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2729)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2549)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1962)
at com.sparkproject.jdbc.JDBCHelper.main(JDBCHelper.java:382)