Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-53993

Unable to create/edit page after a fresh installation of Confluence with MS SQL Server. Synchrony could not load driverClass net.sourceforge.jtds.jdbc.Driver

    XMLWordPrintable

Details

    Description

      STEPS TO REPLICATE

      1. Install Confluence version 6.4.2 (using atlassian-confluence-6.4.2.tar.gz for this test)
      2. During the database setup, Driver Class Name is automatically set to use com.microsoft.sqlserver.jdbc.SQLServerDriver as per screenshot below:
      3. Enter the database URL and credential.
      4. Complete the installation.

      EXPECTED BEHAVIOUR
      User able to create a page after the installation.

      ACTUAL BEHAVIOUR
      Stack trace below appear in Confluence <HOME_directory>/logs/atlassian-synchrony.log:

      2017-10-20 21:40:11,815 DEBUG [197:StdOutHandler [/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/jre/bin/java]] Could not load driverClass net.sourceforge.jtds.jdbc.Driver
      2017-10-20 21:40:11,815 DEBUG [197:StdOutHandler [/Library/Java/JavaVirtualMachines/jdk1.8.0_102.jdk/Contents/Home/jre/bin/java]] java.lang.ClassNotFoundException: net.sourceforge.jtds.jdbc.Driver
      

      User unable to create/edit page:

      WORKAROUND
      update the jtds url to a correctly formatted Microsoft SQL Server driver url as per their documentation (https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url) :

      1. Stop Confluence
      2. Navigate to Confluence <HOME_directory>/confluence.cfg.xml file and replace the line below:
        <property name="hibernate.connection.url">jdbc:jtds:sqlserver://localhost:1433/confluence</property>
        

        with:

        <property name="hibernate.connection.url">jdbc:sqlserver://localhost:1433;databaseName=confluence</property>
        
      1. Start Confluence

      Attachments

        1. databasesetup.png
          databasesetup.png
          149 kB
        2. erroredit.png
          erroredit.png
          21 kB
        3. mssql-jdbc.PNG
          mssql-jdbc.PNG
          24 kB

        Issue Links

          Activity

            People

              alyakovlev Alex Yakovlev (Inactive)
              dazmi Dayana
              Votes:
              3 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: