8 Replies Latest reply on Apr 7, 2006 6:16 PM by Stacey Vetzal

    Webapp and Pooled Actors?

    Jim Rigsbee Newbie

      I built the webapp from HEAD and deployed it...when I sign in as ernie I get this:

      Caused by: org.hibernate.hql.ast.QuerySyntaxException: unexpected end of subtree [

      select distinct ti
      from org.jbpm.taskmgmt.exe.PooledActor pooledActor
      join pooledActor.taskInstances ti
      where pooledActor.actorId in ( )
      and ti.actorId is null
      and ti.isOpen = true

      ]
      at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:59)
      at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:221)
      at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:154)
      at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:101)
      at org.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:473)
      at org.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1032)
      at org.hibernate.impl.SessionImpl.list(SessionImpl.java:982)
      at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
      at org.jbpm.db.TaskMgmtSession.findPooledTaskInstances(TaskMgmtSession.java:118)
      ... 55 more

      Do I have some setup incorrect? (I already got past the security setup)

      Thanks, Jim

        • 1. Re: Webapp and Pooled Actors?
          Tom Baeyens Master

          i'll try to have a look later today

          • 2. Re: Webapp and Pooled Actors?
            Stacey Vetzal Newbie

            I'm getting this as well, my temporary workaround is to determine if there are any pooled actor ids to retrieve tasks for before running the hibernate query:

            diff -r1.13 TaskMgmtSession.java
            115,123c115,126
            < try {
            < Query query = session.getNamedQuery("TaskMgmtSession.findPooledTaskInstancesByActorIds");
            < query.setParameterList("actorIds", actorIds);
            < result = query.list();
            < } catch (Exception e) {
            < log.error(e);
            < jbpmSession.handleException();
            < throw new JbpmException("couldn't get pooled task instances list for actors '"+actorIds+"'", e);
            < }
            ---
            > if (actorIds != null && actorIds.size()>0) {
            > log.info("looking for pooled task instances for actors '"+actorIds+"'");
            > try {
            > Query query = session.getNamedQuery("TaskMgmtSession.findPooledTaskInstancesByActorIds");
            > query.setParameterList("actorIds", actorIds);
            > result = query.list();
            > } catch (Exception e) {
            > log.error(e);
            > jbpmSession.handleException();
            > throw new JbpmException("couldn't get pooled task instances list for actors '"+actorIds+"'", e);
            > }
            > }
            



            • 3. Re: Webapp and Pooled Actors?
              Tom Baeyens Master

              what do i have to do to reproduce this problem ? i didn't see it last night when i clicked a bit through the webapp after fixing some issues...

              • 4. Re: Webapp and Pooled Actors?
                Tom Baeyens Master

                BTW, the workaround looks like a good solution to me

                • 5. Re: Webapp and Pooled Actors?
                  Jim Rigsbee Newbie

                  I have simply tried to sign on to a freshly deployed app using the id ernie and password ernie.

                  I figured out how to setup the roles and user.properties file. Is there some other files (like identity db) that I need to update from the 3.1 release to get it working?

                  • 6. Re: Webapp and Pooled Actors?
                    Tom Baeyens Master

                    i don't get your question completely, jim.

                    have a look at srx/resources/hboss-4.0.x/conf/login-config.xml

                    that file contains the DB query that verifies the web authentication against the jbpm identity db.

                    so you should not have to mess with user.properties files.

                    • 7. Re: Webapp and Pooled Actors?
                      Stacey Vetzal Newbie

                      I was able to reproduce this on my own setup but not when I built and ran a fresh create.jbpm.configuration, so Tom I'm not surprised you haven't seen this.

                      On my own config, where I can reproduce this, I'm using LDAP authentication, and have temporarily hacked the hypersonic database (just renamed the users) to match the usernames in my LDAP store.

                      cough... wheeze... HACK! Onlookers, please disregard the above :)

                      I expect Jim and I have similar issues.

                      I wonder if it is something to do with mismatched identity vs. security. My final goal is to replace identity with the appropriate infrastructure backed in my LDAP store. I went through the docs but am a bit unclear as to where to start.

                      Of course, first I have to improve or rewrite the existing LDAP LoginModule; it assumes all authenticatable users are at the same place in the LDAP hierarchy. This will cause me issues in the field ~sigh~.

                      • 8. Re: Webapp and Pooled Actors?
                        Stacey Vetzal Newbie

                        Wow, what was I whining about, just discovered the LdapExtLoginModule which has everything I need...