Confluence tables already exist in the selected database on first installation

fnkr February 14, 2014

Hello,

today I tried to install Confluence on a Debian Linux Server with MySQL. I enter the MySQL username/password/database, click next and then (after ~30 seconds) I get this:

  • Confluence tables already exist in the selected database

The database was definitely empty before. After there are 59 tables in the database.

I tried this multiple times now.

2 answers

0 votes
fnkr February 14, 2014

I downloaded the Confluence 5.4.2 standalone tar.gz archive, unpacked it, modified the conf/server.xml as needed, downloaded the mysql-driver into the lib folder, and set confluence.home in the WEB-INF/classes/confluence-init.properties file. Then I created a database (CREATE DATABASE confluence CHARACTER SET utf8 COLLATE utf8_bin;) and a user (GRANT ALL PRIVILEGES ON confluence.* TO 'confluence'@'localhost' IDENTIFIED BY 'pass';).

After that I started Confluence (bin/start-confluence.sh -fg) and tried to install Confluence using the web installer.

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.
February 14, 2014

Confluence creates the tables it needs - before you try again, drop EVERY table in the target database to make sure it is definitely empty.

Then, read the log file to find out where it is failing, if it does fail again. (If it helps, I've seen this happen when I've accidentally run two confluences at the same time - one of them falls over quickly and it took me ages to realise it had started up and then broken the other one)

fnkr February 14, 2014

Sure I emptied the database after every try.

Here is the log-file from the data-dir: https://fs.fnkr.net/Ery6fGCi

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.
February 14, 2014

Hmm, there's a lot missing from that, it should be echoing out system information. It looks like there is something very wrong in the environment or config for Confluence, but I'm not sure what.

Could you tell us what version you're installing and how (I can see it's 5.2, but which installer and what docs are you following, if any)

fnkr February 14, 2014

I downloaded the Confluence 5.4.2 standalone tar.gz archive, unpacked it, modified the conf/server.xml as needed, downloaded the mysql-driver into the lib folder, and set confluence.home in the WEB-INF/classes/confluence-init.properties file. Then I created a database (CREATE DATABASE confluence CHARACTER SET utf8 COLLATE utf8_bin;) and a user (GRANT ALL PRIVILEGES ON confluence.* TO 'confluence'@'localhost' IDENTIFIED BY 'pass';).

After that I started Confluence (bin/start-confluence.sh -fg) and tried to install Confluence using the web installer.

Kyosuke Nakajima March 6, 2015

I got the exact same problem with Confluence 5.7. I've also tried with mysql5.1, 5.5 and postgres9.3 but got the same error. Anybody have any clues??

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.
March 6, 2015

Have you dropped all the tables and started again? What does the log file say (in full) when you start it up?

Kyosuke Nakajima March 7, 2015

Yes, I dropped my database and created again by `CREATE DATABASE confluence CHARACTER SET utf8 COLLATE utf8_general_ci;` (mysql5.5) ---- After I click "Next" on the database configuration page, I get "Confluence tables already exist in the selected database" error page, and if I click the override option, I get the following error. ``` org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cacheStatisticsManager' defined in class path resource [services/cacheServiceContext.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ehCacheStatisticsManager' defined in URL [jar:file:/opt/www/atlassian-confluence-5.7/confluence/WEB-INF/lib/confluence-cache-ehcache-5.7.jar!/cacheProviderContext.xml]: Cannot resolve reference to bean 'userI18NBeanFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userI18NBeanFactory' defined in class path resource [i18NContext.xml]: Cannot resolve reference to bean 'localeManager' while setting bean property 'localeManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'localeManager' defined in class path resource [i18NContext.xml]: Cannot resolve reference to bean 'settingsManager' while setting bean property 'settingsManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'settingsManager' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'upgradeManager' while setting bean property 'upgradeManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'upgradeManager' defined in class path resource [upgradeSubsystemContext.xml]: Cannot resolve reference to bean 'attachmentToCeoConversionUpgradeTask' while setting bean property 'schemaUpgradeTasks' with key [4]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'attachmentToCeoConversionUpgradeTask' defined in class path resource [upgradeSubsystemContext.xml]: Cannot resolve reference to bean 'luceneConnection' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'luceneConnection' defined in class path resource [indexingSubsystemContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.atlassian.bonnie.LuceneConnection]: Constructor threw exception; nested exception is com.atlassian.bonnie.LuceneException: org.apache.lucene.store.LockReleaseFailedException: Cannot forcefully unlock a NativeFSLock which is held by another indexer component: /opt/www/atlassian-confluence-5.7/index/write.lock ```

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.
March 7, 2015

Ah, well, that error is typical of using an incompatible version of Java. You have said you're on Confluence 5.7 - what version of java are you using? (The exact version, as I seem to remember that there are a couple of specific releases that cause problems)

Kyosuke Nakajima March 7, 2015

echo $JAVA_HOME gives me /usr/lib/jvm/jre-1.7.0-openjdk.x86_64 By the way, thank you for helping out :)

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.
March 7, 2015

No problem. You can make some versions of Confluence work with Openjdk, but it's not supported at all. Could you swap to using Oracle's Java? 1.7 or 1.8

Kyosuke Nakajima March 8, 2015

I tried with Oracle JAVA 1.8 but nothing changes. ---- $ . start-confluence.sh -fg Server startup logs are located in /opt/www/confluence/logs/catalina.out Using CATALINA_BASE: /opt/www/confluence Using CATALINA_HOME: /opt/www/confluence Using CATALINA_TMPDIR: /opt/www/confluence/temp Using JRE_HOME: /usr/java/jdk1.8.0_40 Using CLASSPATH: /opt/www/confluence/bin/bootstrap.jar:/opt/www/confluence/bin/tomcat-juli.jar Using CATALINA_PID: /opt/www/confluence/work/catalina.pid ---- Receive the following error, after clicking "Continue and override existing data" on "Confluence tables already exist in the selected database" error page. ``` Error creating bean with name 'cacheStatisticsManager' defined in class path resource [services/cacheServiceContext.xml]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ehCacheStatisticsManager' defined in URL [jar:file:/opt/www/atlassian-confluence-5.7/confluence/WEB-INF/lib/confluence-cache-ehcache-5.7.jar!/cacheProviderContext.xml]: Cannot resolve reference to bean 'userI18NBeanFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userI18NBeanFactory' defined in class path resource [i18NContext.xml]: Cannot resolve reference to bean 'localeManager' while setting bean property 'localeManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'localeManager' defined in class path resource [i18NContext.xml]: Cannot resolve reference to bean 'settingsManager' while setting bean property 'settingsManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'settingsManager' defined in class path resource [applicationContext.xml]: Cannot resolve reference to bean 'upgradeManager' while setting bean property 'upgradeManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'upgradeManager' defined in class path resource [upgradeSubsystemContext.xml]: Cannot resolve reference to bean 'attachmentToCeoConversionUpgradeTask' while setting bean property 'schemaUpgradeTasks' with key [4]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'attachmentToCeoConversionUpgradeTask' defined in class path resource [upgradeSubsystemContext.xml]: Cannot resolve reference to bean 'luceneConnection' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'luceneConnection' defined in class path resource [indexingSubsystemContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.atlassian.bonnie.LuceneConnection]: Constructor threw exception; nested exception is com.atlassian.bonnie.LuceneException: org.apache.lucene.store.LockReleaseFailedException: Cannot forcefully unlock a NativeFSLock which is held by another indexer component: /opt/www/atlassian-confluence-5.7/index/write.lock ``` ---- Receive the following error, after reloading (any page). ``` Error creating bean with name 'i18NBean' defined in class path resource [i18NContext.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public com.atlassian.confluence.util.i18n.I18NBean com.atlassian.confluence.util.i18n.UserI18NBeanFactory.getI18NBean()] threw exception; nested exception is com.atlassian.cache.CacheException: java.lang.IllegalStateException: The com.atlassian.confluence.util.i18n.I18NBeanFactory.by.locale Cache is not alive (STATUS_SHUTDOWN) ```

Kyosuke Nakajima March 9, 2015

I still have not figured out the reason (and still couldn't use MySQL), but I reinstalled with the following environments and it worked this time. --- CentOS 6.6 Confluence 5.7.1 Server - Standalone (TAR.GZ Archive) PostgreSQL 9.3.6 Oracle JRE 1.8.0_40 --- Thank you for the help :)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events