1
Good afternoon, everyone.
I am maintaining a system that another developer started, before he was using Hibernate and then migrated to eclipselink.
When using Hibernate was working normal, and when migrated started to fail delete.
The Controller is like this.
@RequestMapping(value = {deletePath}, method = RequestMethod.POST)
public String delete(@PathVariable("id") String id, Division division) {
divisionService.delete(division);
return "redirect:"+defaultPath;
}
stackoverflow
Error: org.springframework.transaction.Transactionsystemexception: Could not commit JPA transaction; nested Exception is javax.persistence.Rollbackexception: Exception [Eclipselink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.Databaseexception Internal Exception: org.postgresql.util.Psqlexception: ERROR: null value in column "name" violates not-null Constraint Detail: Failing Row contains (d1ba96c6-baac-4664-86f1-af22386324bd, AB8D5E1F-66C1-40F9-B98E-DEC21FFA7626, null, d1ba96c6-baac-4664-86f1-af22386324bc, 2015-03-27 11:42:27.427, d1ba96c6-baac-4664-86f1-af22386324bc, 2015-03-27 12:27:29.097, f). Error Code: 0 Call: UPDATE _login.Division SET ACTIVE = ? , MODIFIEDBY = ? , MODIFIEDON = ? , NAME = ? , Parent = ? WHERE (id = ?) bind => [false, d1ba96c6-baac-4664-86f1-af22386324bc, 2015-03-27 12:27:29.097, null, AB8D5E1F-66C1-40F9-B98E-DEC21FFA7626] Query: Updateobjectquery(com.xphub.core.model.Division@7cc1d214) URL: http://localhost:8080/xphub/admin/user/Division/AB8D5E1F-66C1-40F9-B98E-DEC21FFA7626/delete
Thanks Luiz for the help, the way you did it worked right.
– Fernando