Chapter 9. Frequently Asked Questions

Table of Contents

9.1. General Questions
9.1.1. I've got a Sesame-related question, where can I get an answer?
9.1.2. Something goes wrong when I use Sesame, what do I do?
9.1.3. How do I report a bug?
9.1.4. Why doesn't Sesame support $FEATURE?
9.1.5. I need $FEATURE right now!
9.1.6. Can you keep me informed of any Sesame-related news?
9.1.7. Is this user guide the only documentation for Sesame?
9.2. Troubleshooting
9.2.1. I get a "HTTP error 500" message in the toolbar frame
9.2.2. I get a "HTTP error 500" message in the main frame
9.2.3. I get "error while adding new triples: Invalid byte 2 of 3-byte UTF-8 sequence"
9.2.4. I get a warning: "Unable to set namespace prefix 'foo' for namespace ..."
9.2.5. My in-memory repository is very slow and/or runs out of memory
9.2.6. On upload I get an error "java.lang.IllegalStateException: Post too large"
9.2.7. Can not evaluate directSubClassOf on a non-inferencing repository

9.1. General Questions

9.1.1. I've got a Sesame-related question, where can I get an answer?

First of all, please make sure that your question is not already answered in this user guide. If it isn't, then feel free to post your question on the openRDF.org forum. To avoid off-topic discussions (a.k.a. "spam"), you'll have to register yourself before you can post to the forum. Also, we don't like to talk to "anonymous" all the time.

Please don't send any questions to the developers directly, unless the question is related to the public server or is somewhat confidential.

9.1.2. Something goes wrong when I use Sesame, what do I do?

In general, when something does not work as expected in Sesame, or you get an error, try and find the cause of the error before reporting it to us. See if the error message tells you anything. Check the Sesame log files in [SESAME_DIR]/WEB-INF/logs for any clues about what went wrong.

Also, check the documentation and forum to see if your problem is described there somewhere. In Section 9.2, “Troubleshooting” we provide a number of possible causes and solutions to regularly-occurring problems. On the forum, we answer user problems, your problem might have come up before, and our answer to that other person might be useful for you as well.

If you can't find any relevant information for your problem anywhere, feel free to report a bug or post a comment on the forum.

9.1.3. How do I report a bug?

If you have found a bug in Sesame then you can log it directly in the issue tracker. Please make sure that the bug is not a duplicate of an already logged issue. If you are not sure that your problem is caused by a bug in Sesame then feel free to post a description of your problem on the forum.

When posting a bug report to either issue tracker or forum, always make sure to include detailed information: in what circumstances does the bug occur, what version of Sesame are you using, what type of repository (RDBMS, in-memory, inferencing, etc.) are you using, and if available provide an exception stacktrace.

9.1.4. Why doesn't Sesame support $FEATURE?

Sesame is used by a diverse group of people for very different purposes, who all demand different features to be implemented in Sesame. Since there are only 24 hours in a day, we can not please everybody all the time. Instead, we try to assess as best we can which features are most important for the largest part of Sesame's user base. Also, we give priority to features that we need for our own work with Sesame.

So, if Sesame doesn't support a particular feature, but this feature 'should be in any self-respecting RDF framework', chances are that we simply haven't had time for it yet. Try and see if the feature has come up on Sesame's issue tracker or web forum. If it hasn't, don't be shy to raise the issue. If you've come up with something you'd really like to see included in Sesame, we'd like to know about it.

9.1.5. I need $FEATURE right now!

There is a number of ways you can make sure a particular feature is added to Sesame:

  • You can let us know of your need, explaining why it is crucial, through the web forum or issue tracker (by adding a new item or by voting for an existing issue). Of course, there is no guarantee that we will immediately move it to the top of our ToDo pile.
  • You can implement it yourself. Yes, that's right: Sesame is open source, and we thrive on community feedback, not just in the form of comments and bug reports, but also of code contributions. If you need some feature or improvement real bad, consider implementing it yourself and sharing the result with the rest of the Sesame community. We'd be overjoyed to receive your contribution and include it in Sesame.
  • You can pay Aduna to implement it for you. Aduna offers commercial support contracts for Sesame, and if special features are something you need, we can provide that as part of such support. Contact info@aduna.biz for detailed information.

9.1.6. Can you keep me informed of any Sesame-related news?

Sesame-related news items, such as release announcements, are sent to the sesame-interest mailing list, which is hosted by SourceForge. Please subscribe yourself to the mailing list if you want to be kept informed. Please note that this is a restricted mailing list: it can not be used for discussing Sesame-related issues.

If you want to keep up-to-date on Sesame developments in more detail, consider joining the web forum. The forum also provides an RSS feed that will provide you with the most recent topics of discussion. Ideal for staying in touch with the community!

9.1.7. Is this user guide the only documentation for Sesame?

No, it isn't. The project's website contains a number of references to research papers and Sesame-related projects.

9.2. Troubleshooting

In this section, we identify some commonly encountered problems with the installation, configuration and use of Sesame, and possible solutions.

Of course, not all possible problems can be found here. If you have a problem that is not described here, you can get feedback on how to deal with it by posting a message to the openRDF.org forum. Include as many relevant details as possible, for example, which version of Sesame you are using, possible java exceptions, log error messages, and so forth.

9.2.1. I get a "HTTP error 500" message in the toolbar frame

There are several possible reasons for this error. HTTP error 500 is a generic code that means 'Internal server error'. It often helps to try and scroll down in the toolbar frame (by selecting the text with the mouse), there will be more detailed error report further down.

There are several possible problems:

  • The JDBC driver can not be found

    This means that you have tried to access an RDBMS-based repository for which no JDBC driver is installed. Make sure that you have the correct JDBC driver, and have it installed in [SESAME_DIR]/WEB-INF/lib.

  • The database does not exist

    This means that you have tried to access a repository for which no database was created. Verify in your repository configuration that the parameter jdbcUrl is set correctly, and verify that the database is created and accessible for Sesame (for details on how to do this, we refer you to the documentation of your RDBMS).

  • Access denied for user 'sesame'@'localhost'

    This means that the the supplied MySQL user ('sesame') does not have sufficient access rights.

    Sesame will need a user account on the MySQL server. You can create a new user account in MySQL by connecting to the mysql database mysql -u root -p mysql, and by granting the user all privileges on the concerning database(s), e.g.:

    GRANT ALL ON <DATABASE>.* TO <USER>@localhost;

    See http://www.mysql.com/doc/G/R/GRANT.html for MySQL's syntax of GRANT.

Other less common problems may also cause this error. In general, take a good look at the detailed error message or the repository log file (in [SESAME_DIR]/WEB-INF/logs/repositories/) to find out the cause of the problem.

9.2.2. I get a "HTTP error 500" message in the main frame

After upgrading a Sesame server to a new version of Sesame, it may occur that the web interface fails with a HTTP error 500 and an error report similar to the following:

javax.servlet.ServletException: org.openrdf.sesame.server.SesameServer.getLocalService()
Lorg/openrdf/sesame/local/LocalService;
(....)

root cause

java.lang.NoSuchMethodError: org.openrdf.sesame.server.SesameServer.getLocalService()
Lorg/openrdf/sesame/local/LocalService;
org.apache.jsp.index_jsp._jspService(index_jsp.java:77)
(....)

The root cause here indicates that the JSP page is not correctly compiled: it can not find a particular Java method.

The cause is that Apache Tomcat sometimes fails to recompile JSP pages after they have been updated. The compiled JSP pages still refer to methods in the old version of Sesame, which may not be present anymore in your new version (this is most likely to occur when upgrading to 1.0 from an earlier release, since a lot of API changes were made for that version).

The solution is to empty Tomcat's JSP compile cache. For Tomcat 4 this cache can be found in [TOMCAT_DIR]\work\Standalone\localhost\sesame, for Tomcat 5 in [TOMCAT_DIR]\work\Catalina\localhost\sesame. Simply delete all files and folders contained in this directory and re-load the web interface.

9.2.3. I get "error while adding new triples: Invalid byte 2 of 3-byte UTF-8 sequence"

This is a parser error that can occur during upload of RDF/XML documents to Sesame. The most likely cause is that the document you are uploading specifies that it is in UTF-8 encoding, but that it contains non-UTF-8 characters. As UTF-8 is the default character set for XML, it might also be the case that the document does not specify a character set at all.

The solution is to change the encoding specification of the XML file to the appropriate type. For example, if the used character set is ISO-8859-1 (this is one of the most common character sets for "Western" documents), the header of the XML file should be changed to:

<?xml version="1.0" encoding="iso-8859-1"?>

More information about character encodings can be found here.

9.2.4. I get a warning: "Unable to set namespace prefix 'foo' for namespace ..."

This happens when you try to upload data to a repository which already contains a namespace declaration with the prefix 'foo', but which maps it to a different namespace URL. In such cases, a conflict occurs. Sesame handles these cases by assigning a non-conflicting namespace prefix to the namespace in the new document (for example, 'ns1').

Most of the time, you can safely ignore this warning. Sometimes it indicates a problem with your RDF document: it may have a mistake in its namespace declarations. In such cases, examine the namespace declarations in your RDF document and fix any errors before attempting another upload.

9.2.5. My in-memory repository is very slow and/or runs out of memory

By default, Tomcat only uses a 64MB heap size for the Java process. When you are using a large in-memory repository, this can be too small: the process becomes slow because the garbage collector is invoked more often, and it can even run out of memory.

The solution is to configure Tomcat to use a larger heap size. This can be done by editing [TOMCAT_DIR]/bin/catalina.bat (MS Windows) or catalina.sh (Unix systems). You can increase the heap size by adding a parameter to the environment variable JAVA_OPTS. The parameter to be added is '-Xmx128M' (where the number 128 indicates that 128 Megabytes should be used. Increase as required). For catalina.bat there now should be a line in your file that looks like this:

set JAVA_OPTS=-Xmx128M

For catalina.sh the line should look like this:

JAVA_OPTS='-Xmx128M'

For more information on Tomcat memory reservation, see the Tomcat FAQ.

9.2.6. On upload I get an error "java.lang.IllegalStateException: Post too large"

Apache Tomcat by default sets a limit on the maximum size of HTTP POST requests it accepts. In Tomcat 5, this limit is set to 2 MB. When you try to upload RDF files larger than 2 MB to Sesame, this error can occur.

The solution is to reconfigure Tomcat to accept larger POST requests, either by increasing the limit, or by disabling it. This can be done by editing [TOMCAT_DIR]/conf/server.xml. Set the Tomcat configuration parameter maxPostSize for the HTTPConnector to a larger value (in bytes) to increase the limit. Setting it to 0 in will disable the size check. See the Tomcat Configuration Reference for more information.

9.2.7. Can not evaluate directSubClassOf on a non-inferencing repository

When executing queries that use a SeRQL built-in operator, such as directSubClassOf (see Chapter 6, The SeRQL query language (revision 1.2)), this error may occur:

org.openrdf.sesame.query.QueryEvaluationException: 
Can not evaluate directSubClassOf on a non-inferencing repository	
			

This indicates that the repository you are trying to evaluate this query on is an RDF repository, not an RDF Schema repository. The former does not have inferencing capabilities.

SeRQL needs an inferencing repository for evaluating queries with built-in operators, because these operators work on the class hierarchy. Without inferencing support, the results of these operators would become random and unpredictable.

The solution is to either reformulate your query, removing all use of SeRQL built-in operators, or create a new repository that does have inferencing capabilities (an RdfSchemaRepository), transfer your RDF data to it, and use this new repository for your queries.