Skip to content

Commit 6301d43

Browse files
committed
Updated readme for the updater
1 parent ce23d27 commit 6301d43

File tree

2 files changed

+48
-41
lines changed

2 files changed

+48
-41
lines changed

src-setup/org/opencms/setup/updater/dialogs/CmsUpdateStep02DBDialog.java

+15-7
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import org.opencms.setup.CmsUpdateBean;
3131
import org.opencms.setup.CmsUpdateUI;
3232
import org.opencms.setup.db.CmsUpdateDBManager;
33+
import org.opencms.setup.ui.CmsSetupErrorDialog;
3334
import org.opencms.ui.CmsVaadinUtils;
3435
import org.opencms.ui.FontOpenCms;
3536

@@ -77,13 +78,20 @@ public boolean init(CmsUpdateUI ui) {
7778

7879
bean.setDetectedVersion(m_dbBean.getDetectedVersion());
7980

80-
if (m_dbBean.needUpdate()) {
81-
m_icon.setContentMode(ContentMode.HTML);
82-
m_icon.setValue(FontOpenCms.WARNING.getHtml());
83-
m_contentLayout.addComponent(getDisplayContent(m_dbBean));
84-
return true;
85-
} else {
86-
ui.displayDialog(new CmsUpdateStep04SettingsDialog());
81+
try {
82+
if (m_dbBean.needUpdate()) {
83+
m_icon.setContentMode(ContentMode.HTML);
84+
m_icon.setValue(FontOpenCms.WARNING.getHtml());
85+
m_contentLayout.addComponent(getDisplayContent(m_dbBean));
86+
return true;
87+
} else {
88+
ui.displayDialog(new CmsUpdateStep04SettingsDialog());
89+
return false;
90+
}
91+
} catch (NullPointerException en) {
92+
CmsSetupErrorDialog.showErrorDialog(
93+
"Database error",
94+
"Your database version is not compatible with OpenCms 11.");
8795
return false;
8896
}
8997
}

webapp/WEB-INF/updatedata/readme.txt

+33-34
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,66 @@
1-
1+
22
Instructions for updating OpenCms 8.x, 9.x and 10.0.x to @OPENCMS_VERSION@
33

44

55
WARNING:
66

77
UPDATE AT YOUR OWN RISK
88

9-
The OpenCms update wizard and these instructions are distributed in the hope
9+
The OpenCms update wizard and these instructions are distributed in the hope
1010
that they will be useful, but WITHOUT ANY WARRANTY; without even the implied
1111
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1212

13-
Alkacon Software does not guarantee that there will be no damage to your
13+
Alkacon Software does not guarantee that there will be no damage to your
1414
existing OpenCms installation when using this upgrade wizard.
1515

16-
IMPORTANT: Before using this upgrade wizard, make sure you have a full backup
16+
IMPORTANT: Before using this upgrade wizard, make sure you have a full backup
1717
of your OpenCms installation and database.
1818

19-
IMPORTANT: Alkacon OCEE versions less than 5 will not work with OpenCms 10.
19+
IMPORTANT: Alkacon OCEE versions less than 5 will not work with OpenCms 10.
2020

21-
IMPORTANT: The updater is only compatible with the database engines MySQL,
21+
IMPORTANT: The updater is only compatible with the database engines MySQL,
2222
Oracle and PostgreSQL.
23-
23+
2424
IMPORTANT: This version of OpenCms requires at least Java 8.
2525

2626
IMPORTANT: The upgrade wizard will replace all VFS resources of the updated modules.
2727
If you made modifications to these modules, their changes will be lost.
2828
In this case export the changed module resources before starting the update.
29-
Hint: You can use the "Resource changed since" feature in the Database
30-
Administration to export all the changes you have done after installing
29+
Hint: You can use the "Resource changed since" feature in the Database
30+
Administration to export all the changes you have done after installing
3131
OpenCms.
3232

3333
Follow the following steps to update from OpenCms 10.x to @OPENCMS_VERSION@:
3434

3535

3636
1. Shutdown your OpenCms servlet container
3737

38-
The OpenCms upgrade requires that you shut down OpenCms first. You can use the
39-
Broadcast message tool in the 'Administration' view to inform users before the
38+
The OpenCms upgrade requires that you shut down OpenCms first. You can use the
39+
Broadcast message tool in the 'Administration' view to inform users before the
4040
server is shut down.
4141

4242

43-
2. Extract the OpenCms upgrade file 'opencms-upgrade-to-@[email protected]' to
43+
2. Extract the OpenCms upgrade file 'opencms-upgrade-to-@[email protected]' to
4444
your web application directory
4545

46-
If you extracted the file to an external directory, copy the folders 'update'
47-
and 'WEB-INF' to the OpenCms webapp directory. Be sure that the files 'opencms.tld'
48-
and 'lib/opencms.jar' are replaced with the new version from the archive before you
49-
continue. Be also sure that after unpacking the tomcat user has write permissions on
46+
If you extracted the file to an external directory, copy the folder 'WEB-INF' to the OpenCms webapp directory. Be sure that the files 'opencms.tld'
47+
and 'lib/opencms.jar' are replaced with the new version from the archive before you
48+
continue. Be also sure that after unpacking the tomcat user has write permissions on
5049
the whole web application directory.
5150
Be also aware that the 'web.xml' might be overwritten.
52-
The OpenCmsUrlServletFilter available since version 10.5.0 will be disabled by default.
51+
The OpenCmsUrlServletFilter available since version 10.5.0 will be disabled by default.
5352
Edit the 'web.xml' to enable it.
5453

5554

5655
3. Enable the upgrade wizard
5756

58-
To do so, set the property
57+
To do so, set the property
5958
wizard.enabled=true
6059
in the config file WEB-INF/config/opencms.properties.
6160

6261
4. Restart your OpenCms servlet container
6362

64-
OpenCms will not start because the wizard in enabled.
63+
OpenCms will not start because the wizard in enabled.
6564

6665

6766
5. Execute the OpenCms update wizard
@@ -71,24 +70,24 @@ Open the URL $SERVER_NAME/$CONTEXT_NAME/update/ in your Browser, e.g.
7170
http://yourserver:8080/opencms/update/
7271

7372
The update wizard should appear, which looks very similar to the OpenCms setup
74-
wizard. Make sure to read the instructions and the disclaimer on the start
73+
wizard. Make sure to read the instructions and the disclaimer on the start
7574
page. Then execute the wizard which guides you through the update process.
7675

7776
You will need the Admin password to continue with the upgrade.
7877

7978
When asked to select the modules to update you should definitely select all
80-
org.opencms.ade.*, org.opencms.editors.*, org.opencms.gwt and org.opencms.workplace.*
79+
org.opencms.ade.*, org.opencms.editors.*, org.opencms.gwt and org.opencms.workplace.*
8180
modules.
82-
8381

8482

85-
After you confirmed the module selection, you should see the status report of the
86-
module import. This report is also written to WEB-INF/logs/update.log. Check this
83+
84+
After you confirmed the module selection, you should see the status report of the
85+
module import. This report is also written to WEB-INF/logs/update.log. Check this
8786
file for errors and exceptions after installation. There should be no exceptions
88-
caused by the upgrade if everything went as expected. Some exceptions may occur
87+
caused by the upgrade if everything went as expected. Some exceptions may occur
8988
in case you have an advanced OpenCms installation with many customized classes.
9089

91-
The update wizard will also do a full rebuild of all your search indices, and
90+
The update wizard will also do a full rebuild of all your search indices, and
9291
purge the JSP repository.
9392

9493
The wizard will finish similar to the setup wizard. After the final confirmation,
@@ -100,16 +99,16 @@ the wizard will be locked again (in the opencms.properties file).
10099

101100
During the update Solr will be disabled in the WEB-INF/config/opencms-search.xml.
102101
To update Solr you must update the 'schema.xml and' the 'solrconfig.xml' manually.
103-
The new default configuration files are located in the solr-update/ directory in
102+
The new default configuration files are located in the solr-update/ directory in
104103
the WEB-INF folder of your application. If you are using the default configuration
105104
from the distribution, it is sufficient to replace the folder WEB-INF/solr/ with
106105
the solr-update/ folder. Else if you have customized the Solr configuration you might
107106
want to merge the 'schema.xml' and the 'solrconfig.xml' first. Note that these two files
108107
are now located under solr/configsets/default/conf/ - up to OpenCms 10 it was solr/conf/.
109108
Even if you only keep your old config files, move them to solr/configsets/default/conf/.
110109

111-
If you are updating from an earlier version than 8.5.0, always copy the whole solr-update/
112-
folder to the solr/ folder instead.
110+
If you are updating from an earlier version than 8.5.0, always copy the whole solr-update/
111+
folder to the solr/ folder instead.
113112

114113
When you are done, enable Solr in the opencms-search.xml again (and restart the servlet
115114
container).
@@ -119,7 +118,7 @@ container).
119118
7. Shutdown and restart your OpenCms servlet container
120119

121120
Note: to be sure all jsp files work correctly please delete the servlet containers
122-
work directory (ie. ${TOMCAT_HOME}/work/Catalina/localhost/opencms/) and the
121+
work directory (ie. ${TOMCAT_HOME}/work/Catalina/localhost/opencms/) and the
123122
OpenCms' jsp repository (ie. ${OPENCMS_HOME}/WEB-INF/jsp/)
124123

125124
You should now be able to log into the OpenCms workplace as before.
@@ -130,18 +129,18 @@ You should now be able to log into the OpenCms workplace as before.
130129

131130
As the search libraries and configuration may have changed, it is necessary to rebuild all search indexes.
132131
Log into OpenCms and navigate to Launchpad > Search Management and rebuild all indexes.
133-
132+
134133

135134

136135
9. Convert model groups [only relevant when updating from 10.0.x]
137136

138-
The way model groups are stored has changed between OpenCms 10.0.x and 10.5.x. So if you are using model
137+
The way model groups are stored has changed between OpenCms 10.0.x and 10.5.x. So if you are using model
139138
groups and are updating your system from version 10.0.x, you will need to convert them to the new format.
140139

141140
This requires the following steps:
142141

143142
- Open the explorer, switch to the root site / "system folder" and navigate to the folder /system/modules/org.opencms.base/pages.
144143
- Execute the JSP "updateModelGroups.jsp" in this folder
145-
- In the form displayed by the JSP, fill out the "base path" and "base container name" fields (they are
146-
described in the form itself) and hit the submit button.
144+
- In the form displayed by the JSP, fill out the "base path" and "base container name" fields (they are
145+
described in the form itself) and hit the submit button.
147146

0 commit comments

Comments
 (0)