org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'r2dbcDatabaseClient' defined in class path resource [io/snynx/namegengrpcserver/configuration/R2DBCConfig.class]: Failed to instantiate [org.springframework.r2dbc.core.DatabaseClient]: Factory method 'databaseClient' threw exception with message: Cannot determine a dialect for IBM-DB2 using com.ibm.db2.r2dbc.DB2ConnectionFactory@2ba1bc43; Please provide a Dialect
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.r2dbc.core.DatabaseClient]: Factory method 'databaseClient' threw exception with message: Cannot determine a dialect for IBM-DB2 using com.ibm.db2.r2dbc.DB2ConnectionFactory@2ba1bc43; Please provide a Dialect
Caused by: org.springframework.data.r2dbc.dialect.DialectResolver$NoDialectException: Cannot determine a dialect for IBM-DB2 using com.ibm.db2.r2dbc.DB2ConnectionFactory@2ba1bc43; Please provide a Dialect
Expected result of this would be a started connection, instead it fails to instantiate a bean for the factory.
Code in use is the following:
@Configuration
@EnableR2dbcRepositories
@Slf4j
public class R2DBCConfig extends AbstractR2dbcConfiguration {
@Override
@Bean
@NonNull
public ConnectionFactory connectionFactory() {
final String database = "namer";
final String host = "db2server";
final int port = 50000;
final String username = "db2inst1";
final String password = "";
DB2ConnectionConfiguration conf = DB2ConnectionConfiguration.builder()
.database(database)
.host(host)
.port(port)
.username(username)
.password(password)
.build();
return new DB2ConnectionFactory(conf);
}
}
Expected result of this would be a started connection, instead it fails to instantiate a bean for the factory.
Code in use is the following: