-
Bug
-
Resolution: Fixed
-
Low (View bug fix roadmap)
-
7.1.0
-
7.01
-
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:
- https://confluence.atlassian.com/adminjiraserver070/connecting-jira-applications-to-sql-server-2008-749382647.html
- Connecting JIRA applications to SQL Server 2012
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.
- was cloned as
-
JDEV-36323 Failed to load
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