Hello, I am would like to use a timer with JBPM 3.2.1. and Spring framework I found the way with a JobExecutor :
in JBPM.cfg.xml I put the JobExecutor configuration like this : | <bean name="jbpm.job.executor" class="org.jbpm.job.executor.JobExecutor"> | <field name="jbpmConfiguration"><ref bean="jbpmConfiguration" /></field> | <field name="name"><string value="JbpmJobExecutor" /></field> | <field name="nbrOfThreads"><int value="1" /></field> | <field name="idleInterval"><int value="5000" /></field> | <field name="maxIdleInterval"><int value="3600000" /></field> <!-- 1 hour --> | <field name="historyMaxSize"><int value="20" /></field> | <field name="maxLockTime"><int value="20000" /></field> <!-- 20 sec --> | <field name="lockMonitorInterval"><int value="10000" /></field> <!-- 10 sec --> | <field name="lockBufferTime"><int value="5000" /></field> <!-- 5 seconds --> | </bean> | And I put my JobExecutorServlet on the web.xml : | <servlet> | <servlet-name>JobExecutorServlet</servlet-name> | <servlet-class>org.jbpm.job.executor.JobExecutorServlet</servlet-class> | <load-on-startup>1</load-on-startup> | </servlet> | | <servlet-mapping> | <servlet-name>JobExecutorServlet</servlet-name> | <url-pattern>/jobs</url-pattern> | </servlet-mapping> | When I start my web application with this new Servlet I get an error but I can't see the relationship between my JobExecutor and the error. The Job seems to start correctly : | 14:30:43,689 DEBUG ObjectFactoryImpl:59 - adding object info 'jbpm.job.executor' | 14:30:43,689 DEBUG ObjectFactoryImpl:59 - adding object info 'jbpmConfiguration' | 14:30:43,705 DEBUG JobExecutor:41 - starting thread group 'JbpmJobExector'... | 14:30:43,736 DEBUG JobExecutor:87 - starting new job executor thread 'JbpmJobExector:10.138.101.47:1' | When It try to close the JBPMContext It throws an exception about JBPM_NODE table ... | 14:31:34,691 DEBUG JbpmContext:133 - closing JbpmContext | 14:31:34,691 DEBUG Services:221 - closing service 'persistence': [EMAIL PROTECTED] | 14:31:36,878 ERROR JobExecutorThread:83 - exception in job executor thread. waiting 5000 milliseconds | org.hibernate.MappingException: An association from the table JBPM_NODE refers to an unmapped class: org.jbpm.graph.action.Script | at org.hibernate.cfg.Configuration.secondPassCompileForeignKeys(Configuration.java:1249) | at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1167) | at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1283) | at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91) | at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:107) | at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:111) | at org.jbpm.persistence.db.DbPersistenceService.getJobSession(DbPersistenceService.java:401) | at org.jbpm.JbpmContext.getJobSession(JbpmContext.java:563) | at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:110) | at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:56) | Can somebody explain me why ? and how to correct this problem ? It seems to be a configuration problem but I don't know what to change ... Thanks for your help View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100257#4100257 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100257 _______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
