To connect CrowdID to PostgreSQL,
1. Configure PostgreSQL
- 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 PostgreSQL driver to your application server
- Download the PostgreSQL JDBC driver from http://jdbc.postgresql.org/download.html. Get the JDBC 3 driver specific to your Postgres version, eg. + postgresql-8.x-xxx.jdbc3.jar.
- Add the PostgreSQL JDBC driver jar to the common/lib directory.
3. Configure your application server to connect to PostgreSQL
- Edit the file
apache-tomcat-X.X.XX/conf/Catalina/localhost/openidserver.xmland customise the username, password, driverClassName and url parameters for the Datasource. - Delete the minEvictableIdleTimeMillis, timeBetweenEvictionRunsMillis and maxActive attributes (which are only needed for HSQL, and degrade performance otherwise).
4. Configure CrowdID to use PostgreSQL
- Edit the
build.propertiesfile located in the root of the standalone release and modify the hibernate.dialect to the followinghibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
- Then run
./build.shorbuild.bat. This will configure crowd to use the PostgreSQL dialect.
There is a problem with build.batin 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.PostgreSQLDialect hibernate.transaction.factory_class=org.hibernate.transaction.JDBCTransactionFactory ...
Next Steps
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.






