Skip to content

ObdalibPluginTroubleshooting

skomlaebri edited this page Mar 2, 2016 · 10 revisions

Table of Contents

Troubleshooting

Sesame

Troubleshoot Protege plugin

General

If you have issues, it is recommended to start Protege so that it displays the system's console. Every version of Ontop/Protege will print useful debugging messages that will help you debug your problem. Moreover, in order to provide support for debugging we will require that you send us a copy of the debug messages printed in this screen.

To make Protege display a console you should start it using the scripts run.sh or run.bat. In Windows, simply click on the run.bat file located in your Protege folder. If you are in linux or mac open a terminal, cd it Protege's main folder and execute the run.sh script. For example:

cd /Applications/Protege_5
sh run.sh

Class file has wrong version

This error may appear if the Java virtual machine's version is other different than 1.8.

$ java -version
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

If the JVM version is not 1.8, you should configure your system's path to use by default Java 1.8. You may also modify the run.bat or run.sh scripts to use the correct java version instead of the system's default.

JDBC tab missing

If the JDBC Plugin tab is not showing up in your configuration dialog, there might be problems with class resolution and a corrupted configuration. To fix this, reset Protege's configuration. This can be done in the splash screen under the More actions menu.

OutOfMemory with MySQL

MySQL doesn't support cursor based results by default. This means that every time you execute a query, MySQL sends you ALL the results of your query. When the results are big, you might run out of memory because of this. To avoid this, you should tell MySQL to use cursors at server side, and define an appropiate "fetch size", i.e., the number of rows to return each time you scroll through the result set. To do this, use the useCursorFectch=true and defaultFetchSize=N properties in your connection URL. For example:

jdbc:mysql://192.168.174.1/mydb?useCursorFetch=true&defaultFetchSize=150

Note, when using server side cursors, MySQL will first create a temporary table where all the results will be stored, then it will send the first N results. This means that using server side cursors might also slow down query answering.

More information about MySQL server side cursors can be found here.

Cannot save OBDA file in Windows 7/Vista

In Windows 7 and Windows Vista it could be necessary to start protege in Administrator mode otherwise sometimes you won't be able to save OBDA files. To do this, right click on the start script and do start with administrator privileges

Database

Casing problems with SQL identifiers

If you experience the following error message: "Error in identifying column name", it may be due to casing problems with the SQL identifiers used in your mappings. See this dedicated page.

MySQL Server does not support double quotes as identifiers

To use ontop and Mysql Server ANSI_QUOTES mode should be enabled. By default the " character can be used to enclose string literals just like ', while in ANSI_QUOTES mode the " character can be used to enclose identifiers just like ` .

The following query will produce different results (or errors) depending on SQL mode:

SELECT "column" FROM table WHERE foo = "bar"
  1. ANSI_QUOTES disabled : The query will select the string literal "column" where column foo is equal to string "bar"
  2. ANSI_QUOTES enabled : The query will select the column column where column foo is equal to column bar
Execute
SET sql_mode = 'ANSI_QUOTES';
or modify the jdbc url to:
jdbc:mysql://myserver:port/mydatabase?sessionVariables=sql_mode='ANSI'

Command line interface

ERROR reading .obda file with special characters

Ontop CLI version could fail to load the mapping when special characters are present.

This happens when the locale encoding is different from the file encoding. You can solve the issue adding a command line parameter to the "ontop.bat" or "ontop" file, enabling your file encoding format (-Dfile.encoding=EncodingFormat) .

Add for example the "-Dfile.encoding=UTF-8" parameter to the "ontop.bat" file as :

%JAVA% -cp "%CLASSPATH%" -Dlogback.configurationFile="%ONTOP_HOME%\log\logback.xml" -Djava.ext.dirs="%EXT_DIRS%" -Dfile.encoding=EncodingFormat org.semanticweb.ontop.cli.Ontop %*
Clone this wiki locally