2 Replies Latest reply on Oct 11, 2006 3:58 AM by rpochet

    Error in GraphSession.findProcessDefinition()

    Nidhi Sobti Newbie

      Hello,

      I get the following exception, while invoking the following code to find a process definition :

      context = jbpmConfiguration.createJbpmContext();
      GraphSession graphSession = context.getGraphSession();
      processDefinition = graphSession.findProcessDefinition("TestWorkflow", 1);


      Exception:

      Caused by: java.lang.NullPointerException
       at org.hibernate.tuple.AbstractEntityTuplizer.createProxy(AbstractEntityTuplizer.java:372)
       at org.hibernate.persister.entity.AbstractEntityPersister.createProxy(AbstractEntityPersister.java:3121)
       at org.hibernate.event.def.DefaultLoadEventListener.createProxyIfNecessary(DefaultLoadEventListener.java:232)
       at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:173)
       at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87)
       at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:869)
       at org.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:838)
       at org.hibernate.type.EntityType.resolveIdentifier(EntityType.java:266)
       at org.hibernate.type.EntityType.resolve(EntityType.java:303)
       at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:113)
       at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:842)
       at org.hibernate.loader.Loader.doQuery(Loader.java:717)
       at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
       at org.hibernate.loader.Loader.doList(Loader.java:2150)
       at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
       at org.hibernate.loader.Loader.list(Loader.java:2024)
       at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:369)
       at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:300)
       at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:146)
       at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1093)
       at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
       at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:745)
       at org.jbpm.db.GraphSession.findProcessDefinition(GraphSession.java:120)


      However, it looks like it is executing the correct query, and indeed getting back with a process instance.

      Any ideas on what is happening?

      Thanks.