org.hibernate.exception.GenericJDBCException: could not insert: [com.tta.abcd.model.Child]

Stack Overflow | umapathi | 2 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    Noob error :org.hibernate.exception.SQLGrammarException: could not insert [com.sample.Person]

    Coderanch | 5 years ago | Vic Hood
    org.hibernate.exception.SQLGrammarException: could not insert: [com.sample.Person]
  2. 0

    Noob error :org.hibernate.exception.SQLGrammarException: could not insert [com.sample.Person] (Object Relational Mapping forum at Coderanch)

    coderanch.com | 10 months ago
    org.hibernate.exception.SQLGrammarException: could not insert: [com.sample.Person]
  3. 0

    org.hibernate.exception.SQLGrammarException: could not insert [com.sample.Person]

    Stack Overflow | 5 years ago | KodeSeeker
    org.hibernate.exception.SQLGrammarException: could not insert: [com.sample.Person]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Noob error :org.hibernate.exception.SQLGrammarException: could not insert [com.sample.Person] (Object Relational Mapping forum at Coderanch)

    coderanch.com | 2 months ago
    org.hibernate.exception.SQLGrammarException: could not insert: [com.sample.Person]
  6. 0

    How to retrieve data which caused unique constraint violation (via Hibernate)?

    Stack Overflow | 8 years ago | lud0h
    org.hibernate.exception.ConstraintViolationException: could not insert: [com.project.valueobject.mapping.Model]

  1. Hronom 1 times, last 4 months ago
  2. kid 2 times, last 6 months ago
  3. kuldeep 4 times, last 7 months ago
  4. mortalman7 1 times, last 10 months ago
32 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.sql.SQLException

    Field 'parentId' doesn't have a default value

    at com.mysql.jdbc.SQLError.createSQLException()
  2. MySQL jdbc
    PreparedStatement.executeUpdate
    1. com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1073)
    2. com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3609)
    3. com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3541)
    4. com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2002)
    5. com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2163)
    6. com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2624)
    7. com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2127)
    8. com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2427)
    9. com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2345)
    10. com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2330)
    10 frames
  3. Hibernate
    AbstractEntityPersister.insert
    1. org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:94)
    2. org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:57)
    3. org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2345)
    4. org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2852)
    4 frames
  4. Hibernate
    EntityIdentityInsertAction.execute
    1. org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:71)
    1 frame
  5. Hibernate
    ActionQueue.execute
    1. org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
    1 frame
  6. Hibernate
    SessionImpl.save
    1. org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:320)
    2. org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:203)
    3. org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:129)
    4. org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210)
    5. org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:56)
    6. org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195)
    7. org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:50)
    8. org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
    9. org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:713)
    10. org.hibernate.impl.SessionImpl.save(SessionImpl.java:701)
    11. org.hibernate.impl.SessionImpl.save(SessionImpl.java:697)
    11 frames
  7. com.tta.abcd
    ProduceServiceImpl$$FastClassByCGLIB$$a6eaa4a0.invoke
    1. com.tta.abcd.DAO.ProduceDAO.saveProduce(ProduceDAO.java:61)
    2. com.tta.abcd.service.ProduceServiceImpl.saveProduce(ProduceServiceImpl.java:23)
    3. com.tta.abcd.service.ProduceServiceImpl$$FastClassByCGLIB$$a6eaa4a0.invoke(<generated>)
    3 frames
  8. Spring Core
    MethodProxy.invoke
    1. org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
    1 frame
  9. Spring AOP
    CglibAopProxy$DynamicAdvisedInterceptor.intercept
    1. org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:639)
    1 frame
  10. com.tta.abcd
    ProduceController.saveProduce
    1. com.tta.abcd.service.ProduceServiceImpl$$EnhancerByCGLIB$$79bed302.saveProduce(<generated>)
    2. com.tta.abcd.controller.ProduceController.saveProduce(ProduceController.java:138)
    2 frames
  11. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:498)
    4 frames
  12. Spring
    InvocableHandlerMethod.invokeForRequest
    1. org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)
    2. org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
    2 frames
  13. Spring MVC
    FrameworkServlet.doPost
    1. org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
    2. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:747)
    3. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:688)
    4. org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)
    5. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
    6. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
    7. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:946)
    8. org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:848)
    8 frames
  14. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
    1 frame
  15. Spring MVC
    FrameworkServlet.service
    1. org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:822)
    1 frame
  16. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    1 frame
  17. Glassfish Core
    ApplicationFilterChain.doFilter
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    2 frames
  18. Tomcat WS
    WsFilter.doFilter
    1. org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    1 frame
  19. Glassfish Core
    CoyoteAdapter.service
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
    3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
    4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
    5. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    6. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
    7. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    8. org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
    9. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
    10. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
    10 frames
  20. Grizzly HTTP
    NioEndpoint$SocketProcessor.run
    1. org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1100)
    2. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:687)
    3. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
    4. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
    4 frames
  21. Java RT
    ThreadPoolExecutor$Worker.run
    1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    2 frames
  22. Tomcat Util
    TaskThread$WrappingRunnable.run
    1. org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    1 frame
  23. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:745)
    1 frame