问题描述
在自己的项目中首先启动HorentQ服务器没有问题:try{TaskServicetaskService=newTaskService(entityManagerFactory,SystemEventListenerFactory.getSystemEventListener());//添加必要的用户TaskServiceSessiontaskSession=taskService.createSession();taskSession.addUser(newUser("krisv"));taskSession.addUser(newUser("john"));//开启HornetQTaskServerHornetQTaskServerserver=newHornetQTaskServer(taskService,5445);Threadthread=newThread(server);thread.start();System.out.println("************启动HorentQ服务器完毕*************"+entityManagerFactory);}catch(Throwablet){thrownewRuntimeException("不能开启HornetQ服务器",t);}然后启动流程:publicProcessInstancestartWorkflowProcess(){ProcessInstancepi=null;try{HornetQHTWorkItemHandlerhornetQHTWorkItemHandler=newHornetQHTWorkItemHandler(ksession);ksession.getWorkItemManager().registerWorkItemHandler("HumanTask",hornetQHTWorkItemHandler);pi=ksession.startProcess(processName,params);}catch(Exceptione){e.printStackTrace();}returnpi;}然后控制台会报错:175312105/0110:29:12,564[http-bio-8088-exec-1]ERRORservice.hornetq.HornetQTaskClientConnector.connect-Unabletoconnecttoserverusingconfigurationorg-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port=5153&host=127-0-0-1175312305/0110:29:12,566[http-bio-8088-exec-1]ERRORdrools.persistence.SingleSessionCommandService.rollbackTransaction-Couldnotcommitsessionorg.jbpm.workflow.instance.WorkflowRuntimeException:[special:6-提交:2]--Couldnotconnecttaskclient:onip:127.0.0.1-port:5153跪求解答!!!!