Skip to content

Commit 71a352f

Browse files
committed
Fix error when creating session in Astra example
This commit can be reverted once JAVA-2813 is implemented.
1 parent 2783888 commit 71a352f

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

examples/src/main/java/com/datastax/oss/driver/examples/astra/AstraReadCassandraVersion.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
package com.datastax.oss.driver.examples.astra;
1717

1818
import com.datastax.oss.driver.api.core.CqlSession;
19+
import com.datastax.oss.driver.api.core.config.DriverConfigLoader;
1920
import com.datastax.oss.driver.api.core.cql.ResultSet;
2021
import com.datastax.oss.driver.api.core.cql.Row;
2122
import java.nio.file.Paths;
@@ -56,6 +57,7 @@ public static void main(String[] args) {
5657
.withCloudSecureConnectBundle(Paths.get("/path/to/secure-connect-database_name.zip"))
5758
// Change the user_name and password here for the Astra instance
5859
.withAuthCredentials("user_name", "fakePasswordForTests")
60+
.withConfigLoader(DriverConfigLoader.fromClasspath("application-astra"))
5961
// Uncomment the next line to use a specific keyspace
6062
// .withKeyspace("keyspace_name")
6163
.build()) {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
datastax-java-driver { }

0 commit comments

Comments
 (0)