[jBPM Users] - Connection time out during Configuration.setResource
by hidman78
Hi,
I'm currently trying to use JBPM 4.1 on tomcat with struts and mysql. I have a problem during the initialization of ProcessEngine. There is a connection time out exception. I think it is trying to connect to mysql but mysql is running and responding so I don't know what is going wrong.
Tomcat Log :
Le serveur a rencontré une erreur interne () qui l'a empêché de satisfaire la requête.
|
| exception
|
| javax.servlet.ServletException: org.jbpm.api.JbpmException:
| error: couldn't parse xml document : java.net.ConnectException: Connection timed out: connect
| org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
| org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
| org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
| javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
| javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| cause mère
|
| org.jbpm.api.JbpmException:
| error: couldn't parse xml document : java.net.ConnectException: Connection timed out: connect
| org.jbpm.pvm.internal.xml.ProblemList.getJbpmException(ProblemList.java:168)
| org.jbpm.pvm.internal.xml.ProblemList.getJbpmException(ProblemList.java:141)
| org.jbpm.pvm.internal.xml.Parse.checkErrors(Parse.java:189)
| org.jbpm.pvm.internal.cfg.JbpmConfiguration.parse(JbpmConfiguration.java:178)
| org.jbpm.pvm.internal.cfg.JbpmConfiguration.setResource(JbpmConfiguration.java:150)
| org.jbpm.api.Configuration.setResource(Configuration.java:112)
| javaclass.DAO.BillDAO.findByExample(BillDAO.java:47)
| javaclass.action.ListBillAction.execute(ListBillAction.java:29)
| org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
| org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
| org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
| org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
| org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
| org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
| org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
| org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
| org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
| javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
| javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| cause mère
|
| org.jbpm.api.JbpmException
| org.jbpm.pvm.internal.xml.ProblemList.getJbpmException(ProblemList.java:164)
| org.jbpm.pvm.internal.xml.ProblemList.getJbpmException(ProblemList.java:141)
| org.jbpm.pvm.internal.xml.Parse.checkErrors(Parse.java:189)
| org.jbpm.pvm.internal.cfg.JbpmConfiguration.parse(JbpmConfiguration.java:178)
| org.jbpm.pvm.internal.cfg.JbpmConfiguration.setResource(JbpmConfiguration.java:150)
| org.jbpm.api.Configuration.setResource(Configuration.java:112)
| javaclass.DAO.BillDAO.findByExample(BillDAO.java:47)
| javaclass.action.ListBillAction.execute(ListBillAction.java:29)
| org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
| org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
| org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
| org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
| org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
| org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
| org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
| org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
| org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
| javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
| javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| cause mère
|
| java.net.ConnectException: Connection timed out: connect
| java.net.PlainSocketImpl.socketConnect(Native Method)
| java.net.PlainSocketImpl.doConnect(Unknown Source)
| java.net.PlainSocketImpl.connectToAddress(Unknown Source)
| java.net.PlainSocketImpl.connect(Unknown Source)
| java.net.SocksSocketImpl.connect(Unknown Source)
| java.net.Socket.connect(Unknown Source)
| java.net.Socket.connect(Unknown Source)
| sun.net.NetworkClient.doConnect(Unknown Source)
| sun.net.www.http.HttpClient.openServer(Unknown Source)
| sun.net.www.http.HttpClient.openServer(Unknown Source)
| sun.net.www.http.HttpClient.<init>(Unknown Source)
| sun.net.www.http.HttpClient.New(Unknown Source)
| sun.net.www.http.HttpClient.New(Unknown Source)
| sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
| sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
| sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
| sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
| com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
| com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startEntity(Unknown Source)
| com.sun.org.apache.xerces.internal.impl.XMLEntityManager.startDTDEntity(Unknown Source)
| com.sun.org.apache.xerces.internal.impl.XMLDTDScannerImpl.setInputSource(Unknown Source)
| com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(Unknown Source)
| com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(Unknown Source)
| com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
| com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
| com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
| com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
| com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
| com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
| com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
| com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
| com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
| org.jbpm.pvm.internal.xml.Parser.buildDom(Parser.java:453)
| org.jbpm.pvm.internal.xml.Parser.execute(Parser.java:389)
| org.jbpm.pvm.internal.xml.Parse.execute(Parse.java:157)
| org.jbpm.pvm.internal.env.JbpmConfigurationParser.parseDocument(JbpmConfigurationParser.java:68)
| org.jbpm.pvm.internal.xml.Parser.execute(Parser.java:396)
| org.jbpm.pvm.internal.xml.Parse.execute(Parse.java:157)
| org.jbpm.pvm.internal.cfg.JbpmConfiguration.parse(JbpmConfiguration.java:178)
| org.jbpm.pvm.internal.cfg.JbpmConfiguration.setResource(JbpmConfiguration.java:150)
| org.jbpm.api.Configuration.setResource(Configuration.java:112)
| javaclass.DAO.BillDAO.findByExample(BillDAO.java:47)
| javaclass.action.ListBillAction.execute(ListBillAction.java:29)
| org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
| org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
| org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
| org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
| org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
| org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
| org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
| org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
| org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
| javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
| javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
|
jbpm.cfg:
<?xml version="1.0" encoding="UTF-8"?>
|
| <jbpm-configuration>
|
| <import resource="jbpm.default.cfg.xml" />
| <import resource="jbpm.tx.hibernate.cfg.xml" />
| <import resource="jbpm.jpdl.cfg.xml" />
| <import resource="jbpm.identity.cfg.xml" />
| <import resource="jbpm.businesscalendar.cfg.xml" />
| <import resource="jbpm.jobexecutor.cfg.xml" />
|
| </jbpm-configuration>
|
|
jbpm.hibernate.cfg.xml:
<?xml version="1.0" encoding="utf-8"?>
| <!DOCTYPE hibernate-configuration
| PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
| "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
|
| <hibernate-configuration>
| <session-factory>
| <!-- Enable Hibernate's automatic session context management -->
|
| <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
| <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
| <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpmdb</property>
| <property name="hibernate.connection.username">root</property>
| <property name="hibernate.connection.password"></property>
| <property name="hibernate.format_sql">true</property>
|
| <mapping resource="javaclass.beans.Bill.hbm.xml" />
| <mapping resource="javaclass.beans.Test.hbm.xml" />
| <mapping resource="javaclass.beans.User.hbm.xml" />
| <mapping resource="jbpm.repository.hbm.xml" />
| <mapping resource="jbpm.execution.hbm.xml" />
| <mapping resource="jbpm.history.hbm.xml" />
| <mapping resource="jbpm.task.hbm.xml" />
| <mapping resource="jbpm.identity.hbm.xml" />
| <mapping resource="jbpm.identity.hbm.xml" />
|
| <property name="current_session_context_class">thread</property>
| </session-factory>
| </hibernate-configuration>
web.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
| <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xmlns="http://java.sun.com/xml/ns/javaee"
| xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
| xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
| id="WebApp_ID" version="2.5">
|
| <display-name>MonApplication</display-name>
|
| <!-- Configuration de l'action servlet -->
| <servlet>
| <servlet-name>action</servlet-name>
| <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
| <init-param>
| <param-name>config</param-name>
| <param-value>/WEB-INF/struts-config.xml</param-value>
| </init-param>
| <load-on-startup>1</load-on-startup>
| </servlet>
| <servlet-mapping>
| <servlet-name>action</servlet-name>
| <url-pattern>*.do</url-pattern>
| </servlet-mapping>
| </web-app>
Code executed
ProcessEngine processEngine = new Configuration().setResource("jbpm.cfg.xml").buildProcessEngine();
| ExecutionService executionService = processEngine.getExecutionService();
| ProcessInstance processinstance = executionService.startProcessInstanceByKey("Custom-1");
Thx
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4253648#4253648
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4253648
15 years, 4 months
[jBPM Users] - Awesome job with jBPM 4.1
by unsavory
I just wanted to say what a great job you guys did with the jBPM 4.1 release. Not only was it released on time, but the support promised for Tomcat was also delivered. Thank you!
As of 3:30AM this morning we now have 2 production application servers running jBPM 4.1 in Tomcat with Spring + JPA + Hibernate + JTA + JOTM.
I struggled for a long time trying to get this configuration to work with jBPM 4 and I never quite got it working right. Most of the issues were related to the Job Executor which now starts like it is supposed to in this environment and actually executes jobs correctly (ie: can find the spring transaction manager). But it all worked as soon as I plugged jBPM 4.1 in.
There are some JTA transaction issues with JOTM I'm struggling with in regards to rollbacks on exceptions, but I do not believe it is related to jBPM.
Thanks again for a great product and a great release!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4253646#4253646
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4253646
15 years, 4 months