GraphDB-SE Installation

compared with
Current by Dimitar Manov
on Sep 18, 2014 19:02.

This line was removed.
This word was removed. This word was added.
This line was added.

Changes (51)

View Page History
h1. Upgrading

In most cases, upgrading GraphDB-SE can be achieved simply by replacing the GraphDB and bundled 3rd party jar files. The required version of the Sesame framework for the recent GraphDB OWLIM versions is given in the following table:

|| OWLIM/GraphDB version || Required Sesame version ||
| GraphDB-SE 5.4 | Sesame 2.7 |
| GraphDB-SE 6.0 | Sesame 2.7.8 + new index format (autoupgraded) - the same for Owlim 5.5|
| OWLIM-SE 5.5 | Sesame 2.7.8 + new index format (autoupgraded)|
| OWLIM-SE 5.4 | Sesame 2.7.8 |
| GraphDB-SE OWLIM-SE 5.3 | Sesame 2.6.7\+ |
| GraphDB-SE OWLIM-SE 5.2 | Sesame 2.6.7\+ |
| GraphDB-SE OWLIM-SE 5.1 | Sesame 2.6 |
| GraphDB-SE OWLIM-SE 5.0 | Sesame 2.6 |
| GraphDB-SE OWLIM-SE 4.3 | Sesame 2.6 |
| GraphDB-SE OWLIM-SE 4.2 | Sesame 2.5 |
| GraphDB-SE OWLIM-SE 4.1 | Sesame 2.4 |
| GraphDB-SE OWLIM-SE 4.0 | Sesame 2.4 |
| BigGraphDB BigOWLIM 3.5 | Sesame 2.3 |
| BigGraphDB BigOWLIM 3.4 | Sesame 2.3 |
| BigGraphDB BigOWLIM 3.3 | Sesame 2.3 |
| BigGraphDB BigOWLIM 3.2 | Sesame 2.3 |
| BigGraphDB BigOWLIM 3.1 | Sesame 2.2 |

Typically, Sometimes, the binary format of the storage files for different versions of BigGraphDB/GraphDB-SE BigOWLIM/OWLIM-SE/GraphDB-SE are not compatible. However, storage files created with version 3.1 and upwards will be automatically upgraded when using a later version of Owlim/GraphDB. However, this is a one-way process and no downgrade facility is provided.

When upgrading to a later version of Owlim/GraphDB it is vitally important to make a back-up of your storage files before running the new software, because, otherwise, it will be impossible to revert to a previous version of GraphDB.

h1. Easy install

GraphDB is normally built against the latest stable version of the [Aduna OpenRDF Sesame framework|]. If using GraphDB with this version then the easiest way to deploy an a GraphDB server instance is to copy the re-packaged Sesame Web applications (.war files) in to the Tomcat {{webapps}} directory. These can be found in the {{sesame_owlim}} directory in the GraphDB distribution ZIP file. These Web applications have been modified as follows:

* *openrdf-sesame.war:* The Sesame server application. All GraphDB-SE and 3{^}rd^ party jar files have been added to this package, so that it can be used immediately after deployment.
* *openrdf-workbench.war:* The GraphDB-SE jar, XSLT configuration code and an a GraphDB-SE Turtle configuration file have been added, so that new GraphDB-SE instances can be created using the Workbench without the need to run the command line console application.

After deployment, an a GraphDB-SE instance can be created using the workbench application as follows:
* Start a browser and go to the Workbench Web application using a URL of this form: [http://localhost:8080/openrdf-workbench/] \- substituting {{localhost}} and the {{8080}} port number as appropriate.
* Click 'change server' if necessary to select a Sesame server instance if it is running on a different machine. The server URL will be of this form: [http://localhost:8080/openrdf-sesame]
* After selecting a server, click 'New repository'
* Select 'GraphDB-SE' from the drop-down and enter the repository ID and description. Then click 'next'.
* Fill in the fields as required (referring to the owlim-configurator spreadsheet as necessary) and click 'create' - if you have an a GraphDB-SE license file, its location should be specified in the license field. Note that paths must use '/' separators, even on Windows.
* A message should be displayed that gives details of the new repository and this should also appear in the repository list (click 'repositories' to see this).

h4. Can not create a GraphDB-SE repository using the Sesame console

Make sure that the repository template file \[GraphDBSE\]/templates/owlim-se.ttl GraphDBSE/templates/owlim-se.ttl has been copied to the 'templates' subdirectory of the Sesame console's data directory.

h4. Can not create an a GraphDB-SE repository, the Sesame console says unknown Sail type -- owlim:Sail

The Sesame console can not find the GraphDB-SE jar file. Make sure it was copied from \[GraphDBSE\]/lib GraphDBSE/lib to the Sesame installation folder here: \[SESAME\]/lib SESAME/lib

h4. A long error message/Java exception is given when trying to query a new repository instance.
h1. Installing GraphDB-SE with Jena

This section is for users and system administrators that are unfamiliar with the GraphDB-SE Jena adapter. The information contained in the following pages should be enough to get started with this software, i.e. to install and configure an a GraphDB-SE repository and access it via the Jena API or Jena compatible tools.
The Jena adapter allows GraphDB-SE to be used with local repositories, NOT those shared via the Sesame HTTP server. If you want to use GraphDB-SE remotely, consider using the Joseki server as described below.
h2. Required software

This guide covers installing and configuring the Jena adapter for [GraphDB-SE|]. [GraphDB-SE|]. Required software for this comprises:
* [Jena|] version 2.7 (tested with version 2.7.3)
* [ARQ|] (tested with version 2.9.3)
h2. Description of the GraphDB-SE Jena adapter

The GraphDB-SE Jena adapter is essentially an implementation of the [Jena|] *DatasetGraph* _DatasetGraph_ interface that provides access to individual triples managed by an a GraphDB-SE repository through the Sesame API interfaces.
It is not a general purpose Sesame adapter and cannot be used to access any Sesame compatible repository, because it utilises an internal GraphDB-SE API to provide more efficient methods for processing RDF data and evaluating queries.
The adapter comes with its own implementation of a [Jena|] 'assembler' factory to make it easier to instantiate and use with those related parts of the Jena framework, although one can instantiate an adapter directly by providing an instance of a Sesame *SailRepository* (an GraphDB-SE *GraphDBRepository* implementation). Query evaluation is controlled by the ARQ engine, but specific parts of a Query (mostly batches of statement patterns) are evaluated natively through a modified *StageGenerator* plugged into the Jena runtime framework for efficiency. This also avoids unnecessary cross-api data transformations during query evaluation.

h2. Instantiate Jena adapter using a SailRepository

In this approach, an a GraphDB-SE repository is first created and wrapped in a Sesame *SailRespository*. Then a connection to it is used to instantiate the adapter class *SesameDataset*. The following example helps to clarify:
{code}import com.ontotext.trree.OwlimSchemaRepository;
import org.openrdf.repository.sail.SailRepository;
// finally, create the DatasetGraph instance
SesameDataset dataset = new SesameDataset(connection);
{code}From now on the {{SesameDataset}} object can be used through the Jena API as regular Dataset, e.g. to add some data into it one could do something like the following:
{code}Model model = ModelFactory.createModelForGraph(dataset.getDefaultGraph());
Resource r1 = model.createResource("") ;
h2. Instantiate GraphDB-SE adapter using the provided Assembler

Another approach is to use the Jena assemblers infrastructure to instantiate an a GraphDB-SE Jena adapter. For this purpose the required configuration must be stored in some valid RDF serializsation format and its contents read into a Jena model. Then, the assembler can be invoked to get an instance of the Jena adapter. The following example specifies an adapter instance in N3 format.

otjena:datasetParam "./location" .
The {{ja:loadClass\*}} statements ensure that the GraphDB-SE Jena adapter factory class file(s) are initializsed and plugged into the Jena framework prior to be being invoked. Then the *\#dataset* description tells the Jena framework to expect instances of *otjena:SesameDataset* to be created by this factory. The following example uses such a description stored in the file *owlimbridge.n3* to get an instance of the Jena adapter:

h2. Using GraphDB-SE with the Joseki server

In order to use a GraphDB-SE repository with the Joseki server one needs only to configure it as a dataset, so that the Jena assembler framework is able to instantiate it. An example Joseki configuration file that makes use of such a dataset description could looks like the following. First we describe a service that hosts the dataset:

h1. Using GraphDB-SE with TopBraid Composer

All versions of GraphDB can be used with [TopBraid Composer/Live|], when set up using the Sesame HTTP server. When running TopBraid Composer, simply select File->New...->RDF/OWL Sesame2 RDF Repository Connection and enter the details (most importantly the server URL and repository ID).

However, TopBraid Composer can also use GraphDB-SE embedded, i.e. without needing to set up a server. To use TopBraid Composer and GraphDB-SE in this way, two components need to be installed:
The outline of the steps needed are as follows:

# Download the GraphDB bundle from Ontotext and copy it to the TopBraid Composer 'plugins' directory;
# Restart TopBraid Composer;
# Use the update manager to install the "GraphDB connector for TopBraid" from [].

From now on GraphDB can be used with TBC in several ways as described below.

# Create an GraphDB database
# Create a GraphDB database:
## Select File->New->Other... then type GraphDB (to reduce the options) and then choose "RDF/OWL Local Owlim Database";
## Make any changes to the default configuration and press 'Create';
## Select in navigator view and open;
## It is now possible to use the SPARQL query view.

# Export to an GraphDB database
# Export to a GraphDB database:
## Open an ontology file;
## Select File->export->TopBraid Composer->Export/Merge/Convert RDF graphs;
## Choose "RDF/OWL Local Owlim Database";
## Complete the configuration.

h2. Memory requirements