org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'jiradbuser'@'localhost' (using password: YES))

Vinutha Vasan May 13, 2014

Hi All,

I am getting database access denied error while connecting t the mysql database for JIRA 6.1.1.

I have created a new database called jiradb611 and granted a permission to the user 'jiradbuser'.

But getting the bellow error, any idea?

2014-05-14 11:31:11,484 localhost-startStop-1 ERROR [NoModule] Error getting datasource via DBCP: JdbcDatasourceInfo{uri='jdbc:mysql://localhost/jiradb611?useUnicode=true&characterEncoding=utf8&sessionVariables=storage_engine=InnoDB', driverClassName='com.mysql.jdbc.Driver', username='jiradbuser', password='********', isolationLevel='null', connectionProperties=null, connectionPoolInfo=ConnectionPoolInfo{maxSize=15, minSize=2, initialSize=null, maxIdle=15, maxWait=60000, sleepTime=300000, lifeTime=600000, deadLockMaxWait=600000, deadLockRetryWait=10000, validationQuery='select 1', minEvictableTimeMillis=null, timeBetweenEvictionRunsMillis=null, poolPreparedStatements=null, testOnBorrow=null, testOnReturn=null, testWhileIdle=null, maxOpenPreparedStatements=null, numTestsPerEvictionRun=null, removeAbandonedTimeout=null, validationQueryTimeout=null, defaultCatalog=null}}
org.apache.commons.dbcp.c
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549)
at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
at org.apache.commons.dbcp.BasicDataSource.setLogWriter(BasicDataSource.java:1134)
at org.ofbiz.core.entity.transaction.DBCPConnectionFactory.getConnection(DBCPConnectionFactory.java:109)
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:101)
at org.ofbiz.core.entity.ConnectionFactory.getConnection(ConnectionFactory.java:59)
at com.atlassian.jira.ofbiz.DefaultOfBizConnectionFactory.getConnection(DefaultOfBizConnectionFactory.java:48)
at com.atlassian.jira.upgrade.util.UpgradeUtils.tableExists(UpgradeUtils.java:102)
at com.atlassian.jira.appconsistency.db.MinimumUpgradableVersionCheck.databaseSetup(MinimumUpgradableVersionCheck.java:49)
at com.atlassian.jira.appconsistency.db.MinimumUpgradableVersionCheck.isOk(MinimumUpgradableVersionCheck.java:30)
at com.atlassian.jira.startup.JiraDatabaseConfigChecklist.doStartupChecks(JiraDatabaseConfigChecklist.java:64)
at com.atlassian.jira.startup.JiraDatabaseConfigChecklist.startupOK(JiraDatabaseConfigChecklist.java:52)
at com.atlassian.jira.startup.DatabaseChecklistLauncher.start(DatabaseChecklistLauncher.java:39)
at com.atlassian.jira.startup.DefaultJiraLauncher$2.run(DefaultJiraLauncher.java:110)
at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrEnqueue(DatabaseConfigurationManagerImpl.java:315)
at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrWhenDatabaseConfigured(DatabaseConfigurationManagerImpl.java:215)
at com.atlassian.jira.startup.DefaultJiraLauncher.postDbLaunch(DefaultJiraLauncher.java:105)
at com.atlassian.jira.startup.DefaultJiraLauncher.access$100(DefaultJiraLauncher.java:30)
at com.atlassian.jira.startup.DefaultJiraLauncher$1.run(DefaultJiraLauncher.java:77)
at com.atlassian.jira.util.devspeed.JiraDevSpeedTimer.run(JiraDevSpeedTimer.java:34)
at com.atlassian.jira.startup.DefaultJiraLauncher.start(DefaultJiraLauncher.java:72)
at com.atlassian.jira.startup.LauncherContextListener.contextInitialized(LauncherContextListener.java:54) <+5> (StandardContext.java:4791) (StandardContext.java:5285) (LifecycleBase.java:150) (ContainerBase.java:1559) (ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.sql.SQLException: Access denied for user 'jiradbuser'@'localhost' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1084)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4232)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4164)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:926)
at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1748)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2506)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2539)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2321)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:832)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46) <+3> (NativeConstructorAccessorImpl.java:57) (DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:417)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:344)
at org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
at org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
at org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
... 32 more
2014-05-14 11:31:11,516 localhost-startStop-1 ERROR [atlassian.jira.startup.LauncherContextListener] Unable to start JIRA.
com.atlassian.jira.exception.DataAccessException: java.sql.SQLException: Access denied for user 'jiradbuser'@'localhost' (using password: YES)
at com.atlassian.jira.upgrade.util.UpgradeUtils.tableExists(UpgradeUtils.java:129)
at com.atlassian.jira.appconsistency.db.MinimumUpgradableVersionCheck.databaseSetup(MinimumUpgradableVersionCheck.java:49)
at com.atlassian.jira.appconsistency.db.MinimumUpgradableVersionCheck.isOk(MinimumUpgradableVersionCheck.java:30)
at com.atlassian.jira.startup.JiraDatabaseConfigChecklist.doStartupChecks(JiraDatabaseConfigChecklist.java:64)
at com.atlassian.jira.startup.JiraDatabaseConfigChecklist.startupOK(JiraDatabaseConfigChecklist.java:52)
at com.atlassian.jira.startup.DatabaseChecklistLauncher.start(DatabaseChecklistLauncher.java:39)
at com.atlassian.jira.startup.DefaultJiraLauncher$2.run(DefaultJiraLauncher.java:110)
at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrEnqueue(DatabaseConfigurationManagerImpl.java:315)
at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrWhenDatabaseConfigured(DatabaseConfigurationManagerImpl.java:215)
at com.atlassian.jira.startup.DefaultJiraLauncher.postDbLaunch(DefaultJiraLauncher.java:105)
at com.atlassian.jira.startup.DefaultJiraLauncher.access$100(DefaultJiraLauncher.java:30)
at com.atlassian.jira.startup.DefaultJiraLauncher$1.run(DefaultJiraLauncher.java:77)
at com.atlassian.jira.util.devspeed.JiraDevSpeedTimer.run(JiraDevSpeedTimer.java:34)
at com.atlassian.jira.startup.DefaultJiraLauncher.start(DefaultJiraLauncher.java:72)
at com.atlassian.jira.startup.LauncherContextListener.contextInitialized(LauncherContextListener.java:54) <+5> (StandardContext.java:4791) (StandardContext.java:5285) (LifecycleBase.java:150) (ContainerBase.java:1559) (ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.sql.SQLException: Access denied for user 'jiradbuser'@'localhost' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1084)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4232)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4164)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:926)
at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1748)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2506)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2539)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2321)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:832)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46) <+3> (NativeConstructorAccessorImpl.java:57) (DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:417)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:344)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at org.ofbiz.core.entity.ConnectionFactory.tryGenericConnectionSources(ConnectionFactory.java:87)
at org.ofbiz.core.entity.transaction.JNDIFactory.getConnection(JNDIFactory.java:146)
at org.ofbiz.core.entity.TransactionFactory.getConnection(TransactionFactory.java:101)
at org.ofbiz.core.entity.ConnectionFactory.getConnection(ConnectionFactory.java:59)
at com.atlassian.jira.ofbiz.DefaultOfBizConnectionFactory.getConnection(DefaultOfBizConnectionFactory.java:48)
at com.atlassian.jira.upgrade.util.UpgradeUtils.tableExists(UpgradeUtils.java:102)
... 23 more
2014-05-14 11:31:12,203 localhost-startStop-1 ERROR [NoModule] Error getting datasource via DBCP: JdbcDatasourceInfo{uri='jdbc:mysql://localhost/jiradb611?useUnicode=true&characterEncoding=utf8&sessionVariables=storage_engine=InnoDB', driverClassName='com.mysql.jdbc.Driver', username='jiradbuser', password='********', isolationLevel='null', connectionProperties=null, connectionPoolInfo=ConnectionPoolInfo{maxSize=15, minSize=2, initialSize=null, maxIdle=15, maxWait=60000, sleepTime=300000, lifeTime=600000, deadLockMaxWait=600000, deadLockRetryWait=10000, validationQuery='select 1', minEvictableTimeMillis=null, timeBetweenEvictionRunsMillis=null, poolPreparedStatements=null, testOnBorrow=null, testOnReturn=null, testWhileIdle=null, maxOpenPreparedStatements=null, numTestsPerEvictionRun=null, removeAbandonedTimeout=null, validationQueryTimeout=null, defaultCatalog=null}}
java.lang.RuntimeException: javax.management.InstanceAlreadyExistsException: com.atlassian.jira:name=BasicDataSource
at org.weakref.jmx.MBeanExporter.export(MBeanExporter.java:45)
at org.apache.commons.dbcp.ManagedBasicDataSource.exportMBean(ManagedBasicDataSource.java:70)
at org.apache.commons.dbcp.ManagedBasicDataSource.<init>(ManagedBasicDataSource.java:61)
at org.apache.commons.dbcp.ManagedBasicDataSourceFactory.createDataSource(ManagedBasicDataSourceFactory.java:278)
at org.ofbiz.core.entity.transaction.DBCPConnectionFactory.createDataSource(DBCPConnectionFactory.java:190)
at org.ofbiz.core.entity.transaction.DBCPConnectionFactory.getConnection(DBCPConnectionFactory.java:91)
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:101)
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:128)
at org.ofbiz.core.entity.jdbc.DatabaseUtil.getTableNames(DatabaseUtil.java:899)
at org.ofbiz.core.entity.jdbc.DatabaseUtil.checkDb(DatabaseUtil.java:162)
at org.ofbiz.core.entity.jdbc.DatabaseUtil.checkDb(DatabaseUtil.java:140)
at org.ofbiz.core.entity.GenericDAO.checkDb(GenericDAO.java:1430)
at org.ofbiz.core.entity.GenericHelperDAO.checkDataSource(GenericHelperDAO.java:251)
at org.ofbiz.core.entity.GenericDelegator.<init>(GenericDelegator.java:184)
at org.ofbiz.core.entity.GenericDelegator.getGenericDelegator(GenericDelegator.java:116)
at com.opensymphony.module.propertyset.ofbiz.OFBizPropertySet.getDelegator(OFBizPropertySet.java:293)
at com.opensymphony.module.propertyset.ofbiz.OFBizPropertySet.getKeys(OFBizPropertySet.java:82)
at com.atlassian.jira.propertyset.PropertySetCache.bulkLoad(PropertySetCache.java:318)
at com.atlassian.jira.propertyset.JiraCachingPropertySet$12.run(JiraCachingPropertySet.java:785)
at com.atlassian.jira.propertyset.JiraCachingPropertySet.doLocked(JiraCachingPropertySet.java:846)
at com.atlassian.jira.propertyset.JiraCachingPropertySet.init(JiraCachingPropertySet.java:770)
at com.opensymphony.module.propertyset.PropertySetManager.getInstance(PropertySetManager.java:58)
at com.opensymphony.module.propertyset.PropertySetManager.getInstance(PropertySetManager.java:31)
at com.atlassian.jira.config.properties.PropertySetUtils.createDatabaseBackedPropertySet(PropertySetUtils.java:34)
at com.atlassian.jira.config.properties.DbBackedPropertiesManager$1.create(DbBackedPropertiesManager.java:26)
at com.atlassian.jira.config.properties.DbBackedPropertiesManager$1.create(DbBackedPropertiesManager.java:22)
at com.atlassian.util.concurrent.ResettableLazyReference$InternalReference.create(ResettableLazyReference.java:140)
at com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:321)
at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:143)
at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)
at com.atlassian.util.concurrent.ResettableLazyReference.get(ResettableLazyReference.java:87)
at com.atlassian.jira.config.properties.PropertiesManager.getPropertySet(PropertiesManager.java:27)
at com.atlassian.jira.config.properties.ApplicationPropertiesStore.getStringFromDb(ApplicationPropertiesStore.java:268)
at com.atlassian.jira.config.properties.ApplicationPropertiesStore.getString(ApplicationPropertiesStore.java:346)
at com.atlassian.jira.config.properties.ApplicationPropertiesImpl.getDefaultBackedString(ApplicationPropertiesImpl.java:60)
at com.atlassian.jira.security.auth.trustedapps.UserNameTransformer$ApplicationPropertiesClassNameRetriever.get(UserNameTransformer.java:68)
at com.atlassian.jira.security.auth.trustedapps.UserNameTransformer$Factory.get(UserNameTransformer.java:99)
at com.atlassian.jira.security.auth.trustedapps.TrustedApplicationFilter$OSUserResolver.<init>(TrustedApplicationFilter.java:40)
at com.atlassian.jira.security.auth.trustedapps.TrustedApplicationFilter.<init>(TrustedApplicationFilter.java:25) <+3> (NativeConstructorAccessorImpl.java:57) (DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:374) <+9> (DefaultInstanceManager.java:134) (ApplicationFilterConfig.java:256) (ApplicationFilterConfig.java:382) (ApplicationFilterConfig.java:103) (StandardContext.java:4650) (StandardContext.java:5306) (LifecycleBase.java:150) (ContainerBase.java:1559) (ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.management.InstanceAlreadyExistsException: com.atlassian.jira:name=BasicDataSource
at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:437)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1898)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:966)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:900)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324)
at org.weakref.jmx.MBeanExporter.export(MBeanExporter.java:39)
... 60 more
2014-05-14 11:31:12,219 localhost-startStop-1 ERROR [core.entity.jdbc.DatabaseUtil] Unable to establish a connection with the database... Error was:java.sql.SQLException: Access denied for user 'jiradbuser'@'localhost' (using password: YES)
2014-05-14 11:31:12,219 localhost-startStop-1 ERROR [core.entity.jdbc.DatabaseUtil] Could not get table name information from the database, aborting.
2014-05-14 11:31:12,250 localhost-startStop-1 ERROR [NoModule] Error getting datasource via DBCP: JdbcDatasourceInfo{uri='jdbc:mysql://localhost/jiradb611?useUnicode=true&characterEncoding=utf8&sessionVariables=storage_engine=InnoDB', driverClassName='com.mysql.jdbc.Driver', username='jiradbuser', password='********', isolationLevel='null', connectionProperties=null, connectionPoolInfo=ConnectionPoolInfo{maxSize=15, minSize=2, initialSize=null, maxIdle=15, maxWait=60000, sleepTime=300000, lifeTime=600000, deadLockMaxWait=600000, deadLockRetryWait=10000, validationQuery='select 1', minEvictableTimeMillis=null, timeBetweenEvictionRunsMillis=null, poolPreparedStatements=null, testOnBorrow=null, testOnReturn=null, testWhileIdle=null, maxOpenPreparedStatements=null, numTestsPerEvictionRun=null, removeAbandonedTimeout=null, validationQueryTimeout=null, defaultCatalog=null}}
java.lang.RuntimeException: javax.management.InstanceAlreadyExistsException: com.atlassian.jira:name=BasicDataSource
at org.weakref.jmx.MBeanExporter.export(MBeanExporter.java:45)
at org.apache.commons.dbcp.ManagedBasicDataSource.exportMBean(ManagedBasicDataSource.java:70)
at org.apache.commons.dbcp.ManagedBasicDataSource.<init>(ManagedBasicDataSource.java:61)
at org.apache.commons.dbcp.ManagedBasicDataSourceFactory.createDataSource(ManagedBasicDataSourceFactory.java:278)
at org.ofbiz.core.entity.transaction.DBCPConnectionFactory.createDataSource(DBCPConnectionFactory.java:190)
at org.ofbiz.core.entity.transaction.DBCPConnectionFactory.getConnection(DBCPConnectionFactory.java:91)
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:101)
at org.ofbiz.core.entity.ConnectionFactory.getConnection(ConnectionFactory.java:59)
at org.ofbiz.core.entity.config.DatasourceInfo.getDatabaseTypeFromJDBCConnection(DatasourceInfo.java:402)
at org.ofbiz.core.entity.GenericDAO.selectListIteratorByCondition(GenericDAO.java:962)
at org.ofbiz.core.entity.GenericDAO.selectByAnd(GenericDAO.java:630)
at org.ofbiz.core.entity.GenericHelperDAO.findByAnd(GenericHelperDAO.java:131)
at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:804)
at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:789)
at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:766)
at com.opensymphony.module.propertyset.ofbiz.OFBizPropertySet.getKeys(OFBizPropertySet.java:82)
at com.atlassian.jira.propertyset.PropertySetCache.bulkLoad(PropertySetCache.java:318)
at com.atlassian.jira.propertyset.JiraCachingPropertySet$12.run(JiraCachingPropertySet.java:785)
at com.atlassian.jira.propertyset.JiraCachingPropertySet.doLocked(JiraCachingPropertySet.java:846)
at com.atlassian.jira.propertyset.JiraCachingPropertySet.init(JiraCachingPropertySet.java:770)
at com.opensymphony.module.propertyset.PropertySetManager.getInstance(PropertySetManager.java:58)
at com.opensymphony.module.propertyset.PropertySetManager.getInstance(PropertySetManager.java:31)
at com.atlassian.jira.config.properties.PropertySetUtils.createDatabaseBackedPropertySet(PropertySetUtils.java:34)
at com.atlassian.jira.config.properties.DbBackedPropertiesManager$1.create(DbBackedPropertiesManager.java:26)
at com.atlassian.jira.config.properties.DbBackedPropertiesManager$1.create(DbBackedPropertiesManager.java:22)
at com.atlassian.util.concurrent.ResettableLazyReference$InternalReference.create(ResettableLazyReference.java:140)
at com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:321)
at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:143)
at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)
at com.atlassian.util.concurrent.ResettableLazyReference.get(ResettableLazyReference.java:87)
at com.atlassian.jira.config.properties.PropertiesManager.getPropertySet(PropertiesManager.java:27)
at com.atlassian.jira.config.properties.ApplicationPropertiesStore.getStringFromDb(ApplicationPropertiesStore.java:268)
at com.atlassian.jira.config.properties.ApplicationPropertiesStore.getString(ApplicationPropertiesStore.java:346)
at com.atlassian.jira.config.properties.ApplicationPropertiesImpl.getDefaultBackedString(ApplicationPropertiesImpl.java:60)
at com.atlassian.jira.security.auth.trustedapps.UserNameTransformer$ApplicationPropertiesClassNameRetriever.get(UserNameTransformer.java:68)
at com.atlassian.jira.security.auth.trustedapps.UserNameTransformer$Factory.get(UserNameTransformer.java:99)
at com.atlassian.jira.security.auth.trustedapps.TrustedApplicationFilter$OSUserResolver.<init>(TrustedApplicationFilter.java:40)
at com.atlassian.jira.security.auth.trustedapps.TrustedApplicationFilter.<init>(TrustedApplicationFilter.java:25) <+3> (NativeConstructorAccessorImpl.java:57) (DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:374) <+9> (DefaultInstanceManager.java:134) (ApplicationFilterConfig.java:256) (ApplicationFilterConfig.java:382) (ApplicationFilterConfig.java:103) (StandardContext.java:4650) (StandardContext.java:5306) (LifecycleBase.java:150) (ContainerBase.java:1559) (ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.management.InstanceAlreadyExistsException: com.atlassian.jira:name=BasicDataSource
at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:437)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRepository(DefaultMBeanServerInterceptor.java:1898)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:966)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:900)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:324)
at org.weakref.jmx.MBeanExporter.export(MBeanExporter.java:39)
... 57 more
2014-05-14 11:31:12,266 localhost-startStop-1 ERROR [NoModule] Could not determine database type.
java.sql.SQLException: Access denied for user 'jiradbuser'@'localhost' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1084)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4232)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4164)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:926)
at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1748)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1288)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2506)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2539)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2321)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:832)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46) <+3> (NativeConstructorAccessorImpl.java:57) (DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:417)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:344)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at org.ofbiz.core.entity.ConnectionFactory.tryGenericConnectionSources(ConnectionFactory.java:87)
at org.ofbiz.core.entity.transaction.JNDIFactory.getConnection(JNDIFactory.java:146)
at org.ofbiz.core.entity.TransactionFactory.getConnection(TransactionFactory.java:101)
at org.ofbiz.core.entity.ConnectionFactory.getConnection(ConnectionFactory.java:59)
at org.ofbiz.core.entity.config.DatasourceInfo.getDatabaseTypeFromJDBCConnection(DatasourceInfo.java:402)
at org.ofbiz.core.entity.GenericDAO.selectListIteratorByCondition(GenericDAO.java:962)
at org.ofbiz.core.entity.GenericDAO.selectByAnd(GenericDAO.java:630)
at org.ofbiz.core.entity.GenericHelperDAO.findByAnd(GenericHelperDAO.java:131)
at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:804)
at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:789)
at org.ofbiz.core.entity.GenericDelegator.findByAnd(GenericDelegator.java:766)
at com.opensymphony.module.propertyset.ofbiz.OFBizPropertySet.getKeys(OFBizPropertySet.java:82)
at com.atlassian.jira.propertyset.PropertySetCache.bulkLoad(PropertySetCache.java:318)
at com.atlassian.jira.propertyset.JiraCachingPropertySet$12.run(JiraCachingPropertySet.java:785)
at com.atlassian.jira.propertyset.JiraCachingPropertySet.doLocked(JiraCachingPropertySet.java:846)
at com.atlassian.jira.propertyset.JiraCachingPropertySet.init(JiraCachingPropertySet.java:770)
at com.opensymphony.module.propertyset.PropertySetManager.getInstance(PropertySetManager.java:58)
at com.opensymphony.module.propertyset.PropertySetManager.getInstance(PropertySetManager.java:31)
at com.atlassian.jira.config.properties.PropertySetUtils.createDatabaseBackedPropertySet(PropertySetUtils.java:34)
at com.atlassian.jira.config.properties.DbBackedPropertiesManager$1.create(DbBackedPropertiesManager.java:26)
at com.atlassian.jira.config.properties.DbBackedPropertiesManager$1.create(DbBackedPropertiesManager.java:22)
at com.atlassian.util.concurrent.ResettableLazyReference$InternalReference.create(ResettableLazyReference.java:140)
at com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:321)
at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:143)
at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112)
at com.atlassian.util.concurrent.ResettableLazyReference.get(ResettableLazyReference.java:87)
at com.atlassian.jira.config.properties.PropertiesManager.getPropertySet(PropertiesManager.java:27)
at com.atlassian.jira.config.properties.ApplicationPropertiesStore.getStringFromDb(ApplicationPropertiesStore.java:268)
at com.atlassian.jira.config.properties.ApplicationPropertiesStore.getString(ApplicationPropertiesStore.java:346)
at com.atlassian.jira.config.properties.ApplicationPropertiesImpl.getDefaultBackedString(ApplicationPropertiesImpl.java:60)
at com.atlassian.jira.security.auth.trustedapps.UserNameTransformer$ApplicationPropertiesClassNameRetriever.get(UserNameTransformer.java:68)
at com.atlassian.jira.security.auth.trustedapps.UserNameTransformer$Factory.get(UserNameTransformer.java:99)
at com.atlassian.jira.security.auth.trustedapps.TrustedApplicationFilter$OSUserResolver.<init>(TrustedApplicationFilter.java:40)
at com.atlassian.jira.security.auth.trustedapps.TrustedApplicationFilter.<init>(TrustedApplicationFilter.java:25) <+3> (NativeConstructorAccessorImpl.java:57) (DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at java.lang.Class.newInstance(Class.java:374) <+9> (DefaultInstanceManager.java:134) (ApplicationFilterConfig.java:256) (ApplicationFilterConfig.java:382) (ApplicationFilterConfig.java:103) (StandardContext.java:4650) (StandardContext.java:5306) (LifecycleBase.java:150) (ContainerBase.java:1559) (ContainerBase.java:1549)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)

5 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Vinutha Vasan May 13, 2014

Please find the instruction i followed to create the database,
CREATE DATABASE jiradb611 CHARACTER SET utf8 COLLATE utf8_bin
GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER,INDEX on jiradb611.* TO 'jiradbuser'@'localhost' IDENTIFIED BY 'jiradbuser';
flush privileges;

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 13, 2014

That's a simple error - you've either given Jira the wrong credentials for the database, or you haven't granted the account the right permissions.

From your SQL in your comments, you've given jiradbuser@localhost the right permissions and set everything else up correctly.

But your dbconfig file is then trying to use completely the wrong data. You've got the name of the database wrong in the database connection string. You've invented a new user with a random password which you have granted a few permissions, but not "use" and you've not put the password in for them.

I'd suggest correcting the name of the database and forgetting the second user - stick with jiradbuser

Vinutha Vasan May 13, 2014

Hi Nic,

I have pasted the wrong dbconfig file here, as i was trying with the different users.

Please find the correct edited file and still i am facing the problem.

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 13, 2014

Hmm. I can't tell what bits you've corrected (or not)

On the assumption that you JUST amended the dbconfig.xml from a couple of comments ago, then it's all consistent now, and we need to move on to the next step.

Simple test to tell us where to look next - log into the machine and run

mysql -u jiradbuser -p jiradb611

That will ask for the password of course, but when you enter it, what do you get? If you can get in, then try creating (and dropping) a temporary table in the database to check the grants are ok. If you do not get in, then your settings are still wrong, but it should give you a more useful error message than Jira does internally.

0 votes
Vinutha Vasan May 13, 2014

Here is my "dbconfig.xml" file,

<?xml version="1.0" encoding="UTF-8"?>

<jira-database-config>
<name>defaultDS</name>
<delegator-name>default</delegator-name>
<database-type>mysql</database-type>
<jdbc-datasource>
<url>jdbc:mysql://localhost:3306/jiradb611?useUnicode=true&amp;characterEncoding=utf8&amp;sessionVariables=storage_engine=InnoDB</url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<username>jiradbuser</username>
<password>jiradbuser</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>
<validation-query-timeout>3</validation-query-timeout>
</jdbc-datasource>
</jira-database-config>

0 votes
Vinutha Vasan May 13, 2014

Also find the permission in database;

mysql> show grants for jiradbuser@localhost;
+-------------------------------------------------------------------------------
------------------------------------+
| Grants for jiradbuser@localhost
|
+-------------------------------------------------------------------------------
------------------------------------+
| GRANT USAGE ON *.* TO 'jiradbuser'@'localhost' IDENTIFIED BY PASSWORD '*043D6A
BF3B17BFB080BA1F70CE39370E41D89AD1' |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON `jiradb611
`.* TO 'jiradbuser'@'localhost' |
+-------------------------------------------------------------------------------
------------------------------------+
2 rows in set (0.00 sec)

0 votes
Vinutha Vasan May 13, 2014

Here is my "dbconfig.xml" file,

<?xml version="1.0" encoding="UTF-8"?>

<jira-database-config>
<name>defaultDS</name>
<delegator-name>default</delegator-name>
<database-type>mysql</database-type>
<jdbc-datasource>
<url>jdbc:mysql://localhost:3306/jira611db?useUnicode=true&amp;characterEncoding=utf8&amp;sessionVariables=storage_engine=InnoDB</url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<username>jirauser611</username>
<password>user611</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>
<validation-query-timeout>3</validation-query-timeout>
</jdbc-datasource>
</jira-database-config>

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events