[jboss-user] [jBPM] - taskservice error in jbpm5.3 with mysql

Kehua Gao do-not-reply at jboss.com
Thu Oct 25 21:22:55 EDT 2012


Kehua Gao [https://community.jboss.org/people/kehuagao] created the discussion

"taskservice error in jbpm5.3 with mysql"

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

--------------------------------------------------------------
hi, I try the taskservice code in jbpm5.3 with mysql,it occurs error as follow:
java.lang.IllegalArgumentException: Named query not found: UnescalatedDeadlines
     at org.hibernate.ejb.AbstractEntityManagerImpl.createNamedQuery(AbstractEntityManagerImpl.java:108)
     at org.jbpm.task.service.persistence.TaskPersistenceManager.getUnescalatedDeadlinesList(TaskPersistenceManager.java:174)
     at org.jbpm.task.service.persistence.TaskPersistenceManager.getUnescalatedDeadlines(TaskPersistenceManager.java:146)
     at org.jbpm.task.service.TaskServiceSession.scheduleUnescalatedDeadlines(TaskServiceSession.java:231)
     at org.jbpm.task.service.TaskService.initialize(TaskService.java:116)
     at org.jbpm.task.service.TaskService.initialize(TaskService.java:101)
     at org.jbpm.task.service.TaskService.(TaskService.java:79)
     at com.sample.TaskServer.main(TaskServer.java:26)

taskservice code:

package com.sample;

import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

import org.drools.SystemEventListenerFactory;
import org.jbpm.task.User;
import org.jbpm.task.service.TaskService;
import org.jbpm.task.service.TaskServiceSession;
import org.jbpm.task.service.mina.MinaTaskServer;

import bitronix.tm.resource.jdbc.PoolingDataSource;

public class TaskServer {

     /**

* @param args
      */
     public static final void main(String[] args) {

          try {



               EntityManagerFactory emfTask = Persistence.createEntityManagerFactory( "org.jbpm.task" );
               TaskService taskService = new TaskService(emfTask, SystemEventListenerFactory.getSystemEventListener());



               /*

* Add the required users 
              */
             TaskServiceSession taskSession = taskService.createSession();   
             taskSession.addUser(new User("Administrator"));
             taskSession.addUser(new User("krisv")); 

             /* Start Mina server for HT*/
             MinaTaskServer server = new MinaTaskServer(taskService);
             Thread thread = new Thread(server);
             thread.start();
             System.out.println("Server started ..."); 


          } catch (Throwable t) {
               t.printStackTrace();
          }
     }





}
--------------------------------------------------------------

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

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/20121025/a8a3672c/attachment.html 


More information about the jboss-user mailing list