This is a guide to installing and getting started with using Ontopia. It is assumed that the reader is familiar with the basics of the host platform and of Java development. See the *What's new in this release?* document for information about this release.
5.4.0 2022-10-20
The most important requirement is that you must have the Java Software Development Kit (SDK) version 1.8 or newer. There should be no platform dependencies in the code, so the software should run on all operating systems for which there is a supported JDK available.
We have verified that the Navigator Framework runs in Tomcat versions 7, 8 and 9. It is quite likely that the framework also works in other application servers than these, but this has not been verified.
The RDBMS backend has been verified to work with Oracle 8.1.7, 9i, and 10g, PostgreSQL 8.1, 8.2 and 8.3, MySQL 5.0, H2 Database 1.0.74 and Microsoft SQL Server 2005.
Ontopia has the following components:
The first step in the installation is to uncompress the distribution file, which you have presumably already done, since you are reading this document. The topmost directory created by uncompressing the distribution, the file called ontopia-X.X.X.zip
, will from now on be referred to as basedir
.
If you want to use the Ontopia APIs to write Java software, or just run the test suite, you will have to set up the CLASSPATH
environment variable. If you only want to run the Navigator Framework this is not necessary, and you can skip this section.
To set up the CLASSPATH
, put the ${basedir}/lib/ontopia-engine-x.y.x.jar
file in your CLASSPATH
(Change x.y.z to your Ontopia version). If this does not work, or you want more detailed control over the jar files being used, please see Details about CLASSPATH setup.
Note The jar-file automatically includes the other required jar-files for you via its manifest. In practice this means that you normally need not put the other jar-files on your
CLASSPATH
explicitly, but they all have to be located in the same directory for this to work.Warning There may be some Java Virtual Machines out there that do not support the new CLASSPATH jar-file manifest header. If that is the case you’ll have to add all the individual jar-files to your CLASSPATH.
Now that you’ve set up your CLASSPATH
environment variable you can verify it by issuing the following command:
java net.ontopia.Ontopia
It will run and produce the following output if it can find all the classes required:
Ontopia Topic Maps Engine [version]
Success: All required classes found.
If it fails you will get output similar to the following:
Ontopia Topic Maps Engine [version]
Class 'org.apache.log4j.BasicConfigurator' not found. Please add log4j.jar to your CLASSPATH.
The message is hopefully self-explanatory.
Since Ontopia 5.2.0, testing is automatically done during creation of the distribution. It is no longer needed to run the test suite yourself. If you are experiencing problems, please report an issue at Ontopia @ Github including:
CLASSPATH
when you ran the tests,java -version
, andjava net.ontopia.Ontopia
.See the The RDBMS Backend Connector - Installation Guide document for information about how to install and setup the relational database backend. Note that it’s possible to run Ontopia and the web applications without using the RDBMS backend.
Following is a short introduction to the end-user applications that come with Ontopia.
For more information about developing with Ontopia you can find a complete list of developer documentation here.
The engine consists of an SDK and some command-line utilities, and so there is little that can be done with it apart from developing applications on top of it.
To get started with application development we recommend that you start by reading the developer’s guide. Once you have read that we recommend that you use the javadocs in ${basedir}/doc/api
to learn the details of the APIs.
You can find example topic maps in the ${basedir}/apache-tomcat/webapps/omnigator/WEB-INF/topicmaps
directory, which contains topic maps in the XTM 1.0, 2.0, CTM, and LTM formats.
The engine comes with a collection of command-line utilities, which can be used to perform various tasks on topic maps. The command-line options of the utilities are not given here, but explanations can be had by running the utilities with no arguments.
Ontopia comes with a number of useful web applications built with Ontopia already set up and configured in a Tomcat installation. The main applications are:
${basedir}/apache-tomcat/webapps/ontopoly/doc/user-guide.html
${basedir}/apache-tomcat/webapps/omnigator/docs/navigator/userguide.html
Try out these web applications by following these steps:
${basedir}/apache-tomcat/bin
directory in Windows Explorer.startup.bat
file.${basedir}/apache-tomcat
.bin/startup.sh
script.After starting the application server it will take a few seconds before the server is initialized and ready to answer requests.
If the application server fails to start correctly you may have to set the JAVA_HOME
environment variable to point to the directory where the Java Runtime Environment is installed. This can be done either at the command-line before running the tomcat startup script, or by editing the script to insert a line setting it. See Setting JAVA_HOME for details.
To try out Ontopia you can use any of the applications listed below. The first time you’re accessing a page it may take some time since the web application server needs to compile the JavaServer Pages. If you are able to see the front page of the application then the installation is successful. Congratulations!
Warning Internet Explorer Users: Please note that IE 5.0 may not be able to connect to the application server if you are working ‘Offline’.
shutdown.bat
.${basedir}/apache-tomcat
.bin/shutdown.sh
script.This section contains answers to frequently asked questions about Ontopia.
Not Found (404)
followed by Original request: /navigator/models/index.jsp
and Not found request: /navigator/views/template_no_frames.jsp
when accessing the Omnigator you have used a decompression tool that truncates file names when unpacking files.startup.bat
, then either make an icon and set it up as described above, or try the option below.)startup.bat
so that the line near that end that now reads:startup.bat
from the command-line you should get the error messages there.${basedir}/apache-tomcat/logs/localhost_log.<date>.txt
, and it is likely to contain much detail information on errors. You can try to decipher this file to find the cause of the problem, or if that is difficult, you can just send the file to us at support@ontopia.net, and we will try to help. Note that if the file doesn’t exist it means the server has been unable to start and you should try one of the two options above to find out why.ontopia-tests.jar
and junit.jar
, from ${basedir}/lib
to ${tomcat.home}/common/lib
.${basedir}/apache-tomcat/webapps/omnigator
to the other Tomcat installation.Ontopia has the following jar-file dependencies. The files can be found in the ${basedir}/lib
directory.
Topic Map Engine:
crimson.jar
, version 1.1.3, (Apache XML - Crimson)getopt.jar
, version 1.0.9, (GNU Java getopt)slf4j-api.jar
, slf4j-log4j12.jar
, jcl-over-slf4j.jar
version 1.5.8, (Simple Logging Facade for Java (SLF4J))log4j.jar
, version 1.2.14, (Apache log4J)antlr.jar
, version 2.7.7, (ANTLR parser generator)commons-collections.jar
, version 3.2.1, (Apache Commons Collections)oro.jar
, version 2.0.8, (Apache Jakarta ORO)jing.jar
, version 2003-01-31, (Jing - A RELAX NG validator in Java)xerces.jar
, version 2.7.1, (Apache Xerces2 Java Parser)jena.jar
, version 2.3, (Jena - A Semantic Web Framework for Java)icu4j.jar
, version 3.4.4, (International Components for Unicode for Java)concurrent.jar
, version 1.3.4, (util.concurrent)trove.jar
, version 2.0.4, (GNU Trove)tmapi.jar
, version 2.0 a2, (TMAPI - Common Topic Maps Application Programming Interface)Vizigator:
touchgraph.jar
, built from source with patches, (TouchGraph)Web Editor Framework:
velocity.jar
, version 1.3, (Apache Velocity)commons-fileupload.jar
, version 1.3, (Apache Commons FileUpload)Full-text Integration:
lucene.jar
, version 1.4.3, (Apache Lucene)DB2TM:
opencsv.jar
, version 1.8, (opencsv)TMRAP (AXIS+SOAP support):
${basedir}/apache-tomcat/webapps/tmrap/WEB-INF/lib
.RDBMS Backend Connector:
commons-pool.jar
, version 1.3, (Apache Commons Pool)commons-dbcp.jar
, version 1.2.2, (Apache Commons DBCP)jgroups-all.jar
, version 2.6.10 GA, (JGroups - A Toolkit for Reliable Multicast Communication)The Query Engine and the Schema Tools require no jar files beyond the ones needed for the Topic Map Engine.
Java system properties are set by using a command-line argument to the java
command when it is run. The command java -D<prop>=<value> ...
will set Java system property <prop>
to <value>
.
Tomcat is usually started using the Tomcat startup scripts, and so one needs to modify these in order to be able to pass command-line arguments to the Java runtime. Below is explained how to do this on Windows and Unix:
${basedir}/apache-tomcat/bin/catalina.bat
file and insert the line below near the top of it.set CATALINA_OPTS="-D<prop>=<value>"
${basedir}/apache-tomcat/bin/catalina.sh
file and insert the line below near the top of it.CATALINA_OPTS="-D=<prop>=<value>"
Warning Note that by default there should be no need to specify any system properties to get Ontopia working.
This section explains how to set the JAVA_HOME
environment variable on Windows.
If you start tomcat from the command-line you can give the command set JAVA_HOME=c:\path\to\java
before starting the application server. Please replace c:\path\to\java
with the path to your Java installation (for example c:\jdk1.5.0_13
), make sure that you have not accidentally put the bin
sub directory into the JAVA_HOME
environment variable.
On Windows NT, 2000, and XP you can also go into the control panel, select ‘System’, then click the ‘Advanced’ tab, then click ‘Environment variables’. This gives you a window where you can enter a new environment variable named ‘JAVA_HOME’, the value of which must be the directory where you installed Java.
On Windows 95/98/ME you can also edit the AUTOEXEC.BAT
file in the root directory of your startup drive (usually C:
) and insert a line like the following into it: set JAVA_HOME=c:\path\to\java
. You will then need to reboot your computer before the change takes effect.