JBoss Community

jbpm 5.3 and HumanTaskStartupServlet from example

created by franco80 in jBPM - View the full discussion

hello

 

I have a question, when build my application with servlets, but without stop server I always recived error:

 

 

10:29:18,310 ERROR [stderr] (Thread-69) Exception in thread "Thread-69" java.lang.RuntimeException: Could not start human task server, address already in use, is it possible that another instance of the task server is already running?

 

10:29:18,310 ERROR [stderr] (Thread-69)     at org.jbpm.task.service.mina.BaseMinaTaskServer.run(BaseMinaTaskServer.java:64)

 

10:29:18,310 ERROR [stderr] (Thread-69)     at java.lang.Thread.run(Thread.java:722)

 

code init servlet method is:

 

          EntityManagerFactory emfTask = Persistence

                    .createEntityManagerFactory("org.jbpm.task");

            TaskService taskService = new TaskService(emfTask,

                    SystemEventListenerFactory.getSystemEventListener());

 

            /* Add the required users */

            TaskServiceSession ts = taskService.createSession();

            ts.addUser(new User("admin"));

               ...

            ts.addGroup(new Group("MANAGER"));

               ...

 

            /* Start Mina server for HT */

            MinaTaskServer server = new MinaTaskServer(taskService);

            /* Thread */

            thread = new Thread(server) {};

            thread.start();

 

 

I must always stop the jboss server when I throw new version appplication or this error is 'harmless' :) ?

Reply to this message by going to Community

Start a new discussion in jBPM at Community