InstallingjACOBEnterprise
From JACOBWiki
Contents |
[edit] Installing jACOBTM Enterprise Edition in Apache Tomcat
[edit] Installing jACOB in Apache Tomcat
This documentation covers the installation of jACOB enterprise application server within Apache Tomcat 5.0.x or 5.5.x. We have successfully tested Tomcat 5.0.27 and 5.0.28 with JRE 1.4.2 and Tomcat 5.5.20 with JRE 5.0 either on Suse Linux 9.x/10.x., Solaris 5.9 and MS Windows 2000/2003 Server/XP. The installation on other actual Linux/UNIX distributions shouldn’t be a problem either.
Note: This document follows the Apache Tomcat documentation convention of using $CATALINA_HOME to represent the root of the Tomcat installation directory.
[edit] Apache Tomcat Prerequisites
By default, Tomcat 5.5 requires JRE version 5.0 or later. However, Tomcat can be configured to run on earlier versions of the JRE. Refer to $CATALINA_HOME/RUNNING.txt if this is a requirement.
[edit] Installing Java Runtime Environment (JRE)
1. Download the JRE 5.0 from:
http://tomcat.apache.org/download-55.cgi
Note: jACOB itself requires JRE 1.4 at minimum.
2. Install JRE as described for your operating platform.
[edit] Installing and Running Apache Tomcat
1. Download the Apache Tomcat Core binary distribution from:
http://tomcat.apache.org/download-55.cgi
2. Install Apache Tomcat as described for your operating platform.
3. Set the JAVA_HOME environment variable to the JRE directory path.
Refer to $CATALINA_HOME/RELEASE-NOTES for information about any other environment variables you need to set for your platform.
4. Start Tomcat.
Note: If the Tomcat server is unable to start, the default Tomcat port 8080 may already be in use. Refer to the "Troubleshooting" section in $CATALINA_HOME/RUNNING.txt for information about how to solve this and other common Tomcat installation problems.
5. In a web browser, go to the Tomcat home page at:
Note: If your web browser is not running on the same server as Tomcat, use this URL: http://tomcathost:8080. Replace tomcathost with the host name or IP address of the Tomcat server.
6. Test Tomcat by running the example web applications (or any other out of the box application).
[edit] Setting up jACOB Repository Data Source
1. Create an empty database schema within your mySQL 4.1/5, Oracle 8.1.7/9/10, or MS SQL Server 2000/2005 database.
Note: The database schema will further be used as the jACOB repository, i.e. the data source contains the complete jACOB configuration including deployed jACOB applications.
2. Create a database user, which has full access to this database schema.
Note: Not needed for Oracle since a database schema is an Oracle database user with resources.
Note: For MS SQL Server create a login which is the owner of the database schema.
[edit] Installing and Running jACOB
1. Stop Tomcat.
2. Create a directory jacob in the Tomcats webapps directory
| cd $CATALINA_HOME/webapps mkdir jacob |
3. Unzip jacob.war to this directory
| cd $CATALINA_HOME/webapps/jacob unzip /installdir/jacob-x.x.war |
Note: On Windows platform use a appropriate zip tool (e.g. WinZip, etc.)
4. Depending on the type of database, which maintains the jACOB repository, the appropriate JDBC driver has to be copied to the Tomcats common lib directory.
For mySQL:
| cd $CATALINA_HOME/webapps/jacob/WEB-INF/lib cp mysql-connector-java-3.1.8-bin.jar $CATALINA_HOME/common/lib |
For Oracle:
| cd $CATALINA_HOME/webapps/jacob/WEB-INF/lib cp ojdbc14.jar $CATALINA_HOME/common/lib |
For MS SQL Server:
| cd $CATALINA_HOME/webapps/jacob/WEB-INF/lib cp msbase.jar $CATALINA_HOME/common/lib cp msutil.jar $CATALINA_HOME/common/lib cp mssqlserver.jar $CATALINA_HOME/common/lib |
5. Create a web context configuration file with name jacob.xml by means of using one of the templates and edit it accordingly to configure the jACOB repository data source as described in the appendix of this document.
Note: The format of the web context configuration file is different in Tomcat 5.0.x and Tomcat 5.5.x.
6. Copy the created jacob.xml to $CATALINA_HOME/conf/Catalina/localhost:
| cp jacob.xml $CATALINA_HOME/conf/Catalina/localhost |
7. Start Tomcat again and wait until Tomcat has completely started up.
8. In a web browser, go to the jACOB login page at:
9. Enter your license key and press Save button.
10. To deploy your first jACOB application go to the jACOB admin login page at:
http://localhost:8080/jacob/admin
Note: The default user ID for the jACOB admin console is admin with plain password.
[edit] Appendix
[edit] Templates for jacob.xml
Use one of the following XML contents as template for your jACOB web context configuration file (the jacob.xml file under $CATALINA_HOME/conf/Catalina/localhost).
Edit the bold brown text parts accordingly to your jACOB repository database configuration.
[edit] For Tomcat 5.0.x and mySQL:
| <?xml version=’1.0’ encoding=’utf-8’?> <Context workDir="work/Catalina/localhost/jacob" path="/jacob" docBase="jacob"> <Resource type="javax.sql.DataSource" name="jacobDS"/> <ResourceParams name="jacobDS"> <parameter> <name>validationQuery</name> <value>show variables like 'have_%'</value> </parameter> <parameter> <name>maxWait</name> <value>5000</value> </parameter> <parameter> <name>maxActive</name> <value>4</value> </parameter> <parameter> <name>password</name> <value>jacob</value> </parameter> <parameter> <name>url</name> <value>jdbc:mysql://localhost:3306/jacob</value> </parameter> <parameter> <name>driverClassName</name> <value>com.mysql.jdbc.Driver</value> </parameter> <parameter> <name>maxIdle</name> <value>2</value> </parameter> <parameter> <name>username</name> <value>jacob</value> </parameter> </ResourceParams> </Context> |
[edit] For Tomcat 5.5.x and mySQL:
| <?xml version="1.0" encoding="UTF-8"?> <Context workDir="work/Catalina/localhost/jacob"> <Resource name="jacobDS" type="javax.sql.DataSource" driverClassName="com.mysql.jdbc.Driver" password="jacob" maxIdle="2" maxWait="5000" validationQuery="show variables like 'have_%'" username="jacob" url="jdbc:mysql://localhost:3306/jacob" maxActive="4"/> </Context> |
[edit] For Tomcat 5.0.x and Oracle:
| <?xml version=’1.0’ encoding=’utf-8’?> <Context workDir="work/Catalina/localhost/jacob" path="/jacob" docBase="jacob"> <Resource type="javax.sql.DataSource" name="jacobDS"/> <ResourceParams name="jacobDS"> <parameter> <name>validationQuery</name> <value>select sysdate from dual</value> </parameter> <parameter> <name>maxWait</name> <value>5000</value> </parameter> <parameter> <name>maxActive</name> <value>4</value> </parameter> <parameter> <name>password</name> <value>jacob</value> </parameter> <parameter> <name>url</name> <value>jdbc:oracle:thin:@host:1521:sid</value> </parameter> <parameter> <name>driverClassName</name> <value>oracle.jdbc.OracleDriver</value> </parameter> <parameter> <name>maxIdle</name> <value>2</value> </parameter> <parameter> <name>username</name> <value>jacob</value> </parameter> </ResourceParams> </Context> |
[edit] For Tomcat 5.5.x and Oracle:
| <?xml version="1.0" encoding="UTF-8"?> <Context workDir="work/Catalina/localhost/jacob"> <Resource name="jacobDS" type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver" password="jacob" maxIdle="2" maxWait="5000" validationQuery="select sysdate from dual" username="jacob" url="jdbc:oracle:thin:@host:1521:sid" maxActive="4"/> </Context> |
[edit] For Tomcat 5.0.x and MS SQL Server:
| <?xml version=’1.0’ encoding=’utf-8’?> <Context workDir="work/Catalina/localhost/jacob" path="/jacob" docBase="jacob"> <Resource type="javax.sql.DataSource" name="jacobDS"/> <ResourceParams name="jacobDS"> <parameter> <name>validationQuery</name> <value>select count(*) from dbo.sysusers</value> </parameter> <parameter> <name>maxWait</name> <value>5000</value> </parameter> <parameter> <name>maxActive</name> <value>4</value> </parameter> <parameter> <name>password</name> <value>jacob</value> </parameter> <parameter> <name>url</name> <value>jdbc:microsoft:sqlserver://host:1433;DatabaseName=mydb;</value> </parameter> <parameter> <name>driverClassName</name> <value>com.microsoft.jdbc.sqlserver.SQLServerDriver</value> </parameter> <parameter> <name>maxIdle</name> <value>2</value> </parameter> <parameter> <name>username</name> <value>jacob</value> </parameter> </ResourceParams> </Context> |
[edit] For Tomcat 5.5.x and MS SQL Server:
| <?xml version="1.0" encoding="UTF-8"?> <Context workDir="work/Catalina/localhost/jacob"> <Resource name="jacobDS" type="javax.sql.DataSource" driverClassName="com.microsoft.jdbc.sqlserver.SQLServerDriver" password="jacob" maxIdle="2" maxWait="5000" validationQuery="select count(*) from dbo.sysusers" username="jacob" url="jdbc:microsoft:sqlserver://host:1433;DatabaseName=mydb;" maxActive="4"/> </Context> |

