根据错误信息,出现了MySQLIntegrityConstraintViolationException异常,异常信息是"Column 'username' cannot be null",意思是插入数据时username列不能为空。

根据异常堆栈信息可以看到,异常出现在books.liao.dao.AdminDao.updateAdmin方法的第27行,以及books.liao.servlet.UpdateAminServlet的第36行。

可能的原因是在执行数据库更新操作时,使用的SQL语句中没有给username列赋值或者赋值为null。需要检查代码中的SQL语句和参数赋值,确保username列有被正确地赋值。

commysqljdbcexceptionsjdbc4MySQLIntegrityConstraintViolationException Column username cannot be null	at sunreflectNativeConstructorAccessorImplnewInstance0Native Method	at sunreflectNativeConstructorA

原文地址: https://www.cveoy.top/t/topic/ihuq 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录