Activiti: I need to modify the source code of activiti-engine5.22.0. After modifying the source code, Maven: package (skiptests), the project cannot be started

Created on 27 Nov 2019  路  2Comments  路  Source: Activiti/Activiti

Activiti engine can't support DM database. I need to modify ProcessEngineConfigurationImpl.java to add databaseTypeMappings.setProperty ("DM DBMS", database_type_oracle); but Maven: package unit test can't pass. I add < skiptests > true < / skiptests > in pom.xml. After successful packaging, I start it in the project and report an error:

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'deploymentResource': Unsatisfied dependency expressed through field 'repositoryService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'repositoryServiceBean' defined in class path resource [org/activiti/spring/boot/DataSourceProcessEngineAutoConfiguration$DataSourceProcessEngineConfiguration.class]: Unsatisfied dependency expressed through method 'repositoryServiceBean' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'processEngine' defined in class path resource [org/activiti/spring/boot/DataSourceProcessEngineAutoConfiguration$DataSourceProcessEngineConfiguration.class]: Unsatisfied dependency expressed through method 'processEngine' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springProcessEngineConfiguration' defined in class path resource [org/activiti/spring/boot/DataSourceProcessEngineAutoConfiguration$DataSourceProcessEngineConfiguration.class]: Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl] from ClassLoader [sun.misc.Launcher$AppClassLoader@18b4aac2]

Most helpful comment

If you're a springboot 2.0, just
```
@Configuration
public class ActivitiEngineConfig extends AbstractProcessEngineAutoConfiguration {

@Resource
DataSource dataSource;

@Resource
SpringAsyncExecutor springAsyncExecutor;

@Resource
PlatformTransactionManager transactionManager;
@Bean
public SpringProcessEngineConfiguration springProcessEngineConfiguration() throws IOException {
    SpringProcessEngineConfiguration configuration =
            this.baseSpringProcessEngineConfiguration(dataSource, transactionManager, springAsyncExecutor);
    configuration.setDatabaseType("oracle");
    return configuration;
}

}

All 2 comments

I have the same question. databaseTypeMappings.setProperty("DM DBMS", DATABASE_TYPE_ORACLE);
also meet another error

If you're a springboot 2.0, just
```
@Configuration
public class ActivitiEngineConfig extends AbstractProcessEngineAutoConfiguration {

@Resource
DataSource dataSource;

@Resource
SpringAsyncExecutor springAsyncExecutor;

@Resource
PlatformTransactionManager transactionManager;
@Bean
public SpringProcessEngineConfiguration springProcessEngineConfiguration() throws IOException {
    SpringProcessEngineConfiguration configuration =
            this.baseSpringProcessEngineConfiguration(dataSource, transactionManager, springAsyncExecutor);
    configuration.setDatabaseType("oracle");
    return configuration;
}

}

Was this page helpful?
0 / 5 - 0 ratings