Fork me on GitHub
#luminus
<
2017-03-28
>
pc12304:03:26

so I generated a Luminus app using +war and +mysql; I was able to get it to connect to the database correctly locally. However, when I deploy it up to Elastic Beanstalk as the uberwar, I get the following issue where the correct JDBC driver can't be resolved:

Caused by: java.lang.RuntimeException: Failed to get driver instance for jdbcUrl=jdbc:mysql://<my-db-url>
  at com.zaxxer.hikari.util.DriverDataSource.<init>(DriverDataSource.java:88)
  at com.zaxxer.hikari.pool.PoolBase.initializeDataSource(PoolBase.java:318)
  at com.zaxxer.hikari.pool.PoolBase.<init>(PoolBase.java:108)
  at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:99)
  at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:71)
  at conman.core$connect_BANG_.invokeStatic(core.clj:71)
  at conman.core$connect_BANG_.invoke(core.clj:67)
  at my_app.db.core$fn__4512.invokeStatic(core.clj:19)
  at my_app.db.core$fn__4512.invoke(core.clj:18)
  at mount.core$record_BANG_.invokeStatic(core.cljc:86)
  at mount.core$record_BANG_.invoke(core.cljc:85)
  at mount.core$up$fn__411.invoke(core.cljc:93)
I read somewhere that I might need to include the JDBC driver manually in the classpath - not quite sure how to do this, though. any ideas? thanks in advance!

yogthos13:03:18

@pc123 typically the app server should provide the jdbc driver, but you could also add it as a dependency

yogthos13:03:43

I'm not too familiar with elastic beanstalk environment myself though

jumar14:03:42

@pc123 I would check if jdbc driver's jar is packaged in final war file. If not, you can try to add the desired dependency to project.clj