The buildomatic scripts cannot automatically connect to a remote DB2 database and carry out Admin operations, so you have to perform additional steps to create the databases.
The DB2 client software, db2 or db2cmd, can be used to interact with DB2.
1. | Enter commands similar to the ones below in the DB2 command window to create and initialize the repository database, called jsprsrvr in DB2 to conform to the 8-character limitation: |
db2 create database jsprsrvr using codeset utf-8 territory us pagesize 16384[/code] |
2. | (Optional) Run the following commands in the DB2 command window if you want to install sample databases: |
db2 create database sugarcrm db2 create database foodmart [/code] |
3. | Now, continue installing JasperReports Server as described in Installing the WAR File Using js-install Scripts. |
Further considerations:
• | If you are using DB2 8.1, set the LOGFIL_SIZ parameter to a minimum of 3000 to avoid possible log file errors while loading the foodmart database. Configure your foodmart database right after creating it by using Control Center. |
• | If JasperReports Server is deployed on the same host as DB2, delete the following file to avoid conflicts: <db2>/SQLLIB/java/db2jcc.jar |
Additional Steps for Using JBoss AS 7
If you are using JBoss AS 7 as your application server and Oracle, SQL Server, or DB2 as your database, there is an additional set of required steps to handle the JDBC driver. If you are using a different driver from the one supplied with JasperReports Server, you should have already downloaded a JDBC driver jar for your database type. (See Working With JDBC Drivers, if you have not yet done this.)
You will need to make an explicit reference to your JDBC driver file name so that JBoss 7 will know the exact file name.
1. | First update your default_master.properties file to specify the exact name (artifactId and version) of your JDBC driver: |
Edit: <js-install>/buildomatic/default_master.properties
Look for the section "Setup JDBC Driver"
Uncomment and edit the two lines shown below:
# maven.jdbc.artifactId=ojdbc5
# maven.jdbc.version=11.2.0
So that they look like this:
maven.jdbc.artifactId=ojdbc5
maven.jdbc.version=11.2.0
(This will work for a driver with the filename: ojdbc5-11.2.0.jar)
2. | Edit your jboss-deployment-structure.xml file so that the JDBC filename is specified: |
Edit: <js-install>/buildomatic/install_resources/jboss/jboss-deployment-structure.xml
Look for the section "Setup JDBC Driver"
Uncomment and edit the line for your database type (for instance):
<!-- <resource-root path="WEB-INF/lib/ojdbc5-11.2.0.jar" use-physical-code-source="true"/> -->
So that it looks like this:
<resource-root path="WEB-INF/lib/ojdbc5-11.2.0.jar" use-physical-code-source="true"/>
(This will work for a driver with the filename: ojdbc5-11.2.0.jar)
Note: If your JDBC driver filename does not have a version number, it maybe required to rename the file so that it has a version number.
For instance, if you have a file named: sqljdbc4.jar
You can rename it with a "dummy" version number: sqljdbc4-1.0.jar
Then the artifactId and version can look like this:
maven.jdbc.artifactId=sqljdbc4
maven.jdbc.version=1.0
Recommended Comments
There are no comments to display.