type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Could not execute JDBC batch update
org.vraptor.VRaptorServlet.service(VRaptorServlet.java:95)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
root cause
org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:249)
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235)
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140)
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
br.com.caelum.lojavirtual.dao.DaoFactory.commit(DaoFactory.java:22)
br.com.caelum.lojavirtual.logic.ClienteLogic.atualiza(ClienteLogic.java:43)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.vraptor.component.DefaultLogicMethod.execute(DefaultLogicMethod.java:117)
org.vraptor.plugin.LogicMethodWrapper.execute(LogicMethodWrapper.java:28)
org.vraptor.interceptor.ExecuteLogicInterceptor.intercept(ExecuteLogicInterceptor.java:37)
org.vraptor.core.InterceptorsLogicFlow.execute(InterceptorsLogicFlow.java:72)
org.vraptor.interceptor.SettingAndValidationInterceptor.intercept(SettingAndValidationInterceptor.java:131)
org.vraptor.core.InterceptorsLogicFlow.execute(InterceptorsLogicFlow.java:72)
org.vraptor.interceptor.InjectionInterceptor.intercept(InjectionInterceptor.java:41)
org.vraptor.core.InterceptorsLogicFlow.execute(InterceptorsLogicFlow.java:72)
org.vraptor.interceptor.ComponentLookupInterceptor.intercept(ComponentLookupInterceptor.java:58)
org.vraptor.core.InterceptorsLogicFlow.execute(InterceptorsLogicFlow.java:72)
br.com.caelum.lojavirtual.logic.AutorizadorInterceptor.intercept(AutorizadorInterceptor.java:28)
org.vraptor.core.InterceptorsLogicFlow.execute(InterceptorsLogicFlow.java:72)
br.com.caelum.lojavirtual.logic.DaoInterceptor.intercept(DaoInterceptor.java:24)
org.vraptor.core.InterceptorsLogicFlow.execute(InterceptorsLogicFlow.java:72)
org.vraptor.interceptor.RegisterAttributesInteceptor.intercept(RegisterAttributesInteceptor.java:38)
org.vraptor.core.InterceptorsLogicFlow.execute(InterceptorsLogicFlow.java:72)
org.vraptor.core.VRaptorExecution.execute(VRaptorExecution.java:88)
org.vraptor.core.DefaultController.execute(DefaultController.java:42)
org.vraptor.VRaptorServlet.service(VRaptorServlet.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
root cause
java.sql.BatchUpdateException: Column 'nome' cannot be null
com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1237)
com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:936)
org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:242)
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235)
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140)
org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106)
br.com.caelum.lojavirtual.dao.DaoFactory.commit(DaoFactory.java:22)
br.com.caelum.lojavirtual.logic.ClienteLogic.atualiza(ClienteLogic.java:43)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.vraptor.component.DefaultLogicMethod.execute(DefaultLogicMethod.java:117)
org.vraptor.plugin.LogicMethodWrapper.execute(LogicMethodWrapper.java:28)
org.vraptor.interceptor.ExecuteLogicInterceptor.intercept(ExecuteLogicInterceptor.java:37)
org.vraptor.core.InterceptorsLogicFlow.execute(InterceptorsLogicFlow.java:72)
org.vraptor.interceptor.SettingAndValidationInterceptor.intercept(SettingAndValidationInterceptor.java:131)
org.vraptor.core.InterceptorsLogicFlow.execute(InterceptorsLogicFlow.java:72)
org.vraptor.interceptor.InjectionInterceptor.intercept(InjectionInterceptor.java:41)
org.vraptor.core.InterceptorsLogicFlow.execute(InterceptorsLogicFlow.java:72)
org.vraptor.interceptor.ComponentLookupInterceptor.intercept(ComponentLookupInterceptor.java:58)
org.vraptor.core.InterceptorsLogicFlow.execute(InterceptorsLogicFlow.java:72)
br.com.caelum.lojavirtual.logic.AutorizadorInterceptor.intercept(AutorizadorInterceptor.java:28)
org.vraptor.core.InterceptorsLogicFlow.execute(InterceptorsLogicFlow.java:72)
br.com.caelum.lojavirtual.logic.DaoInterceptor.intercept(DaoInterceptor.java:24)
org.vraptor.core.InterceptorsLogicFlow.execute(InterceptorsLogicFlow.java:72)
org.vraptor.interceptor.RegisterAttributesInteceptor.intercept(RegisterAttributesInteceptor.java:38)
org.vraptor.core.InterceptorsLogicFlow.execute(InterceptorsLogicFlow.java:72)
org.vraptor.core.VRaptorExecution.execute(VRaptorExecution.java:88)
org.vraptor.core.DefaultController.execute(DefaultController.java:42)
org.vraptor.VRaptorServlet.service(VRaptorServlet.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.14 logs.
Na sua tabela a coluna nome esta com restrição de não poder ser nula, e na query que vc esta enviando o nome esta null. Pelo menos é o que parece
como seria para enviar com o nome ?
eita, uma mensagem de erro mais clara que essa é impossível…e ainda não entender o erro… :shock:
juniorsatanas, como vc está salvando seus objeto? sete a propriedade “nome” dele e blza.