'Unable to connect to progress database using spring jpa

I am trying to add progress as a secondary DataSource to my application

Here are the properties of the dataSource:

spring.datasource2.jdbcUrl=jdbc:datadirect:openedge://host:port;databaseName=db;
spring.second-datasource.username=username
spring.second-datasource.password=password
spring.second-datasource.driver-class-name=com.ddtek.jdbc.openedge.OpenEdgeDriver
spring.second-datasource.jpa.hibernate.ddl-auto=create
spring.second-datasource.database-platform=org.hibernate.dialect.SQLServerDialect
spring.jpa.hibernate.naming.physical-strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy
spring.jpa.hibernate.naming.implicit-strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy

this is the datasource config I am using

@Configuration
@EnableTransactionManagement
@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
@EnableJpaRepositories(
        basePackages = "com.demo.myapp.progress.progressRepositories.*",
        entityManagerFactoryRef = "progressEntityManager",
        transactionManagerRef = "progressTransactionManager")
public class ProgressDbConfig {

    @Bean
    @ConfigurationProperties(prefix = "spring.second-database")
    public DataSource progressDataSource() {
        return DataSourceBuilder.create().build();
    }
}

This is the error I was getting

***************************
APPLICATION FAILED TO START
***************************

Description:

Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

Reason: Failed to determine suitable jdbc url


Action:

Consider the following:
    If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
    If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).

Please help me solve this issue



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source