To connect Crowd to MS SQL Server,
In SQL Server, the database user (crowduser above) should not be the database owner, but should be in the |
Microsoft have their own JDBC driver but we strongly recommend avoiding it after our JIRA customers have reported various connection errors (JRA-5760, [JRA-6872|http://jira.atlassian.com/browse/JRA-6872), workflow problems (JRA-8443) and Chinese character problems (JRA-5054). |
common/lib directory.apache-tomcat-X.X.XX/conf/Catalina/localhost/crowd.xml and customise the username, password, driverClassName and url parameters for the Datasource.
<Context path="/crowd" docBase="../../crowd-webapp" debug="0">
<Resource name="jdbc/CrowdDS" auth="Container" type="javax.sql.DataSource"
username="[enter db username here]"
password="[enter db password here]"
driverClassName="net.sourceforge.jtds.jdbc.Driver"
url="jdbc:jtds:sqlserver://localhost:1433/crowddb"
[ delete the minEvictableIdleTimeMillis, timeBetweenEvictionRunsMillis and maxActive params here ]
/>
<Manager className="org.apache.catalina.session.PersistentManager" saveOnRestart="false"/>
</Context>
|
hibernate.dialect=org.hibernate.dialect.SQLServerDialect |
build.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-webapp\WEB-INF\classes\jdbc.properties; modify the file to the following:
# - Crowd Configuration Options hibernate.connection.datasource=java\:comp/env/jdbc/CrowdDS hibernate.dialect=org.hibernate.dialect.SQLServerDialect hibernate.transaction.factory_class=org.hibernate.transaction.JDBCTransactionFactory ... |
You should now have an application server configured to connect to a database, and Crowd configured to use the correct database. Now start up Crowd and watch the logs for any errors.