com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? , ? , DEFAULT , NULL )' at line 1
La causa principale è che quei segnaposto ? arrivano fino a MySQL. I segnaposto sono un concetto lato client e non dovrebbero mai raggiungere il server come testo letterale.
Guarda attentamente questa riga:
sInserim.executeUpdate(sqlCommandInserim);Qui stai passando la stringa SQL grezza a executeUpdate() invece di eseguire la PreparedStatement con i valori che hai già impostato. Cambiala nella forma senza argomenti:
sInserim.executeUpdate();L'overload executeUpdate(sqlString) appartiene a Statement, non a PreparedStatement.
Su una nota a parte, ricorda di chiudere la tua PreparedStatement in un blocco finally (o con un try-with-resources) per non disperdere risorse quando viene lanciata un'eccezione. La stessa disciplina vale per Connection, Statement e ResultSet.