[KARAF-1545] Update the document about the JDBC locking mechanism and driver loading
Project: http://git-wip-us.apache.org/repos/asf/karaf/repo Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/36d9ef5e Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/36d9ef5e Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/36d9ef5e Branch: refs/heads/karaf-2.3.x Commit: 36d9ef5e064ad7e3285478aeef30c94f0197401d Parents: 875b5a2 Author: Jean-Baptiste Onofré <jbono...@apache.org> Authored: Thu Jul 10 08:30:40 2014 +0200 Committer: Jean-Baptiste Onofré <jbono...@apache.org> Committed: Thu Jul 10 08:31:28 2014 +0200 ---------------------------------------------------------------------- manual/src/main/webapp/users-guide/failover.conf | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/karaf/blob/36d9ef5e/manual/src/main/webapp/users-guide/failover.conf ---------------------------------------------------------------------- diff --git a/manual/src/main/webapp/users-guide/failover.conf b/manual/src/main/webapp/users-guide/failover.conf index aaa55de..539a317 100644 --- a/manual/src/main/webapp/users-guide/failover.conf +++ b/manual/src/main/webapp/users-guide/failover.conf @@ -49,6 +49,11 @@ karaf.lock.jdbc.timeout=30 * The first Karaf instance to acquire the locking table is the master instance. * If the connection to the database is lost, the master instance tries to gracefully shutdown, allowing a slave instance to become master when the database service is restored. The former master will require a manual restart. +{warning} +Apache Karaf won't start if the JDBC driver is not present in the {{lib/ext}} folder. In order to be loaded correctly, +the JDBC driver jar file has to be prefixed with {{karaf-}} (for instance the {{ojdbc14.jar}} has to be renamed as {{karaf-ojdbc14.jar}} in the {{lib/ext}} folder. +{warning} + h3. JDBC locking on Oracle If you are using Oracle as your database for JDBC locking, the {{karaf.lock.class}} property in the {{$KARAF_HOME/etc/system.properties}} file must point to {{org.apache.karaf.main.OracleJDBCLock}}. @@ -67,13 +72,13 @@ karaf.lock.jdbc.clustername=karaf karaf.lock.jdbc.timeout=30 {noformat} -As with the default JDBC locking setup, the Oracle JDBC driver JAR file must be in your classpath. You can ensure this by copying the {{ojdbc14.jar}} into Karaf's {{lib}} folder before starting Karaf. +As with the default JDBC locking setup, the Oracle JDBC driver JAR file must be in your classpath. You can ensure this by copying the {{ojdbc14.jar}} into Karaf's {{lib/ext}} folder and prefixed with {{karaf-}} before starting Karaf. *Note*: The {{karaf.lock.jdbc.url}} requires an active SID, which means you must manually create a database instance before using this particular lock. h3. Derby -The same rules apply when using derby. Make sure you have the driver jar file in the Karaf {{lib}} folder before starting Karaf. +The same rules apply when using derby. Make sure you have the driver jar file in the Karaf {{lib/ext}} folder and prefixed with {{karaf-}} before starting Karaf. Then make you update the properties in {{$KARAF_HOME/etc/system.properties}} to look something like this example: @@ -91,9 +96,7 @@ karaf.lock.jdbc.timeout=30 h3. MySQL -Make sure you have the MySQL driver jar file in the Karaf {{lib}} folder before starting Karaf. - -*NOTE*: for 2.2.x, 2.3.x you need to rename the MySQL Driver jar to prefix with 'karaf-' in order for karaf to pick it up, otherwise you will see karaf just hang on startup and the log will show you that it could not find the driver. +Make sure you have the MySQL driver jar file in the Karaf {{lib/ext}} folder and prefixed with {{karaf-}} before starting Karaf. Then make you update the properties in {{$KARAF_HOME/etc/system.properties}} to look something like this example: @@ -111,9 +114,7 @@ karaf.lock.jdbc.timeout=30 h3. PostgreSQL -Make sure you have the PostgreSQL driver jar file in the Karaf {{lib}} folder before starting Karaf. - -*NOTE*: for 2.2.x, 2.3.x you need to rename the PostgreSQL Driver jar to prefix with 'karaf-' in order for karaf to pick it up, otherwise you will see karaf just hang on startup and the log will show you that it could not find the driver. +Make sure you have the PostgreSQL driver jar file in the Karaf {{lib/ext}} folder and prefixed with {{karaf-}} before starting Karaf. Then make you update the properties in {{$KARAF_HOME/etc/system.properties}} to look something like this example: