0 Replies Latest reply on Jul 23, 2014 1:31 AM by soumya.plavaga

    jbpm version 6.1.0.CR1 DBUserGroupInfoProducer giving org.hibernate.hql.internal.ast.QuerySyntaxException:unexpected end of subtree

    soumya.plavaga

      W.r.t https://community.jboss.org/thread/243021 thread I am further adding this thread as a separate query for ease of searching within community.

       

      I am using DBUserGroupInfoProducer instead of default JAASUserGrpoupInfoProducer. I have changed the <alternative> tag within bean.xml to use the DBUserGroupInfoProducer class as following -

       

        <alternatives>

          <class>org.jbpm.kie.services.cdi.producer.DBUserGroupInfoProducer</class>

        </alternatives>

       

      I have added a property file 'jbpm.usergroup.callback.properties' within jbpm-console/WEB-INF/classes and the content of that are following -

       

      db.ds.jndi.name=java:jboss/datasources/jbpmDS

      db.user.query=select * from user where username \= ?

      db.user.roles.query=select * from user_has_role where user_id \= ?

      db.roles.query=select * from role where name \= ?

       

      I have my datasource configured with the same jndi name in 'standalone-as-7.1.1.Final.xml' and 'standalone-full-as-7.1.1.Final.xml'. Also added the requied tables with test data populated in database.

       

      Following are my ddl scripts -

       

      CREATE TABLE ROLE(ID INT PRIMARY KEY, NAME VARCHAR(45));

      CREATE TABLE USER(ID INT PRIMARY KEY, USERNAME VARCHAR(45) , PASSWORD VARCHAR(45) );

      CREATE TABLE USER_HAS_ROLE(ID INT PRIMARY KEY, USER_ID INT , ROLE_ID INT );

      insert into user values (1, 'krisv', 'krisv')

      insert into role values (1, 'admin')

      insert into user_has_role values (1, 1, 1)

       

      After the above changes TC startup is fine but while accessing 'Task Lists' after login from jbpm console UI I am getting following exception -

       

      Unexpected error encountered : org.hibernate.hql.internal.ast.QuerySyntaxException:unexpected end of subtree [select distinct new org.jbpm.services.task.query.TaskSummaryImpl( t.id, t.name, t.description, t.taskData.status, t.priority, t.taskData.actualOwner.id, t.taskData.createdBy.id, t.taskData.createdOn, t.taskData.activationTime, t.taskData.expirationTime, t.taskData.processId, t.taskData.processInstanceId, t.taskData.parentId, t.taskData.deploymentId ) from org.jbpm.services.task.impl.model.TaskImpl t, org.jbpm.services.task.impl.model.OrganizationalEntityImpl potentialOwners where t.archived = 0 and ( potentialOwners.id = :userId or potentialOwners.id in () ) and potentialOwners in elements ( t.peopleAssignments.potentialOwners ) and t.taskData.status in (:status0_, :status1_, :status2_) order by t.id DESC]

       

      If anyone can through some light on that please? If that is a bug of 6.1.0.CR1 release or anything I am missing with the configuration?