javax.persistence.PersistenceException

org.hibernate.exception.GenericJDBCException: Field ‘id’ doesn’t have a default value

Samebug tips1

Check your annotations to use the proper table and column names.

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web159

  • via Unknown by Unknown author,
  • via Unknown by Unknown author,
  • via Stack Overflow by Lucas
    ,
  • Stack trace

    • javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Field ‘id’ doesn’t have a default value at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1361)[hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1289)[hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1295)[hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final] at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:859)[hibernate-entitymanager-4.0.1.Final.jar:4.0.1.Final] at org.jbpm.services.task.persistence.JPATaskPersistenceContext.persistTask(JPATaskPersistenceContext.java:83)[jbpm-human-task-core-6.0.1-20140120.jar:6.0.1-SNAPSHOT] at org.jbpm.services.task.impl.TaskInstanceServiceImpl.addTask(TaskInstanceServiceImpl.java:103)[jbpm-human-task-core-6.0.1-20140120.jar:6.0.1-SNAPSHOT] at org.jbpm.services.task.commands.AddTaskCommand.execute(AddTaskCommand.java:105)[jbpm-human-task-core-6.0.1-20140120.jar:6.0.1-SNAPSHOT] at org.jbpm.services.task.commands.AddTaskCommand.execute(AddTaskCommand.java:53)[jbpm-human-task-core-6.0.1-20140120.jar:6.0.1-SNAPSHOT] at org.jbpm.services.task.commands.TaskCommandExecutorImpl$SelfExecutionCommandService.execute(TaskCommandExecutorImpl.java:65)[jbpm-human-task-core-6.0.1-20140120.jar:6.0.1-SNAPSHOT] at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41)[drools-core-6.0.1.Final.jar:6.0.1.Final] at org.jbpm.services.task.persistence.TaskTransactionInterceptor.execute(TaskTransactionInterceptor.java:53)[jbpm-human-task-core-6.0.1-20140120.jar:6.0.1-SNAPSHOT] at org.jbpm.services.task.commands.TaskCommandExecutorImpl.execute(TaskCommandExecutorImpl.java:40)[jbpm-human-task-core-6.0.1-20140120.jar:6.0.1-SNAPSHOT] at org.jbpm.services.task.impl.command.CommandBasedTaskService.addTask(CommandBasedTaskService.java:471)[jbpm-human-task-core-6.0.1-20140120.jar:6.0.1-SNAPSHOT] at org.jbpm.runtime.manager.impl.task.SynchronizedTaskService.addTask(SynchronizedTaskService.java:456)[jbpm-runtime-manager-6.0.1.Final.jar:6.0.1.Final] at org.jbpm.services.task.wih.LocalHTWorkItemHandler.executeWorkItem(LocalHTWorkItemHandler.java:60)[jbpm-human-task-workitems-6.0.1.Final.jar:6.0.1.Final] at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.internalExecuteWorkItem(JPAWorkItemManager.java:56)[drools-persistence-jpa-6.0.1.Final.jar:6.0.1.Final] at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:124)[jbpm-flow-6.0.1.Final.jar:6.0.1.Final] at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:155)[jbpm-flow-6.0.1.Final.jar:6.0.1.Final] at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:337)[jbpm-flow-6.0.1.Final.jar:6.0.1.Final] at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:296)[jbpm-flow-6.0.1.Final.jar:6.0.1.Final] at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:66)[jbpm-flow-6.0.1.Final.jar:6.0.1.Final] at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:43)[jbpm-flow-6.0.1.Final.jar:6.0.1.Final] at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:155)[jbpm-flow-6.0.1.Final.jar:6.0.1.Final] at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35)[jbpm-flow-6.0.1.Final.jar:6.0.1.Final] at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:222)[jbpm-flow-6.0.1.Final.jar:6.0.1.Final] at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:358)[jbpm-flow-6.0.1.Final.jar:6.0.1.Final] at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:189)[jbpm-flow-6.0.1.Final.jar:6.0.1.Final] at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:171)[jbpm-flow-6.0.1.Final.jar:6.0.1.Final] at org.drools.core.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1580)[drools-core-6.0.1.Final.jar:6.0.1.Final] at org.drools.core.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:366)[drools-core-6.0.1.Final.jar:6.0.1.Final] at org.drools.core.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:121)[drools-core-6.0.1.Final.jar:6.0.1.Final] at org.drools.core.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:40)[drools-core-6.0.1.Final.jar:6.0.1.Final] at org.drools.core.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36)[drools-core-6.0.1.Final.jar:6.0.1.Final] at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41)[drools-core-6.0.1.Final.jar:6.0.1.Final] at org.drools.persistence.SingleSessionCommandService$TransactionInterceptor.execute(SingleSessionCommandService.java:527)[drools-persistence-jpa-6.0.1.Final.jar:6.0.1.Final] at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41)[drools-core-6.0.1.Final.jar:6.0.1.Final] at org.drools.persistence.jpa.OptimisticLockRetryInterceptor.execute(OptimisticLockRetryInterceptor.java:73)[drools-persistence-jpa-6.0.1.Final.jar:6.0.1.Final] at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:375)[drools-persistence-jpa-6.0.1.Final.jar:6.0.1.Final] at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:232)[drools-core-6.0.1.Final.jar:6.0.1.Final] at org.jbpm.console.ng.bd.backend.server.KieSessionEntryPointImpl.startProcess(KieSessionEntryPointImpl.java:74)[jbpm-console-ng-business-domain-backend-6.0.1.Final.jar:6.0.1.Final] at org.jbpm.console.ng.bd.backend.server.KieSessionEntryPointImpl$Proxy$_$$_WeldClientProxy.startProcess(KieSessionEntryPointImpl$Proxy$_$$_WeldClientProxy.java)[jbpm-console-ng-business-domain-backend-6.0.1.Final.jar:6.0.1.Final] at org.jbpm.console.ng.ht.backend.server.FormModelerProcessStarterEntryPointImpl.startProcessFromRenderContext(FormModelerProcessStarterEntryPointImpl.java:44)[jbpm-console-ng-human-tasks-backend-6.0.1.Final.jar:6.0.1.Final] at org.jbpm.console.ng.ht.backend.server.FormModelerProcessStarterEntryPointImpl$Proxy$_$$_WeldClientProxy.startProcessFromRenderContext(FormModelerProcessStarterEntryPointImpl$Proxy$_$$_WeldClientProxy.java)[jbpm-console-ng-human-tasks-backend-6.0.1.Final.jar:6.0.1.Final] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[rt.jar:1.6.0_43] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[rt.jar:1.6.0_43] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[rt.jar:1.6.0_43] at java.lang.reflect.Method.invoke(Method.java:597)[rt.jar:1.6.0_43] at org.jboss.errai.bus.server.io.AbstractRPCMethodCallback.invokeMethodFromMessage(AbstractRPCMethodCallback.java:48)[errai-bus-2.4.3.Final.jar:2.4.3.Final] at org.jboss.errai.bus.server.io.ValueReplyRPCEndpointCallback.callback(ValueReplyRPCEndpointCallback.java:22)[errai-bus-2.4.3.Final.jar:2.4.3.Final] at org.jboss.errai.bus.server.io.RemoteServiceCallback.callback(RemoteServiceCallback.java:54)[errai-bus-2.4.3.Final.jar:2.4.3.Final] at org.jboss.errai.cdi.server.CDIExtensionPoints$3.callback(CDIExtensionPoints.java:499)[errai-weld-integration-2.4.3.Final.jar:2.4.3.Final] at org.jboss.errai.bus.server.DeliveryPlan.deliver(DeliveryPlan.java:47)[errai-bus-2.4.3.Final.jar:2.4.3.Final] at org.jboss.errai.bus.server.ServerMessageBusImpl.sendGlobal(ServerMessageBusImpl.java:284)[errai-bus-2.4.3.Final.jar:2.4.3.Final] at org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDispatcher.java:46)[errai-bus-2.4.3.Final.jar:2.4.3.Final] at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:92)[errai-bus-2.4.3.Final.jar:2.4.3.Final] at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:109)[errai-bus-2.4.3.Final.jar:2.4.3.Final] at org.jboss.errai.bus.server.servlet.DefaultBlockingServlet.doPost(DefaultBlockingServlet.java:140)[errai-bus-2.4.3.Final.jar:2.4.3.Final] at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)[jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final] at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)[jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)[jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)[jbossweb-7.0.13.Final.jar:] at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:62)[weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)[jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)[jbossweb-7.0.13.Final.jar:] at org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65)[solder-impl-3.2.1.Final.jar:3.2.1.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)[jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)[jbossweb-7.0.13.Final.jar:] at org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74)[solder-impl-3.2.1.Final.jar:3.2.1.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)[jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)[jbossweb-7.0.13.Final.jar:] at org.jbpm.designer.web.filter.impl.PluggableFilter.doFilter(PluggableFilter.java:70)[jbpm-designer-backend-6.0.1.Final.jar:6.0.1.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)[jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)[jbossweb-7.0.13.Final.jar:] at org.uberfire.security.server.UberFireSecurityFilter.doFilter(UberFireSecurityFilter.java:266)[uberfire-security-server-0.3.1.Final.jar:0.3.1.Final] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)[jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)[jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)[jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)[jbossweb-7.0.13.Final.jar:] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:489)[jbossweb-7.0.13.Final.jar:] at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)[jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final] at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)[jboss-as-web-7.1.1.Final.jar:7.1.1.Final] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)[jbossweb-7.0.13.Final.jar:] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)[jbossweb-7.0.13.Final.jar:] at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:416)[jbossweb-7.0.13.Final.jar:] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)[jbossweb-7.0.13.Final.jar:] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)[jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)[jbossweb-7.0.13.Final.jar:] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)[jbossweb-7.0.13.Final.jar:] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)[jbossweb-7.0.13.Final.jar:] at java.lang.Thread.run(Thread.java:662)[rt.jar:1.6.0_43]

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    linxiaolonglinxiaolong
    Once,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    12 more bugmates