3. Installation and Configuration 3.1 Java Development Kit (JDK)
The Java Development Kit (JDK) which includes the Java Run-time Environment (JRE) is necessary in order for Apache Tomcat to operate properly as this is a Tomcat prerequisite. Download the Java SE Development Kit from Sun Microsystems website
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
After completing the download execute the JDK file jdk-7u15-windows-x64.exe) and follow the on-screen instructions. If you follow the default installation settings, the Installation directory is C:\Program Files\Java\jdk1.7.0_15\
3.2 Apache Tomcat
Download Apache Tomcat 5.5 from http://tomcat.apache.org/download-60.cgi and make sure to select the Binary Distributions” as shown in the following figure
Execute file “apache-tomcat-6.0.36.exe” and follow the on-screen instructions by accepting the start of the installation wizard and accepting the license agreement. Select “Normal” installation for the “Select the type to install” and click “Next”.
Specify a new port number to access the Tomcat server from a web browser or leave the default port to 8080. Indicate a “User Name” and “Password” for the “Administrator
The next windows will ask to specify the location of the Java Virtual Machine. The path should be filled in automatically assuming you have already installed the JDK earlier.
Click “Next” to install into the default location or specify a new path in the “Destination Folder” and then click “Next”.
Now click “Next” and wait for the installation to complete. When this is finished uncheck the boxes to “View the Readme” unless you wish to view it and “Start Tomcat Server” as the Tomcat server will be tested through Eclipse (Section 3.3) with the Sysdeo plug-in to confirm that the plug-in and Tomcat server are both working correctly.
3.3 Eclipse
Download eclipse indigo from http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/indigosr2. The Eclipse IDE for Java Developers is recommended.
The installation package is a compressed ZIP file so any extraction software that can handle ZIP files such as WinZip (www.winzip.com) or WinRar (www.rarlabs.com) are required. Using the extraction software, extract the files to a suitable location on your hard disk such as C:\Program Files\eclipse. Locate the eclipse folder in the location that you extracted the files to and execute eclipse.exe
When you execute Eclipse for the first time you must select a workspace where all your saved projects will be stored. Check “Use this as the default and do not ask again” checkbox in order to make this the default location and not receive any more notifications.
3.4 Sysdeo Tomcat Launcher Plugin 3.2.1
Now the Sysdeo Tomcat Eclipse plug-in will be installed to make it easy to
enable/disable the Tomcat server from within eclipse. The installation of the plug-in does not differ from other Eclipse plug-ins: After downloading the plug-in from http://www.eclipsetotale.com/tomcatPlugin.html or search for the plug-in from the eclipse website. Unzip and place the “com.sysdeo.eclipse.tomcat_x.x.x” (where x.x.x represents the version number) folder into the Eclipse's "plug-ins" directory, and start Eclipse. Verify that the plug-in has been installed by selecting from the menu bar Help→About→Installation Details then select the Plug-ins tab and look for the following entry shown in the picture below:
Eclipse normally uses a Java Runtime Environment (JRE), and not a full Java
Development Kit (JDK), but Tomcat must have access to a JDK. You should, therefore, first define a JDK for Tomcat. From the menu bar select Window→Preferences→Java and select the “Installed JREs” tab by clicking on the left hand side of the “Java” tab:
As you can see only a JRE is available. Press the "Add..." button to add a JDK to the list. Select “Standard VM” and press the "Next" button:
Select the “Directory…” button to specify the path to find the JDK that we downloaded. When this is complete everything about the JDK will be filled in automatically so select “Finish” to complete the addition.
Now uncheck the JRE and check the newly added JDK that was added.
Select “OK” and restart Eclipse to confirm the changes. You should now tell the plug-in where your Tomcat system is located. From the menu bar select
Window→Preferences→Tomcat and select 1. Tomcat version number to be “Version 6.x”
2. Tomcat home (this automatically sets the configuration file) to be “Directory path where you installed Tomcat\Apache Software Foundation\Tomcat 6.0” or if you used the default path provided by Tomcat then the path would be “C:\Program Files\Apache Software Foundation\Tomcat 6.0”
Still within the “Preference” tab expand the “Tomcat” tab by clicking on the left hand side of the tab and within the “Tomcat base” indicate the path where Tomcat is to be located at either “Directory path where you installed Tomcat\Apache Software
Foundation\Tomcat 6.0” or if you used the default path provided by Tomcat then the path would be “C:\Program Files\Apache Software Foundation\Tomcat 6.0”. Now select “Apply” to confirm the changes.
Now select the “JVM Setting” within the “Tomcat” tab and select from the drop down menu for JRE to be the JDK that we added earlier. Now select “Apply” to confirm the changes and then select “OK”.
You do not need to complete the “Tomcat Manager App” as this was already specified during the installation of Apache Tomcat. However, if you are not able to login to the “Apache Tomcat Manager” which is shown later in this section, then you may return to “Tomcat Manager App” and fill in a username and password to gain access. Select “OK” to exit the “Preferences” window.
Tomcat can be activated and deactivated either inside or outside of Eclipse. The advantage of controlling this functionality through Eclipse is to utilize Eclipse’s
debugging features. Therefore, it is very beneficial to use the Sysdeo plug-in and the following step will indicate how to setup and test the plug-in. After installing the Sysdeo plug-in the following menu should have appeared in the menu bar and new icons should have appeared in the tool bar:
If this is not the case, then to add these changes to the menu and tool bar go to “Window→Customize Perspective” and the following window will be presented.
In the “Tool Bar Visibility” tab within “Tool Bar Structure” make sure the “Tomcat” field has a check mark inside the box as shown in the figure above. Selecting the “Menu Visibility” tab, within the “Menu Structure” make sure the “Tomcat” field has a check mark inside the box:
Selecting the “Command Groups Availability” tab, within the “Available command groups” make sure the “Tomcat” field has a check mark inside the box and then select “OK” to exit:
Now it is time to test the Sysdeo plug-in and verify that Tomcat can be enabled and disable through Eclipse. To enable Tomcat, select the following icon from the “Tool Bar”:
This will cause an output in the “Console” tab indicating that Tomcat is operational:
To confirm this is true, using a web browser (IE, Firefox, Google Chrome, Safari, etc.) enter in the following web address http://localhost:8080/. The following web page should be presented which indicates that Tomcat is now running:
To access “Apache Tomcat Manager”, under “Administration” select “Tomcat Manager”. This will present a new window asking for a username and password. Enter the
username and password that was chosen during the installation of Apache Tomcat:
The following administrative page will be presented where information about the computer system along with deployed running web applications:
To stop Tomcat, select the following icon from the “Tool Bar”:
Output will be shown in the “Console” of Eclipse similar to starting Tomcat to indicate that Tomcat has shutdown.
To restart Tomcat, select the following icon from the “Tool Bar”:
Output will be shown in the “Console” of Eclipse similar to starting Tomcat to indicate that Tomcat has restarted.
The procedure outlined here for the EMR source can be repeated for the VT and UDDI source. Download the source for the EMR WAR file (emr.war) from the MACSeie project zip file
Unzip EMRJavaSystem-Binaries+DB.zip file, you can find the emr.war, osdsf.war, and uddirep.war
In the Tomcat Manager under “WAR file to deploy” select the browse button and locate the emr.war file then select “Deploy” to add the EMR source to the Tomcat server. This will extract all files from the WAR file and enable the EMR system for use. The EMR, VT and UDDI are located in the webapps directory of Tomcat at “C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps” Repeat these steps for the VT and UDDI:
If the deployment process failed with error like “No projects are found to import”. This problem is due to no ".project" in war package. You can create a new java project from existing source rather than importing.
Add the EMR, VT, UDDI and CDSSService projects to eclipse by selecting from the menu bar “File→Import”:
This will present a new window to specify what to import. Under the “General” folder select “Existing Projects into WorkSpace” and then select “Next” to continue:
Now the project location must be located. Make sure that the “Select root directory” radio button is selected, select “Browse…” and locate the EMR source folder which should be located at “(Tomcat installation directory)\Apache Software
Foundation\Tomcat 5.5\webapps\”. Select “Finish” to complete the import:
3.4 MySQL
MySQL is a relational database management system (DBMS) that is required for the MacSeie to operate properly. Download the latest version of “MySQL Community Server” from http://dev.mysql.com/downloads/
Make sure to select the “Windows” platform and download the “Windows MSI Installer (x86)” as this will provide a wizard to make installation easier:
Execute file “mysql-installer-community-x.x.xx.x” (x represents the version number) and follow the on-screen instructions by accepting the start of the installation wizard by selecting “Next”:
Place a check in the check box for “Install As Windows Service”, create a name for the new Windows service or leave the default “MySQL” and check “Launch that MySQL Server automatically”. When ready select “Next” to continue:
Place a check in the check box for “Modify Security Settings” and enter “123456” as the new root password. This will allow login with the new password entered with “root” username. When ready select “Next” to continue:
A summary page will be presented to indicate that configuration of the system is ready to start. When ready select “Execute” to continue:
When configuration is complete select “Finish” to exit.
Now you can
install the
MySql
Workbench from MySql Installer application by selecting Add/Modify Products and Features. MySql workbench is a GUI Tools for Windows allows you to access databases.
Then select Application tab to install MySql workbench CE5.2
The
procedure outlined
EMR database can be repeated for the VT and UDDI databases. Download the backup schema for the EMR database (MACSeie-EMR.sql) from the MACSeie zip folder. To import the database we need to use the MySQL workbench application then by connecting to the local instance MYSQL.
After connected to the local instance, restore the database open the backup file
(MACSeie-EMR.sql) by selecting “File→Open Script…”. Search for the location of the backup file and select “Open”:
Then we execute the script to build up the EMR database instance.
Repeat these steps for the VT and UDDI databases. Finally the J Connector is required for the EMR, VT and UDDI to access their corresponding databases. Download the ZIP version of J Connector from http://dev.mysql.com/downloads/connector/j/:
J Connector is in a compressed ZIP file so any extraction software that can handle ZIP files such as WinZip (www.winzip.com) or WinRar (www.rarlabs.com) are required. Using the extraction software, extract the files and copy “mysql-connector-java-x.x.x-bin.jar” (x represents the version number) into the common lib directory of Tomcat at “(Tomcat installation directory)\Apache Software Foundation\Tomcat 5.5\common\lib\”:
In Eclipse make sure to include “mysql-connector-java-x.x.x-bin.jar” into the build path of the project by selecting the project from the package explorer then select
“File→Properties” or right click on the project in the package explorer and selecting “Properties”. In the properties window select “Java Build Path” then the “Libraries” tab.Confirm that the “mysql-connector-java-x.x.x-bin.jar” is present:
If not, then select “Add External JARs…” and locate the “mysql-connector-java-x.x.x-bin.jar” which from a previous step above should be located in the common lib directory of Tomcat at “(Tomcat installation directory)\Apache Software Foundation\Tomcat 6.0\lib\”:
3.5 Axis2
Axis2 is an implementation of the Simple Object Access Protocol (SOAP) that is required for web service implementation. Download the latest WAR file version of Axis2 from http://ws.apache.org/axis2/download.cgi:
Using a web browser, (IE, Firefox, Google Chrome, Safari, etc.) enter the following web address http://localhost:8080/ to access the Tomcat server home page:
Under “Administration” select “Tomcat Manager”. This will present a new window asking for a username and password. Enter the username and password that was chosen during the installation of Apache Tomcat:
The following administrative page will be presented where information about the server along with deployed running web applications:
In the Tomcat Manager under “WAR file to deploy” select the browse button and locate the axis2.war file then select “Deploy” to add Axis2 to the Tomcat server. This will extract all files from the WAR file and enable Axis2 for use. Axis2 is located in the webapps directory of Tomcat at “(Tomcat installation directory)\Apache Software Foundation\Tomcat 5.5\webapps\”:
To confirm that Axis2 is available, in a web browser (IE, Firefox, Google Chrome, Safari, etc.) enter in the following web address http://localhost:8080/axis2. The following web page should be presented which indicates that Axis2 has been deployed:
Verify that Axis2 is running properly select the “Validate” link from the Axis2 web page above. This will check to make sure all necessary resources are available. The following page shows a successful validation. Note the statements that core Axis2 libraries are present and Axis version service is found:
Download the CDSSService.aar file from
(http://www.cas.mcmaster.ca/~ehealth/cas/downloads.html). Now to upload a service select the “Administration” link from the Axis2 home page. The following administration login page is shown. Enter the default login information (username: admin password: axis2) and select “Login” to continue:
After successful login, the Axis2 administration page will be presented. Select the “Upload Service” link:
The following service upload page will be shown. Select “Choose File” and browse to the location of CDSSService.arr. When finished select “Upload”:
Notification of the new service will be shown. To verify that the new service has been uploaded successfully, from the Axis2 home page select “Services”. This will show all services that are available and running. Verify that the “CDSSService” service is present and active:
3.6 Testing MACSeie
To test that MACSeie is available and working, make sure that Tomcat is online and running. In a web browser (IE, Firefox, Safari, etc.) enter the following URL
3.7 Login
To logon to the system, insert the user name as admin, the password id admin and the second level passcode as 123456.
You may face a logon problem like “Access denied for user 'root'@'localhost' (using password: NO)” .To solve this problem simple open daobak.xml file in
org.osdsf.persistence.dao from EMR project and modify the root password to match the root password in you MySQL database.
Once you successes logon, try to execute a query by inserting a ALIM in the search box and selecting the name as search criteria. If you error once you click on search, for example: “Unable to perform query: P.DOBDATE is not found”. Then in this case you need to access the EMR database and execute th following script:
ALTER TABLE emr.patient ADD DOBDATE int
AFTER DOBDAY;