0 Replies Latest reply on Sep 19, 2012 7:33 AM by aglynn

    Spring Database Error

    aglynn

      Since we tested the failover feature we have been getting a JDBC error in the SimpleJobScheduler where it appears that it is not picking up the database configuration and attempting to connect to a local postgresql instance rather than a remote SQL Server instance.

       

      The log shows the following error:

       

      INFO database.DefaultConnectionProvider - Unable to get a connection from the database pool

      java.sql.SQLException: Unable to retrieve connection from DriverManager

        at com.jivesoftware.base.database.ConnectionPool.createCon(ConnectionPool.java:245)

        at com.jivesoftware.base.database.ConnectionPool.getConnection(ConnectionPool.java:185)

        at com.jivesoftware.base.database.DefaultConnectionProvider.getConnection(DefaultConnectionProvider.java:131)

        at com.jivesoftware.base.database.dao.JiveDataSource.getConnection(JiveDataSource.java:34)

        at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:113)

        at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:79)

        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:577)

        at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:641)

        at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:670)

        at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:678)

        at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:710)

        at org.springframework.jdbc.core.simple.SimpleJdbcTemplate.query(SimpleJdbcTemplate.java:187)

        at com.jivesoftware.base.database.dao.JiveJdbcOperationsTemplate.query(JiveJdbcOperationsTemplate.java:94)

        at com.jivesoftware.util.task.impl.JobSchedulerDAO.getJobs(JobSchedulerDAO.java:74)

        at com.jivesoftware.util.task.impl.SimpleJobScheduler.loadJobs(SimpleJobScheduler.java:154)

        at com.jivesoftware.util.task.impl.SimpleJobScheduler.runJobs(SimpleJobScheduler.java:131)

        at com.jivesoftware.util.task.impl.SimpleJobScheduler.access$300(SimpleJobScheduler.java:32)

        at com.jivesoftware.util.task.impl.SimpleJobScheduler$Watcher.run(SimpleJobScheduler.java:383)

      07 Sep 2012 20:28:02,939 [Thread-12] [:] ERROR impl.SimpleJobScheduler - Critical error encountered in SimpleJobScheduler:

      java.lang.NullPointerException

        at org.springframework.jdbc.core.JdbcTemplate$SimplePreparedStatementCreator.createPreparedStatement(JdbcTemplate.java:1322)

        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:585)

        at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:641)

        at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:670)

        at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:678)

        at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:710)

        at org.springframework.jdbc.core.simple.SimpleJdbcTemplate.query(SimpleJdbcTemplate.java:187)

        at com.jivesoftware.base.database.dao.JiveJdbcOperationsTemplate.query(JiveJdbcOperationsTemplate.java:94)

        at com.jivesoftware.util.task.impl.JobSchedulerDAO.getJobs(JobSchedulerDAO.java:74)

        at com.jivesoftware.util.task.impl.SimpleJobScheduler.loadJobs(SimpleJobScheduler.java:154)

        at com.jivesoftware.util.task.impl.SimpleJobScheduler.runJobs(SimpleJobScheduler.java:131)

        at com.jivesoftware.util.task.impl.SimpleJobScheduler.access$300(SimpleJobScheduler.java:32)

        at com.jivesoftware.util.task.impl.SimpleJobScheduler$Watcher.run(SimpleJobScheduler.java:383)

       

      The config files and user environment variables appear to be correct.  Does anyone have any ideas as to the possible problem?

       

      thanks

      Andrew G.