Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-550

JbpmSessionFactory does not work without hibernate.properties

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • jBPM 3.1.0
    • jBPM 3.1.0
    • Runtime Engine
    • None

      In JbpmSessionFactory there is the following code:

      // check if the properties in the hibernate.cfg.xml need to be overwritten by a separate properties file.
      String hibernatePropertiesResource = JbpmConfiguration.Configs.getString("resource.hibernate.properties");
      if (hibernatePropertiesResource!=null) {
      ...

      This is supposed to skip the hibernate.properties part if resource.hibernate.properties it is not defined in jbpm.cfg.xml. However, Configs.getString() does not return null if a property is undefined, but throws an exception. So there's no way to use JbpmSessionFactory without hibernate.properties file.

      This is a minor issue, but makes an upgrade more difficult for people who use this class, and it should be pretty easy to fix.

            tom.baeyens Tom Baeyens (Inactive)
            JakaJaksic Jaka Jaksic (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: