Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

Step 1: Obtain the MS JDBC driver

Step 2: Add the Dependency

  • From the uPortal source directory, open the uPortal-4.x.x/pom.xml file and add the sqljdbc4.jar dependency to your pom.xml (Version 4 of the sqljdbc driver is required).
<jdbc.groupId>com.microsoft.sqlserver</jdbc.groupId>
<jdbc.artifactId>sqljdbc4</jdbc.artifactId>
<jdbc.version>4.0</jdbc.version>
 
<dependencies>
...
  <dependency>
    <groupId>com.microsoft.sqlserver</groupId>
    <artifactId>sqljdbc4</artifactId>
    <version>4.0</version>
  </dependency>
...
</dependencies>

 

Step 3: Configure the Database Filter

  • From the uPortal source directory, open the uPortal-4.x.x/filters/local.properties file and add your database information (Note: for ease of development we generally suggest leaving local.properties with hsql and adjusting dev.properties, test.properties, and prod.properties to your chosen DB.  If you do this, pass "-Denv=dev" or whatever on your ant commands; e.g. "ant -Denv=dev dbtest").
## HSQL Configuration

environment.build.hsql.port=8887

## Database Connection Settings (Uncomment the Maven Filters section in rdbm.properties)
environment.build.hibernate.connection.driver_class=com.microsoft.sqlserver.jdbc.SQLServerDriver
environment.build.hibernate.connection.url=jdbc:sqlserver://<servername>:<port>;databaseName=<databasename>
environment.build.hibernate.connection.username=username
environment.build.hibernate.connection.password=password
environment.build.hibernate.dialect=org.hibernate.dialect.SQLServerDialect
# For SQL Server 2008+, you may want to have dialect set to org.hibernate.dialect.SQLServer2008Dialect

 

Step 4: Test the Configuration

Running the dbtest ant target will tell you if you have configured the database connection properly.

ant dbtest

 

Step 5: Build and Deploy 

Following a successful test, you can execute the command below to build the database tables and copy files to your servlet container. 

Note: Executing the command "ant clean initportal" will drop and recreate the database tables and all existing data will be lost. This will result in a clean uPortal database structure. If you want to keep the contents of your existing database, use "ant clean deploy-war"

ant clean initportal

Step 6: Restart Tomcat

 

 

Additional References

 

Having problems with these instructions?

Please send us feedback at uportal-user@lists.ja-sig.org

  • No labels