4 Replies Latest reply on Sep 4, 2006 12:41 PM by varada

    JBPM Identity Component - QuerySyntaxException: JBPM_ID_USER

    varada

      Hi,

      I am developing a seam application integrated with JBPM. I am using Seam 1.0.1.GA on Jboss 4.0.4.GA with JBPM 3.1 I have a combined persistnace for JBMP and my application objects.

      When I do a create query as follows:

      Query jbpmquery = em.createQuery("select NAME_ from JBPM_ID_USER");

      I get the following error:

      15:08:26,080 ERROR [STDERR] javax.persistence.PersistenceException: org.hibernat
      e.hql.ast.QuerySyntaxException: JBPM_ID_USER is not mapped [select NAME_ from JBPM_ID_USER]

      I have copied the jbpm-identity-3.1.jar into ejb3 folder for the ear
      have the following entires in the hibernate.cfg.xml

      mapping resource="org/jbpm/identity/User.hbm.xml"
      mapping resource="org/jbpm/identity/Group.hbm.xml"
      mapping resource="org/jbpm/identity/Membership.hbm.xml"

      Any clues why this is happenning?

      Thanks & Regards,
      Varada

        • 1. Re: JBPM Identity Component - QuerySyntaxException: JBPM_ID_
          ikkida

          I am too facing the similar problem.

          i followed the exact ways discussed in one of the threads in our jboss forum but none worked:

          I tried adding the location of the jbpm-identity-3.1.2.jar file in persistence.xml:

          <jta-data-source>java:/UMKDS</jta-data-source>
          <jar-file>../jbpm-identity-3.1.2.jar</jar-file>

          &

          i even tried adding the class name directly

          <jta-data-source>java:/UMKDS</jta-data-source>
          org.jbpm.identity.User

          Bith ways failed to solve the issue.

          Can anybody throw some light on this.

          Thanks,
          Ikram

          • 2. Re: JBPM Identity Component - QuerySyntaxException: JBPM_ID_
            hannes

            Do u execute a SQL or a HQL query?
            session.createQuery("select u.name from org.jbpm.identity.User as u")
            or
            session.createSQLQuery("select NAME_ from JBPM_ID_USER")
            ?
            (untested)

            • 3. Re: JBPM Identity Component - QuerySyntaxException: JBPM_ID_
              ikkida

              I'm using em.createQuery

              • 4. Re: JBPM Identity Component - QuerySyntaxException: JBPM_ID_
                varada

                Thanks for responding.

                If I do

                Query jbpmquery = em.createQuery("select u.name from org.jbpm.identity.User as u where u.name:= username");
                jbpmquery.setParameter("name", username);
                User found = (User)jbpmquery.getSingleResult();

                I get the following error.


                22:06:29,231 WARN [QuerySplitter] no persistent classes found for query class:
                select u.name from org.jbpm.identity.User as u where u.name:= username
                22:06:29,231 ERROR [STDERR] javax.persistence.PersistenceException: org.hibernat
                e.HibernateException: could not locate named parameter [name]
                22:06:29,231 ERROR [STDERR] at org.hibernate.ejb.AbstractEntityManagerImpl.t
                hrowPersistenceException(AbstractEntityManagerImpl.java:567)
                22:06:29,231 ERROR [STDERR] at org.hibernate.ejb.QueryImpl.setParameter(Quer
                yImpl.java:149)

                Some how the identity classes are not loaded..

                Any suggesstions??