<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Re: Write records on jBoss datasource using hibernate
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/lauradp">Laura delli Paoli</a> in <i>jBPM</i> - <a href="https://community.jboss.org/message/787666#787666">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Now I get this error:</p><p>18:06:48,653 INFO  [bitronix.tm.recovery.Recoverer] (http-localhost-127.0.0.1-8080-1) recovery committed 0 dangling transaction(s) and rolled back 0 aborted transaction(s) on 0 resource(s) [] (restricted to serverId '10.7.1.115')</p><p>18:06:58,703 INFO  [eu.discoveryreply.serviceLayer.jbpm.wiHandlers.LogTaskHandler] (http-localhost-127.0.0.1-8080-1) This is LogTaskHandler. ProcessInstanceId is42</p><p>18:07:01,329 INFO  [org.hibernate.cfg.Configuration] (http-localhost-127.0.0.1-8080-1) HHH000043: Configuring from resource: /hibernate.cfg.xml</p><p>18:07:01,331 INFO  [org.hibernate.cfg.Configuration] (http-localhost-127.0.0.1-8080-1) HHH000040: Configuration resource: /hibernate.cfg.xml</p><p>18:07:01,455 INFO  [org.hibernate.cfg.Configuration] (http-localhost-127.0.0.1-8080-1) HHH000221: Reading mappings from resource: eu/discoveryreply/dataLayer/dao/MCF_ProcessesDetails.hbm.xml</p><p>18:07:01,496 INFO  [org.hibernate.cfg.Configuration] (http-localhost-127.0.0.1-8080-1) HHH000041: Configured SessionFactory: null</p><p>18:07:01,605 INFO  [org.hibernate.dialect.Dialect] (http-localhost-127.0.0.1-8080-1) HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect</p><p>18:07:01,607 INFO  [org.hibernate.engine.jdbc.internal.LobCreatorBuilder] (http-localhost-127.0.0.1-8080-1) HHH000423: Disabling contextual LOB creation as JDBC driver reported JDBC version [3] less than 4</p><p>18:07:01,632 INFO  [org.hibernate.engine.transaction.internal.TransactionFactoryInitiator] (http-localhost-127.0.0.1-8080-1) HHH000399: Using default transaction strategy (direct JDBC transactions)</p><p>18:07:01,653 INFO  [org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory] (http-localhost-127.0.0.1-8080-1) HHH000397: Using ASTQueryTranslatorFactory</p><p>18:07:01,904 ERROR [eu.discoveryreply.serviceLayer.jbpm.wiHandlers.LogTaskHandler] (http-localhost-127.0.0.1-8080-1) Unable to save process 42 to DB: org.hibernate.TransactionException: commit failed</p><p>          at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:185) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]</p><p>          at eu.discoveryreply.dataLayer.dao.MCF_ProcessesDetailsDAO.save(MCF_ProcessesDetailsDAO.java:36) [classes:]</p><p>          at eu.discoveryreply.serviceLayer.jbpm.wiHandlers.LogTaskHandler.executeWorkItem(LogTaskHandler.java:68) [classes:]</p><p>          at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.internalExecuteWorkItem(JPAWorkItemManager.java:55) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final]</p><p>          at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:107) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]</p><p>          at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]</p><p>          at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:279) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]</p><p>          at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:238) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]</p><p>          at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:49) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]</p><p>          at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:41) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]</p><p>          at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]</p><p>          at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]</p><p>          at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:194) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]</p><p>          at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:309) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]</p><p>          at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:170) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]</p><p>          at org.drools.common.AbstractWorkingMemory.startProcessInstance(AbstractWorkingMemory.java:1108) [drools-core-5.5.0.Final.jar:5.5.0.Final]</p><p>          at org.drools.impl.StatefulKnowledgeSessionImpl.startProcessInstance(StatefulKnowledgeSessionImpl.java:330) [drools-core-5.5.0.Final.jar:5.5.0.Final]</p><p>          at org.drools.command.runtime.process.StartProcessInstanceCommand.execute(StartProcessInstanceCommand.java:46) [drools-core-5.5.0.Final.jar:5.5.0.Final]</p><p>          at org.drools.command.runtime.process.StartProcessInstanceCommand.execute(StartProcessInstanceCommand.java:25) [drools-core-5.5.0.Final.jar:5.5.0.Final]</p><p>          at org.drools.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36) [drools-core-5.5.0.Final.jar:5.5.0.Final]</p><p>          at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:373) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final]</p><p>          at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.startProcessInstance(CommandBasedStatefulKnowledgeSession.java:237) [drools-core-5.5.0.Final.jar:5.5.0.Final]</p><p>          at eu.discoveryreply.serviceLayer.jbpm.JBpmPrimaryWkfLauncher.startWorkflow(JBpmPrimaryWkfLauncher.java:113) [classes:]</p><p>          at eu.discoveryreply.serviceLayer.webServer.StartWkfWS.startWorkflow(StartWkfWS.java:51) [classes:]</p><p>          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_32]</p><p>          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.6.0_32]</p><p>          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.6.0_32]</p><p>          at java.lang.reflect.Method.invoke(Unknown Source) [rt.jar:1.6.0_32]</p><p>          at org.jboss.ws.common.invocation.AbstractInvocationHandlerJSE.invoke(AbstractInvocationHandlerJSE.java:108)</p><p>          at org.jboss.wsf.stack.cxf.JBossWSInvoker.performInvocation(JBossWSInvoker.java:149)</p><p>          at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96) [cxf-rt-core-2.4.4.jar:2.4.4]</p><p>          at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.invoke(AbstractJAXWSMethodInvoker.java:178) [cxf-rt-frontend-jaxws-2.4.4.jar:2.4.4]</p><p>          at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:64) [cxf-rt-frontend-jaxws-2.4.4.jar:2.4.4]</p><p>          at org.jboss.wsf.stack.cxf.JBossWSInvoker.invoke(JBossWSInvoker.java:129)</p><p>          at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58) [cxf-rt-core-2.4.4.jar:2.4.4]</p><p>          at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [rt.jar:1.6.0_32]</p><p>          at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) [rt.jar:1.6.0_32]</p><p>          at java.util.concurrent.FutureTask.run(Unknown Source) [rt.jar:1.6.0_32]</p><p>          at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) [cxf-rt-core-2.4.4.jar:2.4.4]</p><p>          at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:107) [cxf-rt-core-2.4.4.jar:2.4.4]</p><p>          at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262) [cxf-api-2.4.4.jar:2.4.4]</p><p>          at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) [cxf-rt-core-2.4.4.jar:2.4.4]</p><p>          at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:236) [cxf-rt-transports-http-2.4.4.jar:2.4.4]</p><p>          at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:88)</p><p>          at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:164)</p><p>          at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:90)</p><p>          at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:221) [cxf-rt-transports-http-2.4.4.jar:2.4.4]</p><p>          at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:141) [cxf-rt-transports-http-2.4.4.jar:2.4.4]</p><p>          at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]</p><p>          at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:138)</p><p>          at org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140) [jbossws-spi.jar:2.1.0.Final]</p><p>          at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]</p><p>          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]</p><p>          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]</p><p>          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]</p><p>          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]</p><p>          at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]</p><p>          at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]</p><p>          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]</p><p>          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]</p><p>          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]</p><p>          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]</p><p>          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]</p><p>          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]</p><p>          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]</p><p>          at java.lang.Thread.run(Unknown Source) [rt.jar:1.6.0_32]</p><p>Caused by: org.hibernate.TransactionException: unable to commit against JDBC connection</p><p>          at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doCommit(JdbcTransaction.java:116) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]</p><p>          at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:178) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]</p><p>          ... 65 more</p><p>Caused by: java.sql.SQLException: You cannot commit during a managed transaction!</p><p>          at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.jdbcCommit(BaseWrapperManagedConnection.java:981)</p><p>          at org.jboss.jca.adapters.jdbc.WrappedConnection.commit(WrappedConnection.java:757)</p><p>          at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doCommit(JdbcTransaction.java:112) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]</p><p>          ... 66 more</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/787666#787666">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>