2 Replies Latest reply on Nov 14, 2008 8:33 PM by salaboy21

    Task Assignment Expression, Hibernate Parameter Error

      I'm using Oracle as my datasource and using jBPM in my own web application. I have the JBPM schema on Oracle with the JBPM_ID_GROUP table with 1 row for group 'DivisionHead'.

      When jBPM tries to assign the task to "group(DivisionHead)" I get the below errors:

      WARN QuerySplitter : no persistent classes found for query class: select g from org.jbpm.identity.Group as g where g.name = :groupName

      WARN RequestProcessor : Unhandled Exception thrown: class org.jbpm.graph.def.DelegationException
      14:53:06,580 ERROR [[action]] Servlet.service() for servlet action threw exception
      java.lang.IllegalArgumentException: Parameter groupName does not exist as a named parameter in [select g from org.jbpm.identity.Group as g where g.name = :groupName]
      at org.hibernate.impl.AbstractQueryImpl.setParameter(AbstractQueryImpl.java:356)

      Anyone know whats wrong and how to fix it?

        • 1. Re: Task Assignment Expression, Hibernate Parameter Error

          I look at the source for IdentitySession.java and see this code...
          It looks like "groupName" is a parameter as set by query.setString(). So what can I do to fix this problem? Please help. Thanks.

          public Group getGroupByName(String groupName)
          {
          Group group = null;
          Query query = session.createQuery("select g " + "from org.jbpm.identity.Group as g " + "where g.name = :groupName");
          query.setString("groupName", groupName);
          List groups = query.list();
          if ((groups != null) && (groups.size() > 0))
          {
          group = (Group)groups.get(0);
          }
          return group;
          }

          • 2. Re: Task Assignment Expression, Hibernate Parameter Error
            salaboy21

            This kind of warning / error could be that in you hibernate.cfg.xml you don't have the group, user and membership entities mapper.. maybe there are commented....
            Take a look