Clojurians
#immutant
<
2016-05-09
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

edvorg06:05:46

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:'
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?

edvorg07:05:12

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?

tcrawley11:05:33

@edvorg: you can register a shutdown hook with http://immutant.org/documentation/current/apidoc/immutant.util.html#var-at-exit - see if that helps

edvorg11:05:51

Ok, thank you @tcrawley

tcrawley11:05:16

my pleasure!