AnsweredAssumed Answered

Error with StandaloneProcessEngineConfiguration while migration 5.11 -> 5.13

Question asked by mokematt on Oct 10, 2013
Latest reply on Oct 11, 2013 by mokematt
I have implemented a bit customization to activiti for a better benefit in my use case.
My ProcessEngine is starting as follows:


public final class CustomProcessEngine {
..
   private CustomProcessEngine(){
      try {
         //Config laden
         Config config = new Config();
         config.load("/data/pucco/etc", "activiti", "cfg", "sec");
                        …         

         this.processEngine=new CustomProcessEngineConfiguration()
               .setDatabaseType(config.gets(this.getClass(), "databaseType"))
               .setDatabaseSchemaUpdate(config.gets(this.getClass(), "databaseShemaUpdate"))
               .setJdbcDriver(config.gets(this.getClass(), "jdbcDriver"))
               .setJdbcUrl(config.gets(this.getClass(), "jdbcUrl"))
               .setJdbcUsername(config.gets(this.getClass(), "jdbcUsername"))
               .setJdbcPassword(config.gets(this.getClass(), "jdbcPassword"))
               .setJobExecutorActivate(Boolean.getBoolean(config.gets(this.getClass(), "jobExecutorActivate")))
               .setHistory(config.gets(this.getClass(), "history")).buildProcessEngine();
      } catch (FileNotFoundException e) {
         logger.log(LogLevel.ERR, e.getMessage());
         throw new ActivitiException("Config file not found!!");
      } catch (IOException e) {
         logger.log(LogLevel.ERR, e.getMessage());
         throw new ActivitiException("Config file corrupt!!");
      }
   }

   public synchronized static CustomProcessEngine getInstance() {
      if (instance == null) {
         instance = new CustomProcessEngine();
      }
      return instance;
   }
   
   public ProcessEngine getProcessEngine(){
      return this.processEngine;
   }
}



public class CustomProcessEngineConfiguration extends StandaloneProcessEngineConfiguration {
   
   private Config config;
   
   @Override
   public ProcessEngine buildProcessEngine() {
      configure();
      init();
      Map<Class< ? >, SessionFactory> sessionFactories = this.getSessionFactories();
      sessionFactories.put(GroupEntityManager.class, new LDAPGroupManagerFactory(this.config));
      sessionFactories.put(UserEntityManager.class, new LDAPUserManagerFactory(this.config));
      this.setSessionFactories(sessionFactories);
      this.setFailedJobCommandFactory(new CustomFailedJobCommandFactory());
      return new ProcessEngineImpl(this);
     }
   
   private void configure(){
      this.config = new Config();
      try {
         this.config.load("/data/pucco/etc", "ldap", "cfg", "sec");
      } catch (FileNotFoundException e) {
         throw new ActivitiException("Config file not found!!");
      } catch (IOException e) {
         throw new ActivitiException("Config file corrupt!!");
      }
   }



//Starting the process engine
processEngine = CustomProcessEngine.getInstance().getProcessEngine();


It runs very fine with activiti 5.11. I want to migrate my code to version 5.13 and made some changes:
UserManager = UserEntityManager
GroupManager = GroupEntityManager

But i got an error:

java.lang.NoSuchMethodError: pucco.activiti.custom.CustomProcessEngineConfiguration.setDatabaseType(Ljava/lang/String;)Lorg/activiti/engine/impl/cfg/ProcessEngineConfigurationImpl;
        at pucco.activiti.custom.CustomProcessEngine.<init>(CustomProcessEngine.java:46)
        at pucco.activiti.custom.CustomProcessEngine.getInstance(CustomProcessEngine.java:68)



Why do i get this error?

Outcomes