OSRMT Installation Document Ver 1.8 - June 2019
OSRMT Installation Document Ver 1.8 - June 2019
Installation Manual
Version 1.8
June 2019
Revision History
Date Version Description Author
2.4 Complicated installation option - Desktop Application with centralized server. .................... 7
3. Create and Install new database ................................................................................... 8
3.1 Setup database environment ............................................................................................. 8
3.2 Mysql ................................................................................................................................. 8
3.2.1 Create OSRMT Database ....................................................................................................................... 8
3.2.2 Create Schema ...................................................................................................................................... 9
3.2.3 Create User ........................................................................................................................................... 9
3.3 Oracle ................................................................................................................................ 9
3.3.1 Download and install Oracle ................................................................................................................. 9
3.3.2 Create User/Schema ............................................................................................................................. 9
3.3.3 Create Schema Tables and Views ......................................................................................................... 9
3.3.4 Create database tables and indexes ................................................................................................... 10
3.3.5 Create database views ........................................................................................................................ 10
This solution was initially built in 2006. However no further development happened for many years.
In 2019, the redevelopment was initiated by Alan Clifford and a new version (Version 1.6) was
released in Feb 2019 at GitHub. The latest Version is 1.8 that was released in June 2019. This can be
accessed through https://github.com/osrmt/osrmt
It also provides guide lines on installing and using various databases with OSRMT.
2 Tier Architecture where the Application connects directly to a Database and has the following
installation options
Single user installation where the Database and Application resides in the same computer
Multi user installation where the Database is centralised and Application resides in computer of
every user.
3 Tier Architecture where the Application connects to the Database through the J2EE server and has
the following installation options
Multi user installation with Central database and web browser clients
2. Installation
From here you can use desktop application as is, proceed to step 5. If you want to set up
specific database for it, follow step 4.
By default app uses MS Access DB which doesn’t need any additional configurations, just
proceed to step d.a, but if you want to use one of the following DBMS: MySQL, Oracle,
Postgres - go inside extracted folder and follow Install Database steps before first start.
execute ./run.sh
TIPS
For the 2 Tier single user installation
OSRMT server is not required
Separate Java installation may not be required
2.3 Setting up 3 Tier Application (Windows) (Server Application with Web GUI)
From here you can use web application as is, proceed to step 5. If you want to set up specific
database for it, follow step 4.
By default, OSRMT application uses MS Access DB which doesn’t need any additional configurations.
You can directly proceed with the installation.
However, if you want to use a different database, you can use MySQL, MS SQL, Oracle or Postgres.
To use any of the above data bases, please go inside extracted folder and follow Install Database
steps before starting the installation.
enter jboss-4.0.3/bin
execute ./run.sh
Once the application is deployed in JBoss server on 8080 port, it will be accessible locally using the
url: http://localhost:8080/osrmt
TIP
In case you want to use another port
Go to jboss-4.0.3/server/default/deploy/jbossweb-tomcat55.sar and update
port in file server.xml.
Server restart is needed after this action.
This section is optional if you do want to use some specific database from the following list: MySQL,
MS SQL, Oracle, PostgreSQL
The login consists of a username and password which allows access to the database.
The login consists of a username and password which allows access to the database.
3.2 Mysql
3.2.1 Download and install MySQL 5.0 or higher
Download and install MySQL 5.0 or higher from the following Link
https://dev.mysql.com/downloads/
Install MySQL (make sure to remember root user and password to be able to connect to DB after
installation finishes)
show databases;
3.2.2 Create Schema
From the command line execute the create schema and create view script source <path>
connect osrmt;
connect osrmt;
>source <schema_path>\mysql_create_schema.sql
>source <schema_path>\mysql_create_view.sql
ignore warning message when dropping view ERROR 1051 (42S02): Unknown table
'osrmt.artifactdetail'
3.3 Oracle
3.3.1 Download and install Oracle
Install Oracle Express and create a database instance. For more details refer to Database Express
Edition Getting Started Guide
default tablespace <some tablespace your choice> temporary tablespace <some tablespace your choice>;
>@<schema_path>\oracle_create_schema.sql
>@<schema_path>\dbscripts\schema\oracle_create_view.sql
TIPS
See the appendix for sample vendor instructions on databases against which OSRMT
has been validated.
3.3.4 Create database tables and indexes
Execute the shipped <db>_create_schema.sql script which can be found in the schema directory e.g.
<schema_path>\oracle_create_schema.sql
<schema_path>/mysql_create_schema.sql etc.
<schema_path>\sqlserver_create_view.sql etc.
TIPS
Ignore any warnings which states that “ the view did not previously exist”
3.4 SQL Server Express Database Setup Notes
Open Microsoft SQL Server Management Studio Express and connect to your SQL Server
instance.
sqlServer_create_view.sql
Copy and paste each create statement to create the views manually one by one.
Enable TCP/IP
Version 1.8
sqlcmd -S.\sqlexpress
1)
Then, type exit and continue.
3.5 PostgreSQL Database Setup Notes
psql command line client, since this should be available under all circumstances.
a user (login role) which is allowed to create users and databases, e.g. postgres
using your favourite tool, e.g. the psql command line client, like:
<schema_path>
in psql: Prompt# \i postgresql_create_user.sql (if you started psql from the same folder where the
scripts lie)
in psql: Prompt# \i postgresql_create_schema.sql (if you started psql from the same folder where
the scripts lie)
postgresql_create_view.sql;
The database with all objects and date and the user (login role) are dropped. Caution: The data are
lost, and would have to be restored from a backup, if there is one!
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------
Run upgrade.bat/sh
0) Exit
The utility checks and will error if the database tables are not empty.
jdbc:mysql://localhost/osrmt?useUnicode=true&characterEncoding=UTF-8
osrmt
mysql
Pressing Y and enter on the last prompt will update the database and return to the configuration
menu.
Instructions to connect the 2 tier application client to the new database
You need the client to connect to the database in order to populate the database with essential
reference data.
Edit connection.xml. You may also delete that file and copy one of the existing connection
<supporteddb>.xml files to become connection.xml. e.g.
The file has a ConnectionProperty section which is repeated once per connection in between
<object> tags.
are presented
Server
com.mysql.jdbc.Driver
com.microsoft.sqlserver.jdbc.SQLServerDrive
r
sun.jdbc.odbc.JdbcOdbcDriver
org.postgresql.Driver
jdbc:sqlserver://localhost;databaseName=os
rmt
(*.mdb)};DBQ=demo.mdb
jdbc:postgresql://localhost/postgres
osrmt
Osrmt
Admin
Osrmt
Note that with version 1.8 the database password is not obscured with 2 tier application client
connection.xml
With the 3 tiered setup you need to set the connection type to J2ee and you do not need to fill out
the database fields.
Note: With the 3 tiered the connection information is stored on the server and not in
“connection.xml”
5. Install the j2ee OSRMT server for a 3 tier configuration
Validate that Java version 8.0 or higher is installed (see previous instructions). Run command line
and execute next command
java -version
you will see Java version currently installed. If Java lower than 1.8 is installed you will need to
upgrade it.
<extracted_directory>\jboss-4.0.3\bin\run.bat
Linux addendum
The default installation of JBoss will configure the server to start listening to Port 1099.
If your OSRMT server is running on a machine different to your client note the IP Address of your
server using ipconfig from the command line.
To change the port the JBoss application server listens on edit the file
<extracted_directory>jboss-4.0.3\server\default\deploy\naming-service.xml
Replace 1099 and possibly 1098 with alternate ports. Make a note of the port 1099 is changed to.
<desktop_app_extracted_folder>\dd\client\jndi.properties
Ensure that java.naming.provider.url is configured with the right IP and port e.g.
java.naming.provider.url=jnp://10.252.168.247:1099
TIP
If you have an existing Application Server, Jboss or otherwise you can deploy
<web_app_extracted_folder>\jboss-4.0.3\bin\run.bat
Note below instead of executing run.bat for desktop app, execute run3tier.bat
Linux addendum
run3tier.bat
Linux addendum
Which will then have the client connect to the server - barring any ip, network, firewall, or other
issues.
Note that if for instance the server fails to connect to the database, the client will log those errors
too - which may seem confusing.
7. Use web GUI working with J2ee server
URL
The URL for clients to connect is http://<host>:8080/osrmt
e.g. http://127.0.0.1:8080/osrmt
8. Troubleshooting
Execute
<extract_folder_path>\run.bat
The login controls, labels and default username are read from the first successful active database in
connection.xml
If there are connection errors in connection.xml, connectivity issues or errors within the database
you can click on the status bar to open the system log.
Alternatively, example the file <extract_folder_path>\system_ details.log The file is binary fixed size
but you can view with a text editor.
You can delete system.log and system_details.log as they will be recreated when needed.
The system log retains all errors within the last 5 minutes starting with the earliest. So please make
sure that you are on the right entry, which is usually the second datalibrary.common.DB entry for
database connectivity issues.
Specifically open the fixed size system_details.log and scroll down to the last few entries. You can
delete both system.log and system_details.log to have the files recreated (don’t delete just one…)
Appendix I – MySQL Database Setup Notes
<object class="com.osframework.datalibrary.common.ConnectionProperty">
<void property="accessSequence">
<int>0</int>
</void>
<void property="active">
<boolean>true</boolean>
</void>
<void property="connectionType">
<string>Jdbc</string>
</void>
<void property="connectToURL">
<boolean>false</boolean>
</void>
<void property="driverClass">
<string>com.mysql.jdbc.Driver</string>
</void>
<void property="environment">
<string>mysql</string>
</void>
<void property="url">
<string>jdbc:mysql://localhost/osrmt</string>
</void>
<void property="unicodeConnection">
<boolean>true</boolean>
</void>
<void property="username">
<string>osrmt</string>
</void>
<void property="password">
<string>osrmt</string>
</void>
</object>
</java>
Appendix II – Oracle Database Setup Notes
<object class="com.osframework.datalibrary.common.ConnectionProperty">
<void property="accessSequence">
<int>0</int>
</void>
<void property="active">
<boolean>true</boolean>
</void>
<void property="connectionType">
<string>Jdbc</string>
</void>
<void property="connectToURL">
<boolean>false</boolean>
</void>
<void property="driverClass">
<string>oracle.jdbc.OracleDriver</string>
</void>
<void property="unicodeConnection">
<boolean>false</boolean>
</void>
<void property="environment">
<string>oracle</string>
</void>
<void property="url">
<string>jdbc:oracle:thin:osrmt/[email protected]:1521:admin</string>
</void>
<void property="username">
<string>osrmt</string>
</void>
<void property="password">
<string>osrmt</string>
</void>
</object>
</java>
Appendix III – MS SQL Server Database Setup Notes
<object class="com.osframework.datalibrary.common.ConnectionProperty">
<void property="accessSequence">
<int>0</int>
</void>
<void property="active">
<boolean>true</boolean>
</void>
<void property="connectionType">
<string>Jdbc</string>
</void>
<void property="connectToURL">
<boolean>false</boolean>
</void>
<void property="driverClass">
<string>com.microsoft.sqlserver.jdbc.SQLServerDriver</string>
</void>
<void property="environment">
<string>sqlserver</string>
</void>
<void property="url">
<string>jdbc:sqlserver://localhost;databaseName=osrmt</string>
</void>
<void property="unicodeConnection">
<boolean>false</boolean>
</void>
<void property="username">
<string>osrmt</string>
</void>
<void property="password">
<string>osrmt1024</string>
</void>
</object>
</java>
Appendix IV – PostgreSQL Database Setup Notes
<object class="com.osframework.datalibrary.common.ConnectionProperty">
<void property="accessSequence">
<int>0</int>
</void>
<void property="active">
<boolean>true</boolean>
</void>
<void property="connectionType">
<string>Jdbc</string>
</void>
<void property="connectToURL">
<boolean>false</boolean>
</void>
<void property="driverClass">
<string>com.mysql.jdbc.Driver</string>
</void>
<void property="environment">
<string>mysql</string>
</void>
<void property="url">
<string>jdbc:mysql://localhost/osrmt</string>
</void>
<void property="unicodeConnection">
<boolean>true</boolean>
</void>
<void property="username">
<string>osrmt</string>
</void>
<void property="password">
<string>osrmt</string>
</void>
</object>
</java>
Appendix V – MySQL and PostgreSQL connectivity
The machine has Debian GNU / Linux 3.1 Sarge (up to dated) with Sun Java 1.5.0_08 packaged in .deb with
java-package.
The Mysql must have UTF8 support. So, it must be 4.1.x or newer.
Also, the OSRMT must work with Postgresql 8.1.x, so installed PostgreSQL 8.1.4_6 from
http://www.backports.org .
allow tcp/ip connections from your test machines addresses (10.200.27.17, 10.200.27.40 are only examples)
and
/etc/postgresql/8.1/main/postgresql.conf snipet:
Code:
#---------------------------------------------------------------------------
#---------------------------------------------------------------------------
# - Connection Settings -
/etc/postgresql/8.1/main/pg_hba.conf snipet:
Code:
# DATAB USER CIDR-ADDRESS METHOD
TYP ASE
E
# IPv4 connections
local :
/etc/mysql/my.cnf
Code:
#bind-address = 127.0.0.1
/etc/hosts.deny
Code:
AFM 26set2006 control over mysql connections in tandem with hosts.allow mysql:ALL
/etc/hosts.allow
Code:
AFM 26set2006 allow only selected IPs. mysql:10.200.27.17 10.200.27.40 127.0.0.1
These settings are not recommended for production servers. They are only enough for evaluation
testing on a non-production critical spare server.
The OSRMT will detect an empty schema and will load data.
Restart it and a log in window with DEMO user will appear. Password is "demo".
If you use only one database, edit connection.xml and REMOVE the unused database parameters.
Appendix VI- Database Installations
MySQL Installation
Download and install MySQL 5.0 or higher from the following Link
https://dev.mysql.com/downloads/
Install MySQL
show databases;
Create Schema
From the command line execute the create schema and create view script source <path>
connect osrmt;
Please ignore warning message when dropping view ERROR 1051 (42S02): Unknown table
'osrmt.artifact detail'
Create Login
Oracle Installation
Download and install Oracle Express Database from the following link
https://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
Create Login
default tablespace <some tablespace your choice> temporary tablespace <some tablespace your
choice>; grant dba to osrmt;
Create Schema
From the command line execute the create schema and create view script source <path>
sqlplus osrmt/osrmt
>@oracle_create_schema.sql
>@oracle_create_view.sql
Execute the shipped <db>_create_schema.sql script which can be found in the schema
directory e.g.
<client directory>\v1_50\client\schema\oracle_create_schema.sql
Execute the shipped <db>_create_view.sql script which can be found in the client schema
directory e.g.
Ignore any warnings that states “the view did not previously exist”