1. 程式人生 > >com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException

com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException

原因: 資料庫表中有一些欄位不能為空,但在插入的過程中,有屬性值為空。
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column ‘from_name’ cannot be null

com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'from_name' cannot be null
	at sun.reflect.NativeConstructorAccessorImpl.
newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.
mysql.jdbc.Util.handleNewInstance(Util.java:409) at com.mysql.jdbc.Util.getInstance(Util.java:384) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1039) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4232) ...