The component of the database name of the object qualifier must be the name of the current database
Problem
Bamboo fails to startup with the following error:
2017-03-13 12:44:53,068 ERROR [localhost-startStop-1] [AbstractUpgradeManager] java.sql.SQLException: The component of the database name of the object qualifier must be the name of the current database.
java.sql.SQLException: The component of the database name of the object qualifier must be the name of the current database.
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:372)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2988)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2421)
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:677)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:505)
at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:1032)
at net.sourceforge.jtds.jdbc.JtdsDatabaseMetaData.getTables(JtdsDatabaseMetaData.java:1836)
at com.mchange.v2.c3p0.impl.NewProxyDatabaseMetaData.getTables(NewProxyDatabaseMetaData.java:2962)
at com.atlassian.bamboo.utils.db.AbstractDbmsBean.isTablePresent(AbstractDbmsBean.java:230)
at com.atlassian.bamboo.upgrade.tasks.v5_15.UpgradeTask51502UniqueSharedCredentialNames.lambda$doUpgrade$0(UpgradeTask51502UniqueSharedCredentialNames.java:37)
at com.atlassian.bamboo.upgrade.AbstractBootstrapUpgradeTask.withDatabaseConnection(AbstractBootstrapUpgradeTask.java:83)
at com.atlassian.bamboo.upgrade.tasks.v5_15.UpgradeTask51502UniqueSharedCredentialNames.doUpgrade(UpgradeTask51502UniqueSharedCredentialNames.java:35)
at com.atlassian.bamboo.upgrade.AbstractUpgradeManager.runUpgradeTask(AbstractUpgradeManager.java:210)
at com.atlassian.bamboo.upgrade.BootstrapUpgradeManagerImpl.doUpgrade(BootstrapUpgradeManagerImpl.java:62)
at com.atlassian.bamboo.setup.DefaultBootstrapManager.performPersistenceUpgrade(DefaultBootstrapManager.java:343)
at com.atlassian.config.bootstrap.DefaultAtlassianBootstrapManager.init(DefaultAtlassianBootstrapManager.java:77)
at com.atlassian.bamboo.setup.BootstrapLoaderListener.contextInitialized(BootstrapLoaderListener.java:118)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4842)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Diagnosis
Environment
- Microsoft SQL Server
Cause
The database name set in bamboo.cfg.xml does not match the name of the Microsoft SQL database (case sensitive).
Resolution
Get the name of the database by running this SQL query:
SELECT name, database_id, create_date FROM sys.databases;
Compare it with the database name configured in bamboo.cfg.xml:
jdbc:jtds:sqlserver://<host>:<port>/<database name>
- Update the database name so that it matches the name of the database from the SQL query (case sensitive)
- Restart Bamboo
Last modified on Mar 14, 2017
Powered by Confluence and Scroll Viewport.