I'm not sure if this is a bug or if it's intentional, but MariaDB Connector/J behaves differently from mysql-connector-java when inserting lines without values on not null columns, when sql_mode doesn't include STRICT_TRANS_TABLES.
With this table:
succeeds with MariaDB Connector/J (1.3.0 and 1.2.0), but with mysql-connector-java (5.1.37), it throws a SQLException as a value for col1 is missing.
If sql_mode is set to STRICT_TRANS_TABLES both drivers behave the same (throwing exception), so a work-around is maybe to add "?sessionVariables=sql_mode=STRICT_TRANS_TABLES" to the connection URL.
(Storage engine is INNODB. Java-version on client is 8u60. Client runs on the same machine as the server.)