...
An example of such changes is reported for MySQL and PostgreSQL (this file is also included in resources of core-upgrader
module of the project): the set of SQL statements you need to run vary depending on the DBMS used for internal storage. During manual SQL upgrade you may see some exceptions (given by DBMS) about deletion of not-existing indexes or views, these aren't blocking exceptions; you only need to be sure to delete all indexes and views, in some cases you may need to change a little bit given SQL samples.
...
Change new 1.2.X project content file, located under core/src/main/resources/content.xml, leaving : you have to edit Entitlements section only, comment out (or delete) old entitlements (the ones already present in 1.1.X) leaving only new Entitlements introduced with 1.2.X version, you can delete (or comment) all other Entitlements, . Other "old" Entitlements are already stored on database.
Below there is the list of Entitlements introduced with 1.2.X version:
- SCHEMA_LIST
- ROLE_LIST
- RESOURCE_LIST
- CONFIGURATION_EXPORT
- CONFIGURATION_SET
- SECURITY_QUESTION_LIST
- SECURITY_QUESTION_READ
- SECURITY_QUESTION_CREATE
- SECURITY_QUESTION_UPDATE
- SECURITY_QUESTION_DELETE
Enable ContentUpgrader
In coreIn
core/src/main/resources/coreContext.
xml addxml
add (at the end of file) before </beans>:Code Block language xml <import resource="classpath*:upgradeContext.xml"/>
In
core/pom.xml
add following dependency from core-upgrader module:Code Block language xml <dependency> <groupId>org.apache.syncope</groupId> <artifactId>syncope-core-upgrader</artifactId> <version>${syncope.version}</version> </dependency>
In
core/src/main/resources/log4j2.xml
add following lines:Code Block language xml <appenders> ... ... <RollingRandomAccessFile name="upgrader" fileName="${log.directory}/core-upgrader.log" filePattern="${log.directory}/core-upgrader-%d{yyyy-MM-dd}.log.gz" immediateFlush="false" append="true"> <PatternLayout> <pattern>%d{HH:mm:ss.SSS} %-5level %logger - %msg%n</pattern> </PatternLayout> <Policies> <TimeBasedTriggeringPolicy/> <SizeBasedTriggeringPolicy size="250 MB"/> </Policies> </RollingRandomAccessFile> ... ... </appenders> <loggers> ... ... <asyncLogger name="org.apache.syncope.upgrader" additivity="false" level="INFO"> <appender-ref ref="upgrader"/> </asyncLogger> ... ... </loggers>
Build, deploy and run
Build project, deploy to choosen container and run it. The first run should log exceptions about ContentInitializer (in particular about creation of resources, connectors, etc), but this is normal.
...
Stop the JEE container and follow steps below.
Note | ||
---|---|---|
| ||
If during the upgrade process, MySQL returns an "Incorrect string value", take 'utf80 out of the JDBC URLS, in the datasource configuration. |
Disable ContentUpgrader
In core/src/main/resources/persistenceContext.xml
remove last import:
...