Using Apollo in Compose for Desktop client and run...
# apollo-kotlin
j
Using Apollo in Compose for Desktop client and running in to this....thought I had all needed dependencies setup but must be missing something. Anyone know what's typically the cause of this?
Copy code
Exception in thread "AWT-EventQueue-0" java.sql.SQLException: No suitable driver found for xyz-cache.db
	at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:706)
	at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:190)
	at app.cash.sqldelight.driver.jdbc.sqlite.ThreadedConnectionManager.getConnection(JdbcSqliteDriver.kt:122)
	at app.cash.sqldelight.driver.jdbc.sqlite.JdbcSqliteDriver.getConnection(JdbcSqliteDriver.kt)
	at app.cash.sqldelight.driver.jdbc.JdbcDriver.connectionAndClose(JdbcDriver.kt:119)
	at app.cash.sqldelight.driver.jdbc.JdbcDriver.executeQuery(JdbcDriver.kt:151)
	at app.cash.sqldelight.db.SqlDriver$DefaultImpls.executeQuery$default(SqlDriver.kt:40)
	at com.apollographql.apollo.cache.normalized.sql.internal.FactoryImplementationsKt.maybeCreateOrMigrateSchema(factoryImplementations.kt:31)
	at com.apollographql.apollo.cache.normalized.sql.internal.FactoryHelpersKt.createRecordDatabase(factoryHelpers.kt:12)
This is being done in Confetti for example and am comparing to that but no obvious differences so far
Ah, I had forgotten the
jdbc:
prefix in the actual for
SqlNormalizedCacheFactory
!
Copy code
val sqlNormalizedCacheFactory = SqlNormalizedCacheFactory("jdbc:sqlite:$APOLLO_CACHE_DB")
b
Woops! Good catch
j
So often the answer seems to appear just after asking the question 😃
rubber duck 2