Issues upgrading Confluence from 4.1 to 4.2
Asked by Seth Floyd:

I have Confluence 4.1 installed and running with an external Oracle db. I am trying to upgrade and have been running into roadblock after roadblock. I decided to install 4.1 on a seperate server and try to upgrade it to make sure this works before i touch my production version. I tried to make the copy of my production version as suggested in the documentation and that did not work so i figured id just try and install and upgrade an evaluation version. I keep running into these errors when I first startup confluence after i have made the correct adjustments to the server.xml and the confluence-init.properties files along with placing the correct ojdbc5jar in the lib directory. These errors appear on the first startup of confluence:

this is from the atlassian-confluence.log....

2012-08-21 08:10:57,214 ERROR \[main\] \[atlassian.confluence.upgrade.UpgradeLauncherServletContextListener\] contextInitialized 1: Cannot update schema

2012-08-21 08:10:57,215 WARN \[main\] \[atlassian.confluence.plugin.PluginFrameworkContextListener\] contextInitialized Not starting full plugin system due to upgrade or licensing errors  
This is from the catalina.out...  
WARNING: \[SetPropertiesRule\]{Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.  
Aug 21, 2012 8:09:48 AM org.apache.coyote.http11.Http11Protocol init  
INFO: Initializing Coyote HTTP/1.1 on http-8090  
Aug 21, 2012 8:09:48 AM org.apache.catalina.startup.Catalina load  
INFO: Initialization processed in 407 ms  
Aug 21, 2012 8:09:48 AM org.apache.catalina.core.StandardService start  
INFO: Starting service Tomcat-Standalone  
Aug 21, 2012 8:09:48 AM org.apache.catalina.core.StandardEngine start  
INFO: Starting Servlet Engine: Apache Tomcat/6.0.32  
2012-08-21 08:09:49,998 INFO \[main\] \[com.atlassian.confluence.lifecycle\] contextInitialized Starting Confluence 4.2.13 (build #3296)  
create table CONTENTPROPERTIES (PROPERTYID number(19,0) not null, PROPERTYNAME varchar2(255) not null, STRINGVAL varchar2(255), LONGVAL number(19,0), DATEVAL date, CONTENTID number(19,0), primary key (PROPERTYID))  
alter table CONTENT_LABEL add ATTACHMENTID number(19,0)  
alter table CONTENT_LABEL add PAGETEMPLATEID number(19,0)  
alter table CONTENT_LABEL add LABELABLEID number(19,0)  
alter table CONTENT_LABEL add LABELABLETYPE varchar2(255)  
create table LIKES (ID number(19,0) not null, CONTENTID number(19,0) not null, USERNAME varchar2(255) not null, CREATIONDATE date not null, primary key (ID))  
alter table CONTENT add PLUGINKEY varchar2(255)  
alter table CONTENT add PLUGINVER varchar2(255)  
alter table CONTENTPROPERTIES add constraint FK984C5E4C8DD41734 foreign key (CONTENTID) references CONTENT  
create index content_prop_str_idx on CONTENTPROPERTIES (STRINGVAL)  
create index content_prop_long_idx on CONTENTPROPERTIES (LONGVAL)  
create index content_prop_name_idx on CONTENTPROPERTIES (PROPERTYNAME)  
create index content_prop_date_idx on CONTENTPROPERTIES (DATEVAL)  
create index attch_data_idx on ATTACHMENTDATA (ATTACHMENTID)  
Aug 21, 2012 8:10:59 AM org.apache.coyote.http11.Http11Protocol start  
INFO: Starting Coyote HTTP/1.1 on http-8090  
Aug 21, 2012 8:10:59 AM org.apache.catalina.startup.Catalina start  
INFO: Server startup in 70832 ms  
Im wondering if the issue is that i cant upgrade and evaluation version.  
Also im wondering about this line:  
create index attch_data_idx on ATTACHMENTDATA (ATTACHMENTID)  
Im seeing this in the atlassian-confluence.log...  
2012-08-21 08:10:57,178 ERROR \[main\] \[atlassian.confluence.upgrade.UpgradeLauncherServletContextListener\] contextInitialized Upgrade failed, application will not start: com.atlassian.config.ConfigurationException: Cannot update schema  
Caused by: java.sql.SQLException: ORA-01408: such column list already indexed  
i know this is not a permissions issue with my database.  
Anyone have any ideas on all of this?


Answers:
author: Sander Brienen [Avisi]
body: A workable workaround to this issue is:
> However, there is a workaround for your issue, you will need set the system property **hibernate.hbm2ddl.skip_creating_missing_indexes** to **true** to avoid automatic index creation before the upgrade.

This workaround is not part of the official documentation afaik but works until Atlassian will fix this bug in the upgrade!

comments: author: hsuhailah
body: Information to all, the bug report is tracked here: <https://jira.atlassian.com/browse/CONF-24672> and the workaround is also mentioned in the report.


author: hsuhailah
body: Information to all, the bug report is tracked here: <https://jira.atlassian.com/browse/CONF-24672> and the workaround is also mentioned in the report.


author: Seth Floyd
body: I finally got this straightened out and had to do it the manual way...Here is what i did:

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*BEFORE YOU DO ANYTHING MAKE SURE YOU HAVE A BACKUP OF YOUR DATABASE AND YOUR FILES. IM NOT RESPONSIBLE FOR SUPPORTING THIS WAY OF UPGRADING ITS JUST WHAT WORKED FOR ME.\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

Obtain the tar of the version that you want to upgrade to from Atlassian's download page.

Unzip the tar to a folder other than where your current Confluence is installed.

In my case I had atlassian-confluence-4.1.4 and unzipped my tar to atlassian-confluence-4.2.13

I copied my ojdbc.jar file in my confluencehome/lib directory to the new confluencehome/lib dir...

cp atlassian-confluence-4.1.4/lib/ojdbc5.jar atlassian-confluence-4.2.13/lib/ojdbc5.jar

For the Confluence home files...

I copied the server.xml file to the new home...

cp atlassian-confluence-4.1.4/conf/server.xml atlassian-confluence-4.2.13/conf/server.xml

None of the settings should have changed in here but double check your database connection information to be sure.

In your new confluence home dir find the confluence-init.properties file inside...

In my case this is atlassian-confluence-4.2.13/confluence/WEB-INF/classes/confluence-init.properties

Look to the bottom of the file and find: confluence.home= Uncomment it and set it to your Atlassian home dir. For me this is confluence.home=/opt/atlassian.

For the Atlassian home files...

Go to your Atlassian home directory (data folder) For me this is /opt/atlassian

edit the file confluence.cfg.xml

if it is not already there add this line:

\<property name="hibernate.hbm2ddl.skip_creating_missing_indexes"\>true\</property\>

This will prevent Confluence from trying to reindex tables that have already been indexed. You will still see some new indexes created.

Shutdown your "old" version of confluence.

Navigate to your "new" version and start it. For me this is /opt/atlassian-conflunce-4.2.13/bin/start-confluence.sh

Be sure to tail 2 different files at the same time to observe what is happening:

tail -f /opt/atlassian/logs/atlassian-confluence.log \<--- This is the "system" log that you see referred to in the Docs from Atlassian. Lots of info in here

tail -f /atlassian-confluence-4.2.13/logs/catalina.out \<---log of TomCat...you will see when Confluence is actually started up in here.

Once you see that Confluence has started up you should now be able to log in and see the update has taken place.


author: Seth Floyd
body: So far this is working in my simple recreation of my production version...going to try and apply this to my prod version and see what we come up with. Thanks for the tip. I read that doc on manual installation a 1000 times and must have missed that property to add.


author: Sander Brienen [Avisi]
body: Normally an upgrade is very smooth. Atlassian has done its best to make it as easy as possible. But sometimes you might run into strange problems that are hard to tackle.

There is a (very old) bug raised on an issue similar to ours. We could work around the problem with this option in confluence.cfg.xml: "However, there is a workaround for your issue, you will need set the system property **hibernate.hbm2ddl.skip_creating_missing_indexes** to **true** to avoid automatic index creation before the upgrade."


author: Seth Floyd
body: Im going from either 4.2.11 or 4.2.13...ive tried both. I havent tried 4.2.12.

I dont understand why there have to be so many hoops to jump through just for a upgrade. My 4.1.4 keeps running into known memory issues but I swear that is better than these upgrade issues im having. Let me know if you figure anything out and ill do the same. Maybe together we can help someone else in the future with this post.


author: Sander Brienen [Avisi]
body: To which version of Confluence are you upgrading? 4.2.13?

Does this problem occur on 4.2.12 as well?

I have the same issue when upgrading Confluence 4.2.11 to 4.2.13.


Tags: error

index

oracle

upgrade