0

We are connecting our microservices to aws keyspace(Cassandra) through dbaas.

Getting error
cloud.dbaas.client.exceptions.CreateDbException: MicroserviceRestClientResponseException{message=404 Not Found: "No physical database known of type cassandra

Even getting same error from dbaas pods logs. I already configured below parameters

spring.data.cassandra.ssl
spring.data.cassandra.contact-points
spring.data.cassandra.local-datacenter
spring.data.cassandra.port
spring.data.cassandra.password
spring.data.cassandra.username

1 Answers1

1

You will want to reference the external configuration. See the following Amazon Keyspaces spring example.

https://github.com/aws-samples/amazon-keyspaces-spring-app-example/

@Configuration
public class AppConfig {
    private final String username = System.getenv("AWS_MCS_SPRING_APP_USERNAME");
    private final String password = System.getenv("AWS_MCS_SPRING_APP_PASSWORD");
    File driverConfig = new File(System.getProperty("user.dir")+"/application.conf");

    @Primary
    public @Bean
    CqlSession session() throws NoSuchAlgorithmException {
        return CqlSession.builder().
                withConfigLoader(DriverConfigLoader.fromFile(driverConfig)).
                withAuthCredentials(username, password).
                withSslContext(SSLContext.getDefault()).
                withKeyspace("keyspace_name").
                build();
    }
}
MikeJPR
  • 764
  • 3
  • 14