Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-1068

ProcessEngineConfiguration with mybatis session fails after upgrade to alpha8

XMLWordPrintable

    • Icon: Bug Report Bug Report
    • Resolution: Won't Fix
    • Icon: L3 - Default L3 - Default
    • 7.0.0-alpha9, 7.0.0
    • None
    • engine
    • None

      This is my code:

      public class MyBatisExtendedSessionFactory extends StandaloneProcessEngineConfiguration {

      private String resourceName;
      private static boolean initalized = false;

      @Override
      protected void init()

      { throw new IllegalArgumentException( "Normal 'init' on process engine only used for extended MyBatis mappings is not allowed."); }

      public void initFromProcessEngineConfiguration(final ProcessEngineConfigurationImpl processEngineConfiguration,
      final String resourceName) {
      this.resourceName = resourceName;
      if (!initalized)

      { setDataSource(processEngineConfiguration.getDataSource()); initDataSource(); initVariableTypes(); initCommandContextFactory(); initTransactionFactory(); initTransactionContextFactory(); initCommandExecutors(); initSqlSessionFactory(); initSessionFactories(); }

      }

      @Override
      protected InputStream getMyBatisXmlConfigurationSteam()

      { return ReflectUtil.getResourceAsStream(resourceName); }

      }

      When I run it, I get the following exception.

      java.lang.NullPointerException
      at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.initSessionFactories(ProcessEngineConfigurationImpl.java:718)
      at de.dlh.lht.base.bpm.fox.custom.MyBatisExtendedSessionFactory.initFromProcessEngineConfiguration(MyBatisExtendedSessionFactory.java:36)
      at de.dlh.lht.base.bpm.fox.custom.MyBatisQueryCommandExecutor.<init>(MyBatisQueryCommandExecutor.java:17)
      at de.dlh.lht.base.bpm.fox.custom.CustomTaskServiceImpl.getActiveTasks(CustomTaskServiceImpl.java:43)
      at de.dlh.lht.base.bpm.fox.custom.ProcessActiveUserTasksTest.shouldClaimProcessWithDifferentUsers(ProcessActiveUserTasksTest.java:175)
      ...

      I remember that Bernd said something about ProcessEngineConf changed, and he did a fix on the 6.2 cockpit, but I dont get it ....

        This is the controller panel for Smart Panels app

              meyer Daniel Meyer
              jan.galinski@holisticon.de Jan Galinski
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: