[jboss-user] [jBPM] - Write records on jBoss datasource using hibernate

Laura delli Paoli do-not-reply at jboss.com
Fri Jan 4 09:39:08 EST 2013


Laura delli Paoli [https://community.jboss.org/people/lauradp] created the discussion

"Write records on jBoss datasource using hibernate"

To view the discussion, visit: https://community.jboss.org/message/787612#787612

--------------------------------------------------------------
Hello everybody,
I don't If I posted my question in the right section, but I tryed the same code in a JBoss war, without jBPM and it worked fine.
I'm developping an application running in JBoss AS7. My app is a web service that launchs jBPM workflows. I need to write some records in a table of the JBoss Datasource using Hibernate.
on executing
session.beginTransaction();
I get the following error (see full trace attached):
14:29:45,500 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http-localhost-127.0.0.1-8080-1) SQL Error: 0, SQLState: 08001
14:29:45,502 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http-localhost-127.0.0.1-8080-1) No suitable driver found for jdbc:mysql://10.21.101.175:3306/jbpm5
14:29:45,519 ERROR [eu.discoveryreply.serviceLayer.jbpm.wiHandlers.LogTaskHandler] (http-localhost-127.0.0.1-8080-1) Unable to save process 37 to DB: org.hibernate.exception.JDBCConnectionException: Could not open connection
  at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:131) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
  at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
  at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:125) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
  at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:110) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
  at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:304) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
  at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.getConnection(LogicalConnectionImpl.java:169) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
  at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.doBegin(JdbcTransaction.java:67) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
  at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.begin(AbstractTransactionImpl.java:160) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
  at org.hibernate.internal.SessionImpl.beginTransaction(SessionImpl.java:1263) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
  at eu.discoveryreply.dataLayer.dao.MCF_ProcessesDetailsDAO.save(MCF_ProcessesDetailsDAO.java:32) [classes:]
  at eu.discoveryreply.serviceLayer.jbpm.wiHandlers.LogTaskHandler.executeWorkItem(LogTaskHandler.java:68) [classes:]
  at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.internalExecuteWorkItem(JPAWorkItemManager.java:55) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final]
  at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:107) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
  at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
  at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:279) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
  at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:238) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
  at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:49) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
  at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:41) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
  at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:126) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
  at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
  at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:194) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
  at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:309) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
  at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:170) [jbpm-flow-5.4.0.Final.jar:5.4.0.Final]
  at org.drools.common.AbstractWorkingMemory.startProcessInstance(AbstractWorkingMemory.java:1108) [drools-core-5.5.0.Final.jar:5.5.0.Final]
  at org.drools.impl.StatefulKnowledgeSessionImpl.startProcessInstance(StatefulKnowledgeSessionImpl.java:330) [drools-core-5.5.0.Final.jar:5.5.0.Final]
  at org.drools.command.runtime.process.StartProcessInstanceCommand.execute(StartProcessInstanceCommand.java:46) [drools-core-5.5.0.Final.jar:5.5.0.Final]
  at org.drools.command.runtime.process.StartProcessInstanceCommand.execute(StartProcessInstanceCommand.java:25) [drools-core-5.5.0.Final.jar:5.5.0.Final]
  at org.drools.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36) [drools-core-5.5.0.Final.jar:5.5.0.Final]
  at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:373) [drools-persistence-jpa-5.5.0.Final.jar:5.5.0.Final]
  at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.startProcessInstance(CommandBasedStatefulKnowledgeSession.java:237) [drools-core-5.5.0.Final.jar:5.5.0.Final]
  at eu.discoveryreply.serviceLayer.jbpm.JBpmPrimaryWkfLauncher.startWorkflow(JBpmPrimaryWkfLauncher.java:113) [classes:]
  at eu.discoveryreply.serviceLayer.webServer.StartWkfWS.startWorkflow(StartWkfWS.java:51) [classes:]
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_32]
  at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.6.0_32]
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [rt.jar:1.6.0_32]
  at java.lang.reflect.Method.invoke(Unknown Source) [rt.jar:1.6.0_32]
  at org.jboss.ws.common.invocation.AbstractInvocationHandlerJSE.invoke(AbstractInvocationHandlerJSE.java:108)
  at org.jboss.wsf.stack.cxf.JBossWSInvoker.performInvocation(JBossWSInvoker.java:149)
  at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96) [cxf-rt-core-2.4.4.jar:2.4.4]
  at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.invoke(AbstractJAXWSMethodInvoker.java:178) [cxf-rt-frontend-jaxws-2.4.4.jar:2.4.4]
  at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:64) [cxf-rt-frontend-jaxws-2.4.4.jar:2.4.4]
  at org.jboss.wsf.stack.cxf.JBossWSInvoker.invoke(JBossWSInvoker.java:129)
  at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58) [cxf-rt-core-2.4.4.jar:2.4.4]
  at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [rt.jar:1.6.0_32]
  at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) [rt.jar:1.6.0_32]
  at java.util.concurrent.FutureTask.run(Unknown Source) [rt.jar:1.6.0_32]
  at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) [cxf-rt-core-2.4.4.jar:2.4.4]
  at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:107) [cxf-rt-core-2.4.4.jar:2.4.4]
  at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:262) [cxf-api-2.4.4.jar:2.4.4]
  at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) [cxf-rt-core-2.4.4.jar:2.4.4]
  at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:236) [cxf-rt-transports-http-2.4.4.jar:2.4.4]
  at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:88)
  at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:164)
  at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:90)
  at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:221) [cxf-rt-transports-http-2.4.4.jar:2.4.4]
  at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:141) [cxf-rt-transports-http-2.4.4.jar:2.4.4]
  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 org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:138)
  at org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140) [jbossws-spi.jar:2.1.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.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.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.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(Unknown Source) [rt.jar:1.6.0_32]
Caused by: java.sql.SQLException: No suitable driver found for jdbc:mysql://10.21.101.175:3306/jbpm5
  at java.sql.DriverManager.getConnection(Unknown Source) [rt.jar:1.6.0_32]
  at java.sql.DriverManager.getConnection(Unknown Source) [rt.jar:1.6.0_32]
  at org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl.getConnection(DriverManagerConnectionProviderImpl.java:173) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
  at org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:276) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
  at org.hibernate.engine.jdbc.internal.LogicalConnectionImpl.obtainConnection(LogicalConnectionImpl.java:297) [hibernate-core-4.0.1.Final.jar:4.0.1.Final]
  ... 69 more


14:29:46,310 INFO  [eu.discoveryreply.serviceLayer.jbpm.wiHandlers.MoveFileHandler] (http-localhost-127.0.0.1-8080-1) This is MoveFileHandler
14:29:46,311 INFO  [eu.discoveryreply.serviceLayer.jbpm.wiHandlers.MoveFileHandler] (http-localhost-127.0.0.1-8080-1) SourcePath: D:\RAS-Test\workingbox
14:29:48,096 INFO  [eu.discoveryreply.applicationLayer.actionHandler.jBpmWorkflowActionHandler] (Thread-1 (HornetQ-client-global-threads-2023845472)) Request sent
14:48:11,440 INFO  [org.jboss.as.osgi] (MSC service thread 1-7) JBAS011942: Stopping OSGi Framework
14:48:11,443 INFO  [org.jboss.as.messaging] (MSC service thread 1-7) JBAS011605: Unbound messaging object to jndi name java:/topic/test
14:48:11,446 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-1) Pausing Coyote HTTP/1.1 on http-localhost-127.0.0.1-8080
14:48:11,448 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-1) Stopping Coyote HTTP/1.1 on http-localhost-127.0.0.1-8080
14:48:11,451 INFO  [org.apache.catalina.core.StandardContext] (MSC service thread 1-8) Container org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/] has not been started
14:48:11,449 INFO  [org.jboss.as.messaging] (MSC service thread 1-2) JBAS011605: Unbound messaging object to jndi name java:jboss/exported/jms/RemoteConnectionFactory
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/787612#787612]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130104/a6cf7b95/attachment-0001.html 


More information about the jboss-user mailing list