Oracle for CrowdID
Follow the steps below to connect CrowdID to Oracle.
1. Oracle の設定
- Create a database user which CrowdID will connect as (e.g. crowduser).
- Create a database for CrowdID to store data in (e.g. crowdiddb). This must be a different database to the one used by Crowd.
- Ensure that the user has permission to connect to the database, and create and populate tables.
2. Copy the Oracle Driver to your Application Server
- Download the Oracle JDBC driver from http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html.
- Add the Oracle JDBC driver jar to the following directory:
- For Crowd distribution:
- Crowd 2.0.2 or later: {
CROWD_INSTALL}/apache-tomcat/lib/
. - Crowd 2.0.1 or earlier: {
CROWD_INSTALL}/apache-tomcat/common/lib/
.
- Crowd 2.0.2 or later: {
- For Crowd WAR distribution, copy the driver JAR to your application server. For example, on Tomcat:
- Tomcat 5.5.x:
common/lib/
. - Tomcat 6.x:
lib/
.
- Tomcat 5.5.x:
- For Crowd distribution:
3. Configure your Application Server to Connect to Oracle
Edit the file
apache-tomcat-X.X.XX/conf/Catalina/localhost/openidserver.xml
and customize the username, password, driverClassName and urlparameters for the Datasource.<Context path="/openidserver" docBase="../../crowd-openidserver-webapp" debug="0"> <Resource name="jdbc/CrowdIDDS" auth="Container" type="javax.sql.DataSource" username="[enter db username here]" password="[enter db password here]" driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@localhost:1521:crowdiddb" [ delete the minEvictableIdleTimeMillis, timeBetweenEvictionRunsMillis and maxActive params here ] /> <Manager className="org.apache.catalina.session.PersistentManager" saveOnRestart="false"/> </Context>
- Delete the minEvictableIdleTimeMillis, timeBetweenEvictionRunsMillis and maxActive attributes (which are only needed for HSQL, and degrade performance otherwise).
4. Configure CrowdID to use Oracle
Edit the
build.properties file
(located in the root of the Crowd release, not Crowd EAR-WAR) and modify the hibernate.dialect to the followinghibernate.dialect=org.hibernate.dialect.Oracle10gDialect
- Then run
./build.sh
orbuild.bat
. This will configure CrowdID to use the Oracle dialect. There is a problem withbuild.bat
in Crowd version 1.2.0. To fix the problem, please apply the patch described in CWD-638.
If you do not wish to edit this file and run the build script, you can edit the jdbc.properties (which the above script modifies) directly. The jdbc.properties file is located here: crowd-openidserver-webapp\WEB-INF\classes\jdbc.properties
. Modify the file to the following:
# - Crowd Configuration Options
hibernate.connection.datasource=java\:comp/env/jdbc/CrowdIDDS
hibernate.dialect=org.hibernate.dialect.OracleDialect
hibernate.transaction.factory_class=org.hibernate.transaction.JDBCTransactionFactory
...
次のステップ
You should now have an application server configured to connect to a database, and CrowdID configured to use the correct database. Now start up CrowdID and watch the logs for any errors.
関連トピック
- サポート対象プラットフォーム
- Installing Crowd and CrowdID
- セットアップ ウィザードの実行
- Configuring Crowd