Fisheye restore not able to find postgresql or mysql JDBC driver

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Medium
    • None
    • Affects Version/s: 3.1.3
    • Component/s: None
    • None

      When restoring an OnDemand fisheye backup into a Fisheye 3.1.3 installation on a new server, fisheyectl.sh is not able to find the postgresql driver.
      The administration interface can successfully test a connection to the database.

      Followed these steps:

      1. Obtain a backup of Fisheye/Crucible from OnDemand, unzip and change filepaths to point to my svn directory.
      2. Create a postgresql database.
        postgres@svn:/var/fisheye$ psql
        psql (9.1.9)
        Type "help" for help.
        
        postgres=# create user fisheye password 'fisheye';
        CREATE ROLE
        postgres=# create database fisheye encoding 'UTF-8' OWNER fisheye;
        CREATE DATABASE
        postgres=# grant all on database fisheye to fisheye;
        GRANT
        postgres=#
        
      3. Import the OnDemand backup using the following command line
        fisheye@svn:~/fecru-3.1.3/bin$ ./fisheyectl.sh restore --file /home/fisheye/FeCru-backup-20130916.zip --dbtype postgresql --jdbcurl jdbc://postgresql://localhost:5432/fisheye --username fisheye --password fisheye --sql --force
        
      4. Observe the restore is unable to find the driver.
        fisheye@svn:~/fecru-3.1.3/bin$ ./fisheyectl.sh restore --file /home/fisheye/FeCru-backup-20130916.zip --dbtype postgresql --jdbcurl jdbc://postgresql://localhost:5432/fisheye --username fisheye --password fisheye --sql --force
        INFO  - Using log4j configuration file: /home/fisheye/fecru-3.1.3/log4j-client.xml
        INFO  - FishEye arguments: [--file, /home/fisheye/FeCru-backup-20130916.zip, --dbtype, postgresql, --jdbcurl, jdbc://postgresql://localhost/fisheye, --username, fisheye, --password, fisheye, --sql, --force, --driver-source, user]
        Starting Spring Context...
        WARN  - Couldn't save config file - not a file.
        INFO  - Refreshing com.cenqua.fisheye.ctl.Restore$RestoreApplicationContext@7f636e4e: startup date [Thu Sep 26 10:57:29 CST 2013]; root of context hierarchy
        INFO  - Starting plugin system...
        INFO  - Plugin system started.
        Spring Context started
        ERROR - Unable to connect to PostgreSQL database jdbc://postgresql://localhost/fisheye: java.sql.SQLException: No suitable driver found for jdbc://postgresql://localhost/fisheye
        Cannot open target database at: jdbc://postgresql://localhost/fisheye (Unable to connect to PostgreSQL database jdbc://postgresql://localhost/fisheye: java.sql.SQLException: No suitable driver found for jdbc://postgresql://localhost/fisheye)
        INFO  - Closing com.cenqua.fisheye.ctl.Restore$RestoreApplicationContext@7f636e4e: startup date [Thu Sep 26 10:57:29 CST 2013]; root of context hierarchy
        INFO  - *** application context closed ***
        fisheye@svn:~/fecru-3.1.3/bin$
        

      I have also tried specifying the JDBC class directly with "--driver org.postgresql.Driver", and the --driver-source as "bundled" or "user". I have copied the JDBC postgresql driver into my FISHEYE_INST/lib directory.

      fisheye@svn:/var/fisheye/lib$ ll
      total 1308
      drwxrwxr-x  2 fisheye fisheye   4096 Sep 26 10:43 ./
      drwxr-xr-x 12 fisheye fisheye   4096 Sep 26 10:51 ../
      -rw-r--r--  1 fisheye fisheye 855948 Sep 23 12:16 mysql-connector-java-5.1.26-bin.jar
      -rw-r--r--  1 fisheye fisheye 472831 Sep 26 10:43 postgresql-8.4-701.jdbc3.jar
      

      I get the same error when I try with a mysql database.

            Assignee:
            Unassigned
            Reporter:
            Tina Harron
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: