Source Build Setup for Other Databases

Setup for Additional Databases

If you are building the source code using a database other than PostgreSQL or MySQL, you can use the example settings below for Oracle, SQL Server, and DB2.

Download a JDBC Driver

You do not need a JDBC driver jar in order to build the source code. However, if you plan to build the source code and also populate the core data into the jasperserver repository database then you will need a JDBC driver.

You can download a JDBC driver appropriate for your database from one of the vendor sites listed below:

http://www.oracle.com/technetwork/indexes/downloads (Oracle)
http://www.microsoft.com/en-us/download/details.aspx?id=11774 (SQL Server)
http://www-01.ibm.com/software/data/db2/linux-unix-windows/downloads.html (DB2)

The downloaded JDBC jar should be copied into the following location:

<js-src>/buildomatic/conf_source/db/<dbType>/jdbc

For instance, for SQL Server the driver would go here:

<js-src>/buildomatic/conf_source/db/sqlserver/jdbc

Oracle

1. Go to the buildomatic directory in the source distribution:

cd <js-src>/jasperserver/buildomatic

2. Copy the Oracle specific file to the current directory and change its name to
default_master.properties:

Windows:

copy sample_conf\oracle_master.properties default_master.properties

Linux:

cp sample_conf/oracle_master.properties default_master.properties

3. Open the new default_master.properties file for editing.
4. Set the following properties for your local environment:

Property

Examples

appServerType

appServerType = tomcat7 (tomcat5/6, jboss, or glassfish2/3)

appServerDir

appServerDir = C:\\Program Files\\Apache Software Foundation\\Tomcat 7.0appServerDir = /home/user/apache-tomcat-7.0.26

sysUsername

sysUsername=system

sysPassword

sysPassword=password

dbUsername

dbUsername=jasperserver

dbPassword

dbPassword=password

dbHost

<span class="Code">dbHost=localhost</span>
maven

maven = C:\\apache-maven-3.0.4\\bin\\mvn.bat

maven = /home/devuser/apache-maven-3.0.4/bin/mvn

js-path

js-path = C:\\jasperreports-server-<span class="JasperBookVariablesBookSourceVersion">6.0</span>-src\\jasperserverjs-path = /home/<user>/jasperreports-server-<span class="JasperBookVariablesBookSourceVersion">6.0</span>-src/jasperserver

js-pro-path

js-pro-path = C:\\jasperreports-server-<span class="JasperBookVariablesBookSourceVersion">6.0</span>-src\\jasperserver-projs-pro-path = /home/<user>/jasperreports-server-<span class="JasperBookVariablesBookSourceVersion">6.0</span>-src/jasperserver-pro

repo-path

repo-path = C:\\jasperreports-server-<span class="JasperBookVariablesBookSourceVersion">6.0</span>-src\\jasperserver-reporepo-path = /home/<user>/jasperreports-server-<span class="JasperBookVariablesBookSourceVersion">6.0</span>-src/jasperserver-repo
5. If you want to execute the database-related steps, locate the Setup Standard Oracle JDBC Driver section in the file and uncomment the following properties, setting them to specify the name and version of your JDBC driver jar:
maven.jdbc.groupId=oracle
maven.jdbc.artifactId=ojdbc6
maven.jdbc.version=11.2.0.2
# sid=orcl
jdbcDriverClass=oracle.jdbc.OracleDriver
jdbcDataSourceClass=oracle.jdbc.pool.OracleConnectionPoolDataSource
6. Save the default_master.properties file. If you do not want to execute the database-related steps, you are finished.
7. If you want to execute the database-related steps, go to the buildomatic/conf_source/db/oracle directory

cd conf_source/db/oracle

8. Open the db.template.properties file and comment out the following properties:
# jdbc url templates...assume same host, port, db type
# admin.jdbcUrl=jdbc:tibcosoftware:oracle://${dbHost}:${dbPort};${dbSidOrServiceNameProp}
                                                                   # ${AdditionalAdminProperties}
# js.jdbcUrl=jdbc:tibcosoftware:oracle://${dbHost}:${dbPort};${dbSidOrServiceNameProp}
# sugarcrm.jdbcUrl=jdbc:tibcosoftware:oracle://${dbHost}:${dbPort};${dbSidOrServiceNameProp}
# foodmart.jdbcUrl=jdbc:tibcosoftware:oracle://${dbHost}:${dbPort};${dbSidOrServiceNameProp}
9. In the same db.template.properties file, uncomment the properties for the standard oracle driver:
# uncomment for standard oracle driver
admin.jdbcUrl=jdbc:oracle:thin:@${dbHost}:${dbPort}${dbSidOrServiceName} 
js.jdbcUrl=jdbc:oracle:thin:@${dbHost}:${dbPort}${dbSidOrServiceName}
sugarcrm.jdbcUrl=jdbc:oracle:thin:@${dbHost}:${dbPort}${dbSidOrServiceName}
foodmart.jdbcUrl=jdbc:oracle:thin:@${dbHost}:${dbPort}${dbSidOrServiceName}
10. Save the db.template.properties file.

SQL Server

1. Go to the buildomatic directory in the source distribution:

cd <js-src>/jasperserver/buildomatic

2. Copy the SQL Server specific file to the current directory and change its name to
default_master.properties:

Windows:

copy sample_conf\sqlserver_master.properties default_master.properties

Linux:

cp sample_conf/sqlserver_master.properties default_master.properties

3. Edit the new default_master.properties file and set the following properties for your local environment:

Property

Examples

appServerType

appServerType = tomcat7 (tomcat5/, jboss, or glassfish2/3)

appServerDir

appServerDir = C:\\Program Files\\Apache Software Foundation\\Tomcat 7.0appServerDir = /home/user/apache-tomcat-7.0.26

dbUsername

<span class="Code">dbUsername=sa</span>

dbPassword

<span class="Code">dbPassword=sa</span>

dbHost

<span class="Code">dbHost=localhost</span>

js-path

js-path = C:\\jasperreports-server-<span class="JasperBookVariablesBookSourceVersion">6.0</span>-src\\jasperserverjs-path = /home/<user>/jasperreports-server-<span class="JasperBookVariablesBookSourceVersion">6.0</span>-src/jasperserver

js-pro-path

js-pro-path = C:\\jasperreports-server-<span class="JasperBookVariablesBookSourceVersion">6.0</span>-src\\jasperserver-projs-pro-path = /home/<user>/jasperreports-server-<span class="JasperBookVariablesBookSourceVersion">6.0</span>-src/jasperserver-pro

repo-path

repo-path = C:\\jasperreports-server-<span class="JasperBookVariablesBookSourceVersion">6.0</span>-src\\jasperserver-reporepo-path = /home/<user>/jasperreports-server-<span class="JasperBookVariablesBookSourceVersion">6.0</span>-src/jasperserver-repo
4. If you want to execute the database-related steps, locate the Setup Standard SQL Server JDBC Driver section in the file and uncomment the following properties, setting them to specify the name and version of your JDBC driver jar:
maven.jdbc.groupId=sqlserver
maven.jdbc.artifactId=sqljdbc
maven.jdbc.version=1.6
sqlserver.jdbcUrlProtocol=jdbc:sqlserver
jdbcDriverClass=com.microsoft.sqlserver.jdbc.SQLServerDriver
 
jdbcDataSourceClass=com.microsoft.sqlserver.jdbc.SQLServerConnectionPoolDataSource
5. Save the default_master.properties file.

DB2

1. Go to the buildomatic directory in the source distribution:

cd <js-src>/jasperserver/buildomatic

2. Copy the DB2 specific file to the current directory and change its name to
default_master.properties:

Windows:

copy sample_conf\db2_master.properties default_master.properties

Linux:

cp sample_conf/db2_master.properties ./default_master.properties

3. Edit the new default_master.properties file and set the following properties for your local environment:

Property

Examples

appServerType

appServerType = tomcat7 (tomcat5/6, jboss, or glassfish2/3)

appServerDir

appServerDir = C:\\Program Files\\Apache Software Foundation\\Tomcat 7.0appServerDir = /home/user/apache-tomcat-7.0.26

dbUsername

<span class="Code">dbUsername=db2admin</span>

dbPassword

<span class="Code">dbPassword=password</span>

dbHost

<span class="Code">dbHost=localhost</span>

js-path

js-path = C:\\jasperreports-server-<span class="JasperBookVariablesBookSourceVersion">6.0</span>-src\\jasperserverjs-path = /home/<user>/jasperreports-server-<span class="JasperBookVariablesBookSourceVersion">6.0</span>-src/jasperserver

js-pro-path

js-pro-path = C:\\jasperreports-server-<span class="JasperBookVariablesBookSourceVersion">6.0</span>-src\\jasperserver-projs-pro-path = /home/<user>/jasperreports-server-<span class="JasperBookVariablesBookSourceVersion">6.0</span>-src/jasperserver-pro

repo-path

repo-path = C:\\jasperreports-server-<span class="JasperBookVariablesBookSourceVersion">6.0</span>-src\\jasperserver-reporepo-path = /home/<user>/jasperreports-server-<span class="JasperBookVariablesBookSourceVersion">6.0</span>-src/jasperserver-repo
4. If you want to execute the database-related steps, locate the Setup Standard DB2 JDBC Driver section in the file and uncomment the following properties, setting them to specify the name and version of your JDBC driver jar:
maven.jdbc.groupId=ibm
maven.jdbc.artifactId=db2jcc
maven.jdbc.version=9.5
jdbcDriverClass=com.ibm.db2.jcc.DB2Driver
jdbcDataSourceClass=com.ibm.db2.jcc.DB2ConnectionPoolDataSource
5. Comment out the URL properties lower in the file. The properties begin like so; they are not shown in full for reasons of space:
#admin.jdbcUrl=jdbc:db2://${dbHost}:${dbPort}...
#js.jdbcUrl=jdbc:db2://${dbHost}:${dbPort}...
#sugarcrm.jdbcUrl=jdbc:db2://${dbHost}:${dbPort}...
#foodmart.jdbcUrl=jdbc:db2://${dbHost}:${dbPort}...
6. Add the following additional properties, setting the correct values for your installation. For example:
db2.driverType=4
db2.fullyMaterializeLobData=true
db2.fullyMaterializeInputStreams=true
db2.progressiveStreaming=2
db2.progresssiveLocators=2
dbPort=50000
js.dbName=JSPRSRVR
sugarcrm.dbName=SUGARCRM
foodmart.dbName=FOODMART
7. Save the default_master.properties file.

Note: For DB2, the database must be created manually. This is because it is not possible to use a JDBC call to automatically create a database under DB2.

Version: 
Feedback
randomness