Posted By:
makhlo_makhlo
Posted On:
Monday, September 19, 2005 11:45 AM
I use ibatis for persistance. When I want to insert a record in the mysql database i get the following error: javax.servlet.ServletException: (SqlMapClient operation): data integrity violated by SQL ''; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred in com/myclient/ibatis/maps/Customer.xml. --- The error occurred while applying a parameter map. --- Check the insertCustomer-InlineParameterMap. --- Check the statement (update failed). --- Cause: java.sql.SQLException: Column 'customer_name' cannot be null org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:516) org.apache.struts.act
More>>
I use ibatis for persistance. When I want to insert a record in the mysql database i get the following error:
javax.servlet.ServletException: (SqlMapClient operation): data integrity violated by SQL ''; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/myclient/ibatis/maps/Customer.xml.
--- The error occurred while applying a parameter map.
--- Check the insertCustomer-InlineParameterMap.
--- Check the statement (update failed).
--- Cause: java.sql.SQLException:
Column 'customer_name' cannot be null
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:516)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:423)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
The strange is that column 'customer_name' is a primary key in the table and that can not have a null value.
Can somebody tell me why i get tis error, because i can't see why.
Every help is appreciated
Thnx,
<<Less