Hello. We have a project that is using immutant war facilities. We deploy it under wildfly and just stepped into strange problem on production.
We use component and postgresql. After redeploy in wildfly (using rm *.deployed
, touch *.dodeploy
) we have following exception when trying to use postgesql
le_results.clj: 98
12:30:41,471 INFO [stdout] (pool-14-thread-4) ...
12:30:41,471 INFO [stdout] (pool-14-thread-4) clojure.java.jdbc/query jdbc.clj: 832
12:30:41,471 INFO [stdout] (pool-14-thread-4) clojure.java.jdbc/db-query-with-resultset jdbc.clj: 798
12:30:41,471 INFO [stdout] (pool-14-thread-4) clojure.java.jdbc/get-connection jdbc.clj: 278
12:30:41,471 INFO [stdout] (pool-14-thread-4) org.apache.commons.dbcp.BasicDataSource.getConnection BasicDataSource.java: 1044
12:30:41,471 INFO [stdout] (pool-14-thread-4) org.apache.commons.dbcp.BasicDataSource.createDataSource BasicDataSource.java: 1371
12:30:41,471 INFO [stdout] (pool-14-thread-4) org.apache.commons.dbcp.BasicDataSource.createConnectionFactory BasicDataSource.java: 1437
12:30:41,471 INFO [stdout] (pool-14-thread-4) java.sql.DriverManager.getDriver DriverManager.java: 315
12:30:41,471 INFO [stdout] (pool-14-thread-4) java.sql.SQLException: No suitable driver
12:30:41,471 INFO [stdout] (pool-14-thread-4) SQLState: "08001"
12:30:41,471 INFO [stdout] (pool-14-thread-4) errorCode: 0
12:30:41,471 INFO [stdout] (pool-14-thread-4) org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class 'org.postgresql.
Driver' for connect URL 'jdbc:<postgresql://localhost/project?user=postgres&password=postgres>'
12:30:41,471 INFO [stdout] (pool-14-thread-4) errorCode: 0
12:30:41,471 INFO [stdout] (pool-14-thread-4)
12
Did anybody meet similar problem?The issue is probably related to the fact that our app doesn't get shutdown gracefully. We even don't have a chance to stop our component system. Maybe there is some hook that we could use to do our app shutdown?
@edvorg: you can register a shutdown hook with http://immutant.org/documentation/current/apidoc/immutant.util.html#var-at-exit - see if that helps
Ok, thank you @tcrawley
my pleasure!