Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-59768

Jira 7.1.0 does not start due to a java.lang.AbstractMethodError when connected to MS-SQL

      Summary

      JIRA 7.1.0 will not start when connected to a Microsoft SQL server if validation query is not specified in dbconfig.xml.

      Environment

      • JIRA 7.1.0
      • Microsoft SQL Server

      Steps to Reproduce

      • Connect JIRA 7.1.0 to a SQL Server instance without setting the the validation query in dbconfig.xml.

      Expected Results

      JIRA should start normally

      Actual Results

      • JIRA does not start.
      • The following error is thrown in the atlassian-jira.log:
        2016-02-11 15:07:40,437 JIRA-Bootstrap INFO      [c.a.jira.startup.JiraStartupLogger] JIRA pre-database startup checks completed successfully.
        2016-02-11 15:07:41,296 JIRA-Bootstrap ERROR      [c.a.jira.startup.LauncherContextListener] Unable to start JIRA.
        com.google.common.util.concurrent.ExecutionError: java.lang.AbstractMethodError
                at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2201)
                at com.google.common.cache.LocalCache.get(LocalCache.java:3937)
                at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)
                at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
                at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4830)
                at org.ofbiz.core.entity.GenericDelegator.getGenericDelegator(GenericDelegator.java:107)
                at com.atlassian.core.ofbiz.CoreFactory.getGenericDelegator(CoreFactory.java:34)
                at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.configureOfbiz(DatabaseConfigurationManagerImpl.java:215)
                at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrEnqueue(DatabaseConfigurationManagerImpl.java:295)
                at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrWhenDatabaseConfigured(DatabaseConfigurationManagerImpl.java:199)
                at com.atlassian.jira.startup.DefaultJiraLauncher.postDbLaunch(DefaultJiraLauncher.java:132)
                at com.atlassian.jira.startup.DefaultJiraLauncher.lambda$start$803(DefaultJiraLauncher.java:103)
                at com.atlassian.jira.startup.DefaultJiraLauncher$$Lambda$4/1623714453.run(Unknown Source)
                at com.atlassian.jira.util.devspeed.JiraDevSpeedTimer.run(JiraDevSpeedTimer.java:31)
                at com.atlassian.jira.startup.DefaultJiraLauncher.start(DefaultJiraLauncher.java:101)
                at com.atlassian.jira.startup.LauncherContextListener.initSlowStuff(LauncherContextListener.java:115)
                at com.atlassian.jira.startup.LauncherContextListener$$Lambda$2/1122675373.run(Unknown Source)
                at java.lang.Thread.run(Thread.java:745)
        Caused by: java.lang.AbstractMethodError
                at net.sourceforge.jtds.jdbc.JtdsConnection.isValid(JtdsConnection.java:2833)
                at org.apache.commons.dbcp2.DelegatingConnection.isValid(DelegatingConnection.java:914)
                at org.apache.commons.dbcp2.PoolableConnection.validate(PoolableConnection.java:283)
                at org.apache.commons.dbcp2.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:357)
                at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2304)
                at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2038)
                at org.apache.commons.dbcp2.BasicDataSource.setLogWriter(BasicDataSource.java:1625)
                at org.ofbiz.core.entity.transaction.DBCPConnectionFactory.getConnection(DBCPConnectionFactory.java:100)
                at org.ofbiz.core.entity.ConnectionFactory.tryGenericConnectionSources(ConnectionFactory.java:69)
                at org.ofbiz.core.entity.transaction.JNDIFactory.getConnection(JNDIFactory.java:146)
                at org.ofbiz.core.entity.TransactionFactory.getConnection(TransactionFactory.java:136)
                at org.ofbiz.core.entity.ConnectionFactory.getConnection(ConnectionFactory.java:59)
                at org.ofbiz.core.entity.ConnectionFactory$1.getConnection(ConnectionFactory.java:52)
                at org.ofbiz.core.entity.jdbc.DatabaseUtil.getConnection(DatabaseUtil.java:133)
                at org.ofbiz.core.entity.jdbc.DatabaseUtil.getTableNames(DatabaseUtil.java:904)
                at org.ofbiz.core.entity.jdbc.DatabaseUtil.checkDb(DatabaseUtil.java:167)
                at org.ofbiz.core.entity.jdbc.DatabaseUtil.checkDb(DatabaseUtil.java:145)
                at org.ofbiz.core.entity.GenericDAO.checkDb(GenericDAO.java:1475)
                at org.ofbiz.core.entity.GenericHelperDAO.checkDataSource(GenericHelperDAO.java:270)
                at org.ofbiz.core.entity.GenericDelegator.initialiseAndCheckDatabase(GenericDelegator.java:238)
                at org.ofbiz.core.entity.GenericDelegator.<init>(GenericDelegator.java:169)
                at org.ofbiz.core.entity.GenericDelegator$1.load(GenericDelegator.java:93)
                at org.ofbiz.core.entity.GenericDelegator$1.load(GenericDelegator.java:90)
                at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
                at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)
                at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)
                at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197)
                ... 17 more
        

      Workaround

      Add the validation query to dbconfig.xml and restart JIRA. An example dbconfig.xml is below - this will need to have the username, password, scheme and url changed for your instance:

      <jira-database-config>
      <name>defaultDS</name>
      <delegator-name>default</delegator-name>
      <database-type>mssql</database-type>
      <schema-name>jiraschema</schema-name>
      <jdbc-datasource>
        <url>jdbc:jtds:sqlserver://dbserver:1433/jiradb</url>
        <driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class>
        <username>jiradbuser</username>
        <password>password</password>
        <pool-min-size>20</pool-min-size>
        <pool-max-size>20</pool-max-size>
        <pool-max-wait>30000</pool-max-wait>
        <pool-max-idle>20</pool-max-idle>
        <pool-remove-abandoned>true</pool-remove-abandoned>
        <pool-remove-abandoned-timeout>300</pool-remove-abandoned-timeout>
       
        <validation-query>select 1</validation-query>
        <min-evictable-idle-time-millis>60000</min-evictable-idle-time-millis>
        <time-between-eviction-runs-millis>300000</time-between-eviction-runs-millis>
      
        <pool-test-while-idle>true</pool-test-while-idle>
        <pool-test-on-borrow>false</pool-test-on-borrow>
      </jdbc-datasource>
      </jira-database-config>
      

      You can refer to the documentation on connecting JIRA to SQL Server for sample dbconfig.xml file:

      Notes

      This appears to be caused by the jTDS driver as detailed in http://stackoverflow.com/questions/26404283/java-hibernate-with-sql-server-2012-not-working.

            [JRASERVER-59768] Jira 7.1.0 does not start due to a java.lang.AbstractMethodError when connected to MS-SQL

            mwright3,
            I believe that you're referring to the Jira iCalendar Plugin com.atlassian.jira.extra.jira-ical-feed which is kinda embarrassing that Atlassian is already up to 7.1.9 and this plugin of theirs is still not-compatible with Jira 7.1

            Pinchus Gelbman added a comment - mwright3 , I believe that you're referring to the Jira iCalendar Plugin com.atlassian.jira.extra.jira-ical-feed which is kinda embarrassing that Atlassian is already up to 7.1.9 and this plugin of theirs is still not-compatible with Jira 7.1

            mwright added a comment -

            With a little more research, It was a plugin (jira calendar) that was causing java to fail.

            mwright added a comment - With a little more research, It was a plugin (jira calendar) that was causing java to fail.

            Hi matt.wilson,

            It is not recommended to remove validation query. It is a part of database configuration and should stay in dbconfig.xml. The fix was about making sure:

            • validation query will be present in all new configurations, however it does not change existing configurations automatically
            • if the validation query is not present, JIRA will start however will generate warnings that this is not recommended and validation query should be present in dbconfig.xml

            I hope this makes things more clear.

            Regards,
            Michal Orzechowski
            JIRA Developer

            Michal Orzechowski (Inactive) added a comment - Hi matt.wilson , It is not recommended to remove validation query. It is a part of database configuration and should stay in dbconfig.xml. The fix was about making sure: validation query will be present in all new configurations, however it does not change existing configurations automatically if the validation query is not present, JIRA will start however will generate warnings that this is not recommended and validation query should be present in dbconfig.xml I hope this makes things more clear. Regards, Michal Orzechowski JIRA Developer

            Hi matt.wilson,

            It is not necessary to remove it if you don't want to.

            Regards,

            Oswaldo Hernández.
            JIRA Bugmaster.
            [Atlassian].

            Oswaldo Hernandez (Inactive) added a comment - Hi matt.wilson , It is not necessary to remove it if you don't want to. Regards, Oswaldo Hernández. JIRA Bugmaster. [Atlassian] .

            This ticket says this was fixed in 7.1.1. Does that mean that I should remove the validation setting from my dbconfig file after installing 7.1.1 or newer?

            Matt Wilson added a comment - This ticket says this was fixed in 7.1.1. Does that mean that I should remove the validation setting from my dbconfig file after installing 7.1.1 or newer?

            Hi mwright3,

            Please do raise a support ticket with us at http://support.atlassian.com if you need assistance with your upgrade so we can help you out. We are happy to assist

            Regards,

            Oswaldo Hernández.
            JIRA Bugmaster.
            [Atlassian].

            Oswaldo Hernandez (Inactive) added a comment - Hi mwright3 , Please do raise a support ticket with us at http://support.atlassian.com if you need assistance with your upgrade so we can help you out. We are happy to assist Regards, Oswaldo Hernández. JIRA Bugmaster. [Atlassian] .

            mwright added a comment -

            I have this same issue upgrading from 6.4 to 7.1. I backed up the database and snapshot the environment... which I restored both. Still need to upgrade and my try again soon.

            mwright added a comment - I have this same issue upgrading from 6.4 to 7.1. I backed up the database and snapshot the environment... which I restored both. Still need to upgrade and my try again soon.

            Hi egbert,

            This is not the right place, this site (jira.atlassian.com) is our public bug tracker, we do not handle support requests here.

            Consequently, could you please raise a support request with us at https://support.atlassian.com ? One of our engineers will take your case and help you with this query there.

            Regards,

            Oswaldo Hernández.
            JIRA Bugmaster.
            [Atlassian].

            Oswaldo Hernandez (Inactive) added a comment - Hi egbert , This is not the right place, this site (jira.atlassian.com) is our public bug tracker, we do not handle support requests here. Consequently, could you please raise a support request with us at https://support.atlassian.com ? One of our engineers will take your case and help you with this query there. Regards, Oswaldo Hernández. JIRA Bugmaster. [Atlassian] .

            Hi There

            Not sure this is the right tread but I have my clients use confluence and i dont want them to have access to JIRA. However I would like to share the JIRA reports in confluence with them. So far it says the permissions are denied because they do not belong to JIRA. How can i create a permission set that allows them to view the JIRA reports on COnfluence?

            Egbert Frankenberg added a comment - Hi There Not sure this is the right tread but I have my clients use confluence and i dont want them to have access to JIRA. However I would like to share the JIRA reports in confluence with them. So far it says the permissions are denied because they do not belong to JIRA. How can i create a permission set that allows them to view the JIRA reports on COnfluence?

            Hi!

            I'm attempting rollback to 7.0.10 for now and will upgrade again when the bug is addressed.

            The rollback seems to have worked, so I'll stick with this version until there is a fix for the other one.

            Regarding the collation I see this in the health check

            "Result

            The database collation 'Latin1_General_CI_AI' and table collation 'Latin1_General_CI_AI' are supported by JIRA."

            We did follow the guidelines for this and thought that since Jira is no longer complaining then we did it right (we had Swedish_Finnish_CI_AI) before but moved to a database with the current collation.

            Regards

            Oskar

            Oskar Hanberg added a comment - Hi! I'm attempting rollback to 7.0.10 for now and will upgrade again when the bug is addressed. The rollback seems to have worked, so I'll stick with this version until there is a fix for the other one. Regarding the collation I see this in the health check "Result The database collation 'Latin1_General_CI_AI' and table collation 'Latin1_General_CI_AI' are supported by JIRA." We did follow the guidelines for this and thought that since Jira is no longer complaining then we did it right (we had Swedish_Finnish_CI_AI) before but moved to a database with the current collation. Regards Oskar

              ohernandez@atlassian.com Oswaldo Hernandez (Inactive)
              psouza Pedro Souza
              Affected customers:
              39 This affects my team
              Watchers:
              55 Start watching this issue

                Created:
                Updated:
                Resolved: