1 Reply Latest reply on Feb 26, 2009 1:18 PM by Brad Davis

    jbpmContext.getGraphSession() returns null

    Naeem Jamil Newbie

      Can any one help me in this regard?
      My java code is given below.
      JbpmContext jbpmContext = JbpmConfiguration.getInstance().createJbpmContext();

      GraphSession gs = jbpmContext.getGraphSession();

      System shows gs is null. Please if any one know why it returns gs null? please send me any suggestions on this?

        • 1. Re: jbpmContext.getGraphSession() returns null
          Brad Davis Novice

          I am not sure about your configuration, but the internals of getGraphSession as as follows:

           public GraphSession getGraphSession()
           {
           PersistenceService persistenceService = getPersistenceService();
           return (persistenceService != null ? persistenceService.getGraphSession() : null);
           }
          


          I would imagine your root cause is because getPersistenceService is returning null.

          Check to make sure you have something like the following in your jbpm configuration file.

          <service name="persistence" factory="org.jbpm.persistence.jta.JtaDbPersistenceServiceFactory" />