tomcat 6 / mysql 5 wont connect - jdbc driver loads - tested mysql connection

Zippy Zeppoli June 26, 2012

Hello,
I am trying to get JIRA to connect to mysql / tomcat 6.

I ensured I have the latest version of mysql, tomcat 6, and jdbc driver.

I can connect to the database using the user in my dbconfig.xml

I have verified the jdbc driver is loaded properly (via the catalina.out log)

I have verified that the username / password / host are correct in dbconfig.xml, yet I still receive the following error at the end of the startup sequence (Tomcat never reports it has started properly).

2012-06-27 11:27:31,554 main ERROR [NoModule] Error getting datasource via DBCP: JdbcDatasourceInfo{uri='jdbc:mysql://localhost:3306/jiradb?useUnicode=true&characterEncoding=UTF8&sessionVariables=storage_engine=InnoDB', driverClassName='com.mysql.jdbc.Driver', username='jiradbuser', password='********', isolationLevel='null', connectionProperties=null, connectionPoolInfo=ConnectionPoolInfo{maxSize=8, minSize=2, maxWait=60000, sleepTime=300000, lifeTime=600000, deadLockMaxWait=600000, deadLockRetryWait=10000, validationQuery='select 1', minEvictableTimeMillis=60000, timeBetweenEvictionRunsMillis=300000}}
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:142)
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 com.atlassian.jira.ofbiz.DefaultOfBizConnectionFactory.getConnection(DefaultOfBizConnectionFactory.java:28)
at com.atlassian.jira.util.system.check.JRA24857Check.isSessionUsingMySIAM(JRA24857Check.java:102)
at com.atlassian.jira.util.system.check.JRA24857Check.getWarningMessage(JRA24857Check.java:63)
at com.atlassian.jira.util.system.check.SystemEnvironmentChecklist.getWarnings(SystemEnvironmentChecklist.java:39)
at com.atlassian.jira.util.system.check.SystemEnvironmentChecklist.getWarningMessages(SystemEnvironmentChecklist.java:56)
at com.atlassian.jira.util.system.check.SystemEnvironmentChecklist.getEnglishWarningMessages(SystemEnvironmentChecklist.java:90)
at com.atlassian.jira.upgrade.ConsistencyCheckImpl.checkSystemEnvironment(ConsistencyCheckImpl.java:234)
at com.atlassian.jira.upgrade.ConsistencyCheckImpl.printJIRAStartupMessage(ConsistencyCheckImpl.java:199)
at com.atlassian.jira.upgrade.ConsistencyCheckImpl.initialise(ConsistencyCheckImpl.java:181)
at com.atlassian.jira.startup.DefaultJiraLauncher$3.run(DefaultJiraLauncher.java:102)
at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrEnqueue(DatabaseConfigurationManagerImpl.java:250)
at com.atlassian.jira.config.database.DatabaseConfigurationManagerImpl.doNowOrWhenDatabaseActivated(DatabaseConfigurationManagerImpl.java:149)
at com.atlassian.jira.startup.DefaultJiraLauncher.postDbLaunch(DefaultJiraLauncher.java:94)
at com.atlassian.jira.startup.DefaultJiraLauncher.access$100(DefaultJiraLauncher.java:24)
at com.atlassian.jira.startup.DefaultJiraLauncher$1.run(DefaultJiraLauncher.java:61)
at com.atlassian.jira.util.devspeed.JiraDevSpeedTimer.run(JiraDevSpeedTimer.java:33)
at com.atlassian.jira.startup.DefaultJiraLauncher.start(DefaultJiraLauncher.java:56)
at com.atlassian.jira.startup.LauncherContextListener$1.create(LauncherContextListener.java:67)
at com.atlassian.jira.startup.LauncherContextListener$1.create(LauncherContextListener.java:62)
at com.atlassian.multitenant.impl.MultiTenantComponentMapImpl.get(MultiTenantComponentMapImpl.java:121)
at com.atlassian.multitenant.impl.MultiTenantComponentMapImpl.onTenantStart(MultiTenantComponentMapImpl.java:165)
at com.atlassian.multitenant.impl.DefaultMultiTenantManager$1.consume(DefaultMultiTenantManager.java:134)
at com.atlassian.multitenant.impl.DefaultMultiTenantManager$1.consume(DefaultMultiTenantManager.java:131)
at com.atlassian.multitenant.impl.DefaultMultiTenantManager.runForEachListener(DefaultMultiTenantManager.java:256)
at com.atlassian.multitenant.impl.DefaultMultiTenantManager.startTenant(DefaultMultiTenantManager.java:130)
at com.atlassian.multitenant.impl.DefaultMultiTenantManager.startAll(DefaultMultiTenantManager.java:203)
at com.atlassian.jira.startup.LauncherContextListener.contextInitialized(LauncherContextListener.java:95)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4206)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4705)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:943)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:778)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:504)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: javax.management.InstanceAlreadyExistsException: com.atlassian.jira:name=BasicDataSource
at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:467)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.internal_addObject(DefaultMBeanServerInterceptor.java:1520)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamicMBean(DefaultMBeanServerInterceptor.java:986)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(DefaultMBeanServerInterceptor.java:938)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(DefaultMBeanServerInterceptor.java:330)
at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.java:516)
at org.weakref.jmx.MBeanExporter.export(MBeanExporter.java:39)
... 60 more

What is even stranger is that if I access http://localhost:8080/admin, nothing comes up. I haven't seen this happen where one webapp interferes with the standard admin webapp.

All suggestions are appreciated.

4 answers

2 votes
Ruchi Tandon
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 1, 2012

you might want to look at this : https://confluence.atlassian.com/display/JIRAKB/JIRA+Does+Not+Start

and remove any special characters from your database passwords

0 votes
dmitrymozheyko April 15, 2013

Pretty commercial soft!

Why not check the password during installation?

0 votes
Andrew Frayling
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 1, 2012

Also, which version of Java are you using? Java 7 throws similar errors for DB connections with JIRA so you need to use Java 6.

Andrew.

0 votes
Stéphane Genin
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 27, 2012

Hi ZippyZ,

Do you use the standalone distribution of JIRA, or do you deploy the webapp in an existing tomcat?

If you deploy in an existing tomcat, do you have other webapps running in this tomcat?

Stéphane

Suggest an answer

Log in or Sign up to answer