SwiftOWLIM Installation

Skip to end of metadata
Go to start of metadata
Search

OWLIM Documentation

All versions

OWLIM 5.1 (latest)
OWLIM 5.0
OWLIM 4.3
OWLIM 4.2
OWLIM 4.1
OWLIM 4.0
OWLIM 3.5 (this version)

This section is for users and system administrators that are unfamiliar with the SwiftOWLIM semantic repository software. The information contained in the following pages should be enough to get started with SwiftOWLIM, i.e. to install and configure the software so that repository instances can be created and used.

Usage scenarios

SwiftOWLIM is packaged as a Storage and Inference Layer (SAIL) for the Sesame RDF framework . SwiftOWLIM can be used in two different ways: One approach is to integrate it in an application using it as a library. An example of doing this is given in the 'getting-started' folder of the SwiftOWLIM distribution zip file. Users intending to use SwiftOWLIM in this way do not need to install the Sesame Web applications (Server and Workbench) and must only set a few environment variables as detailed in the SwiftOWLIM user guide in the section covering the getting-started example application.
Those users wishing to use SwiftOWLIM via the Sesame Server, with or without the Sesame Workbench, should proceed with the approach detailed in this section. This will cover installing Sesame and integrating SwiftOWLIM in to the Sesame framework so that SwiftOWLIM can be used as a plug-in repository type. This approach involves deploying Sesame/SwiftOWLIM via an application server, such as Tomcat. The Sesame installation comes with a useful 'workbench' Web application that can be used for many administration tasks.
The rest of this section gives detailed step by step instructions for installing and configuring Sesame and SwiftOWLIM, leading up to the creation of a SwiftOWLIM repository using the Sesame console (a command line script). For more information please check the "doc" folder of the SwiftOWLIM distribution zip file.

Third party software

This guide covers the installation of SwiftOWLIM . Required software for this comprises:

Another application server can be used instead of Tomcat. However, the rest of this guide will describe the installation of SwiftOWLIM with this software.

No part of this guide is intended to supersede the documentation published with these 3rd party software components and the reader is strongly advised to familiarise himself/herself with these.

Preparation

A suitable application server must be installed. The examples in this guide assume Apache Tomcat version 6.x is used. Importantly, the user must have sufficient privileges to write to the Tomcat webapps directory and to stop and start the Tomcat daemon.
The Aduna OpenRDF Sesame framework version 2.x is required. The examples in this guide use version 2.3.2.
A SwiftOWLIM distribution is required. This is published as a zip file. The examples in this guide use version 3.5.

Installation

Assuming that an instance of Tomcat is available, the installation proceeds as follows:

  • Install and deploy Sesame
  • Install SwiftOWLIM and deploy the SwiftOWLIM jar file
  • Add the SwiftOWLIM repository template file to the Sesame console configuration
  • Use the Sesame console to create a new repository.

Step by step (vanilla)

  • Locate the Tomcat webapps directory (see section 5.4.1), hereafter called [WEBAPPS].
  • Unzip the Sesame 2 distribution zip file. The Sesame 'root' directory will be called [SESAME].
  • Unzip the SwiftOWLIM distribution. The top level unzipped directory will be called [SWIFTOWLIM].
  • Deploy the Sesame Web applications by copying the war files in [SESAME]/war to [WEBAPPS].
Alternatively, use the Tomcat manager interface at http://localhost:8080/manager/html to deploy the Web applications. If this approach is used then ensure that a manager user account exists. The following lines should be added to: [tomcat-directory]/conf/tomcat-users.xml substituting your own password:

* Copy the SLJ4J logger libraries from the Sesame Server to the Sesame Workbench application, i.e. from [WEBAPPS]/openrdf-sesame/WEB-INF/lib/logback-* to [WEBAPPS]/openrdf-workbench/WEB-INF/lib

  • Restart Tomcat
  • Run the Sesame console once to create its configuration directory by executing [SESAME]/bin/console.sh (.bat) and then type quit. at the commend prompt. Locate the data directory here:
    $HOME/.aduna/openrdf-sesame-console* (linux/unix)
    "%APPDATA%\Aduna\OpenRDF Sesame console" (Windows)
    
  • Create the 'templates' folder here and copy the SwiftOWLIM repository template to it. This file is found here: [SWIFTOWLIM]/templates/swiftowlim.ttl
  • Copy SwiftOWLIM and TRREE jar files to Sesame console and Sesame server, i.e. from [SWIFTOWLIM]/lib to [SESAME]/lib and [WEBAPPS]/openrdf-sesame/WEB-INF/lib
  • Restart Tomcat
  • Run the Sesame console [SESAME]/bin/console.sh (.bat)
  • Connect to the local Sesame server with: connect http://localhost:8080/openrdf-sesame.
    Create a new repository: create swiftowlim.
    Accept all the default values and then exit the console: quit.

The status of the new repository can be checked using the Sesame workbench. Type the following URL in to a browser:

http://localhost:8080/openrdf-workbench

Step by step (Fedora linux)

  • Login as root and ensure that tomcat is running:
    service tomcat6 status
  • Unzip the Sesame 2 installation:
    unzip openrdf-sesame-2.3.2-sdk.zip
  • Deploy the Sesame Web applications (Sesame server and workbench):
    cp openrdf-sesame-2.3.2/war/*.war /var/lib/tomcat6/webapps
  • Copy the logback logging libraries:
    cp /var/lib/tomcat6/webapps/openrdf-sesame/WEB-INF/lib/logback-\* /var/lib/tomcat6/webapps/openrdf-workbench/WEB-INF/lib/
  • Restart Tomcat:
    service tomcat6 restart
  • Run the Sesame console once to create the data/configuration directory:
    openrdf-sesame-2.3.2/bin/console.sh
  • And exit:
    quit.
  • Create the Sesame console's templates directory:
    mkdir $HOME/.aduna/openrdf-sesame-console/templates
  • Unzip the SwiftOWLIM distribution:
    unzip swiftowlim-3.5.zip
  • Copy the SwiftOWLIM repository template file to the Sesame console templates directory:
    cp swiftowlim-3.5/templates/swiftowlim.ttl $HOME/.aduna/openrdf-sesame-console/templates/
  • Copy the SwiftOWLIM and TRREE jar files to the Sesame console and Sesame server lib directories:
    cp swiftowlim-3.5/lib/owlim-3.5.jar openrdf-sesame-2.3.2/lib/
    cp swiftowlim-3.5/lib/trree-3.5.jar openrdf-sesame-2.3.2/lib/
    cp swiftowlim-3.5/lib/owlim-3.5.jar /var/lib/tomcat6/webapps/openrdf-sesame/WEB-INF/lib
    cp swiftowlim-3.5/lib/trree-3.5.jar /var/lib/tomcat6/webapps/openrdf-sesame/WEB-INF/lib
    

    *Restart Tomcat:

    service tomcat6 restart
  • Run the Sesame console to create a new repository:
    openrdf-sesame-2.3.2/bin/console.sh
  • Connect to the Sesame server:
    connect http://localhost:8080/openrdf-sesame .
  • Create a new repository:
    create swiftowlim.
  • At this point values for a number of parameters are asked for, but all the defaults can be accepted pressing <return> for each question. When finished, the message 'Repository created' should be displayed, so exit the console: quit.
  • The status of the new repository can be checked using the Sesame workbench. Type the following URL in to a browser:
    http://localhost:8080/openrdf-workbench
  • Alternatively, execute a test query against the Sesame Server's SPARQL endpoint:
    curl 'http://localhost:8080/openrdf-sesame/repositories/swiftowlimTest?infer=false&queryLn=sparql&
    query=SELECT+*+WHERE+%7B?s+?p+?o%7D+LIMIT+100'
    

Step by step (Windows)

  • Unzip the Sesame 2 installation (note that this might require WinZIP, WinRAR or some other utility):
    unzip openrdf-sesame-2.3.2-sdk.zip
  • Deploy the Sesame Web applications (Sesame server and workbench):
    copy openrdf-sesame-2.3.2\war*.war "C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps"
  • Restart Tomcat using the Tomcat monitor icon in the system tray or from the Start menu
  • Run the Sesame console once to create the data/configuration directory:
    openrdf-sesame-2.3.2\bin\console.bat
  • And exit with:
    quit.
  • Create the Sesame console's templates directory:
    mkdir "%APPDATA%\Aduna\OpenRDF Sesame console\templates"
  • Unzip the SwiftOWLIM distribution:
    unzip swiftowlim-3.5.zip
  • Copy the SwiftOWLIM repository template file to the Sesame console templates directory:
    copy owlim-3.5\templates\swiftowlim.ttl "%APPDATA%\Aduna\OpenRDF Sesame console\templates"
  • Copy the SwiftOWLIM and TRREE jar files to the Sesame console and Sesame server lib directories:
    copy swiftowlim-3.5\lib\owlim-3.5.jar openrdf-sesame-2.3.2\lib
    copy swiftowlim-3.5\lib\trree-3.5.jar openrdf-sesame-2.3.2\lib
    copy swiftowlim-3.5\lib\owlim-3.5.jar "C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\openrdf-sesame\WEB-INF\lib"
    copy swiftowlim-3.5\lib\trree-3.5.jar "C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\openrdf-sesame\WEB-INF\lib"
    
  • Restart Tomcat using the Tomcat monitor icon in the system try or from the Start menu
  • Run the Sesame console to create a new repository:
    openrdf-sesame-2.3.2\bin\console.bat
  • Connect to the Sesame server:
    connect http://localhost:8080/openrdf-sesame .
  • Create a new repository:
    create swiftowlim.
  • At this point values for a number of parameters are asked for, but all the defaults can be accepted pressing <return> for each question. When finished, the message 'Repository created' should be displayed, so exit the console:
    quit.
  • The status of the new repository can be checked using the Sesame workbench. Type the following URL in to a browser:
    http://localhost:8080/openrdf-workbench

Useful information

Tomcat

When running on Fedora linux, Tomcat uses the following directories:

Contents Directory
Log files /var/log/tomcat6/
Web applications /var/lib/tomcat6/webapps
Sesame configuration and repository data files /usr/share/tomcat6/.aduna

On a machine running Windows, Tomcat uses the following directories:

Contents Directory
Log files C:\Program Files\Apache Software Foundation\Tomcat 6.0\logs
Web applications C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps
Sesame configuration and repository data files C:\Users\<username>\AppData\Roaming\Aduna

Sesame

The Sesame framework is published as a zip file that is installed simply by unzipping it in to the target directory. This directory is called [SESAME_INSTALL] in this guide.
When running, Sesame stores configuration and repository data in the following directory:

$HOME/.aduna/ On linux/unix operating systems.
%APPDATA%\Aduna On Windows machines. Note that if Sesame is running as a service then the full path will be:
C:\Documents and Settings\LocalService\Application Data\Aduna

This directory is called [ADUNA_DATA] elsewhere in this guide. It can be overridden by setting a Java system property. When using Tomcat, this can be achieved by setting the JAVA_OPTS environment variable, for example (linux and Windows respectively):

export JAVA_OPTS='-Dinfo.aduna.platform.appdata.basedir=/other/dir/'
set JAVA_OPTS=-Dinfo.aduna.platform.appdata.basedir=\other\dir\

Note that setting this environment variable must be done by the same user that runs the Tomcat server. This may not be the case when using 'sudo' to set up/start Tomcat, for instance when using port numbers below 1024 when it is necessary to run Tomcat with root privileges.
The Sesame 2 framework uses a special SYSTEM repository to store its configuration data. Do not store anything else in this repository.
The workbench Web application can be used for many administrative tasks, but it is still experimental. The easiest method to create new repositories is to use the Sesame Console script, which can be found in the bin directory: [SESAME_INSTALL]/bin/console.bat (.sh for linux/unix)

All commands entered using the console must end in a dot '.', e.g. 'help.'

Logging

The Sesame server and workbench use logback for logging. The Sesame server logs to:

[ADUNA_DATA]/openrdf-sesame/logs/main.log

And the Workbench logs to:

[ADUNA_DATA]/openrdf-workbench/logs/main.log

The default log level is INFO, but this can be adjusted after the first run by editing:

[ADUNA_DATA]/openrdf-sesame/conf/logback.xml

There is a note in the Sesame documentation that the simple logging framework for java (slf4j) is used, which implies that a bridge jar for the logging framework OWLIM uses is also required, e.g. SLF4J-to-log4j.jar

Common Problems

Can not copy SwiftOWLIM jar file to the Sesame WEB-INF/lib directory.

This directory will not exist until the Sesame war files have been deployed to the [WEBAPPS] directory AND Tomcat is running. If the war files have been deployed, but the directory does not exist, try restarting Tomcat.

Can not connect the Sesame console to the local Sesame server at http://localhost:8080/openrdf-sesame

Make sure that the Sesame war files have been deployed and that Tomcat is running. Restart Tomcat if necessary.

Can not create a SwiftOWLIM repository using the Sesame console

Make sure that the repository template file [SWIFTOWLIM]/templates/swiftowlim.ttl has been copied to the 'templates' subdirectory of the Sesame console's data directory.

Can not create a SwiftOWLIM repository, the Sesame console says unknown Sail type – owlim:Sail

The Sesame console can not find the SwiftOWLIM jar file. Make sure it was copied from [SWIFTOWLIM]/lib to the Sesame installation folder here: [SESAME]/lib

Cannot use my custom rule file (pie file), an exception occurred

Custom rule files require the use of a Java Development Kit (JDK) version 1.6 or higher, due to the mechanism used to locate the Java compiler. Furthermore, the application (application server) must be started with the Java Virtual Machine (JVM) that comes with this JDK.

A repository can be created using the openrdf console, but any operation using this repository results in a long error message

Make sure that both the OWLIM and the separate TRREE jar files have been copied to the Sesame Web application's WEB-INF/lib directory. If only the OWLIM jar is copied, then this is enough to create a repository, but the repository cannot be used without the TRREE jar file.

Sesame Workbench starts, but gives memory error on the 'explore' and 'query' menus

The maximum heap space must be increased, i.e. Tomcat's Java virtual machine must be allowed to allocate more memory. This can be done by setting the environment variable 'CATALINA_OPTS' to include the desired value, e.g. -Xmx1024m

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.