Skip to main content

4.0.0

RDF4J 4.0.0 is a major release of the Eclipse RDF4J framework. Some highlights:

  • Update to Java 11 as the minimally-required version of Java
  • An (experimental) new embedded triplestore: the LMDB store
  • Improved support for working with RDF4J in Spring and Spring Boot applications (see documentation for details)
  • Performance improvements in the SHACL engine
  • Performance improvements in the Memory Sail
  • Various speed and optimization improvements in the SPARQL query engine
  • Various improvements in the SparqlBuilder
  • SeRQL and SPIN are no longer supported
  • Removal of several long-deprecated packages and interfaces

For a complete overview, see all issues fixed in 4.0.0.

Upgrade notes

RDF4J 4.0.0 contains several backward incompatible changes, including removal of several deprecated modules and classes.

Java 11 required

RDF4J 4.0.0 requires Java 11 at a minimum. Any projects still running older versions of Java will need to upgrade their JVM/JDK before updating their RDF4J version (GH-2046).

RDF4J Server / Console / Workbench application upgrades

When upgrading one of the RDF4J applications (Server, Console, Workbench), when coming from version 3.1.0 or later, the new RDF4J version can be treated as a drop-in replacement.

Older versions of the RDF4J applications can not be upgraded directly to 4.0.0. This is because support for upgrading from the legacy SYSTEM repository configuration has been removed. We recommend the following upgrade path:

  1. upgrade to RDF4J 3.7 and run the application, executing a few queries on one of its repositories. This will upgrade the existing configuration away from the legacy SYSTEM repo used in older application installations.
  2. shut down normally.
  3. do a second upgrade, to RDF4J 4.0.0.

Removed deprecated initialize methods on Repository, Sail APIs and RepositoryManager

The deprecated initialize() methods on Repository, Sail and RepositoryManager have been removed. Use init() instead. (see GH-1243 )

Removed deprecated query builder package

The deprecated org.eclipse.rdf4j.queryrender.builder has been removed. Use org.eclipse.rdf4j.sparqlbuilder.core.SparqlBuilder instead.

LuceneSpinSail removed

The LuceneSpinSail component, which was first marked deprecated in release 3.0.3, has now been removed from the RDF4J project (GH-1706).

SeRQL support removed

The parser for the SeRQL query language, as well as all related code and tool options, has been removed from RDF4J. If you still have SeRQL queries in your project, you will need to rewrite them into SPARQL syntax before upgrading (GH-2992).

Lucene libraries upgraded

The Lucene (full-text search) libraries have been upgraded from 7.7 to 8.5. This affects projects storing the full-text index to disk (using the LuceneSail.LUCENE_DIR_KEY).

Projects upgrading from RDF4J 3.x (Lucene 7.7) to RDF4J 4.0 (Lucene 8.5) should include the lucene-backwards-codec 8.5 jar to continue using the existing Lucene 7.7 indexes.

It is recommended to reindex the data / upgrade the Lucene index stored in the LuceneSail.LUCENE_DIR_KEY directory, after which the lucene-backwards-codec jar can be removed:

Both options may require shutting down the application(s) using the indexed data, it is recommended to back up the index directory before reindexing.

The RDF4J SDK contains both the lucene-core and lucene-backwards-codec jars.

Lucene default SearchIndex implementation renamed

The default Lucene SearchIndex implementation has been renamed. Prevously, it was org.eclipse.rdf4j.sail.lucene.LuceneIndex. The new name is org.eclipse.rdf4j.sail.lucene.impl.LuceneIndex.

Solr client libraries upgraded

The Solr client libraries have been upgraded from 7.7 to 8.4. New clients should still be able to work correctly with older Solr servers without code changes, but this cannot be guaranteed.

ElasticSearch client libraries upgraded

The ElasticSearch client libraries have been upgraded from 6.8 to 7.8. New clients should still be able to work correctly with older ElasticSearch servers without code changes, but this cannot be guaranteed.

rdf4j-util module split up

The rdf4j-util module has been split up into 8 separate modules, to allow for greater flexibility in our dependency tree and potential smaller footprints. The 8 new modules are as follows:

  • rdf4j-common-annotation contains internal Java annotation classes (for marking parts of the code experimental or for internal use only);
  • rdf4j-common-exception contains top level interfaces and classes for exceptions thrown by RDF4J.
  • rdf4j-common-io contains common file IO utilities and IRI parsing utilities.
  • rdf4j-common-iterator contains top level interfaces and classes and some common utilities for working with iterators and iterations.
  • rdf4j-common-text contains utility classes for text/string based operations.
  • rdf4j-common-transaction contains base classes and interfaces for working with transactions and isolation levels.
  • rdf4j-common-util contains generically applicable base classes and interfaces.
  • rdf4j-common-xml contains base functionality and some utility functions for working with XML.

Projects that directly depended on the rdf4j-util module will need to change their dependencies to more precisely figure out which of these new ‘common’ modules to use.

org.eclipse.rdf4j.RDF4JException moved to org.eclipse.rdf4j.common.exception.RDF4JException

Projects that directly reference the RDF4JException class will need to update their imports.

org.eclipse.rdf4j.RDF4JConfigException moved to org.eclipse.rdf4j.common.exception.RDF4JConfigException

Projects that directly reference the RDF4JConfigException class will need to update their imports.

Removed deprecated Lucene/Solr/ElasticSearch methods

The following methods were removed from org.eclipse.rdf4j.sail.elasticsearch.ElasticsearchIndex

  • beginReading()
  • endReading()
  • parseQuery(String, IRI)

The following methods were removed from org.eclipse.rdf4j.sail.lucene.AbstractLuceneIndex

  • beginReading()
  • endReading()

The following methods were removed from org.eclipse.rdf4j.sail.lucene.AbstractSearchIndex

  • evaluate(QuerySpec)
  • parseQuery(String, IRI)

The following method was removed from org.eclipse.rdf4j.sail.lucene.LuceneIndex

  • parseQuery(String, IRI)

The following methods were removed from org.eclipse.rdf4j.sail.lucene.SearchIndex

  • beginReading()
  • endReading()
  • evaluate(QuerySpec)

The following methods were removed from org.eclipse.rdf4j.sail.lucene.SearchQueryEvaluatorTest

  • beginReading()
  • endReading()
  • evaluate(QuerySpec)

The following methods were removed from org.eclipse.rdf4j.sail.solr.SolrIndex

  • beginReading()
  • endReading()
  • parseQuery(String, IRI)

Removed deprecated RIO parser settings

The following deprecated settings were removed from org.eclipse.rdf4j.rio.helpers.NTriplesParserSettings:

  • FAIL_ON_NTRIPLES_INVALID_LINES (use FAIL_ON_INVALID_LINES instead)

The following deprecated settings were removed from org.eclipse.rdf4j.rio.helpers.TriXParserSettings:

  • FAIL_ON_TRIX_MISSING_DATATYPE (use FAIL_ON_MISSING_DATATYPE instead)
  • FAIL_ON_TRIX_INVALID_STATEMENT (use FAIL_ON_INVALID_STATEMENT instead)

Several deprecated ParserConfig methods were removed:

  • ParserConfig(boolean verifyData, boolean stopAtFirstError, boolean preserveBNodeIDs, DatatypeHandling datatypeHandling)
  • stopAtFirstError
  • verifyData
  • datatypeHandling

Several deprecated RDFParser methods were removed:

  • setStopAtFirstError
  • setDatatypeHandling
  • setVerifyData

Removed deprecated utility methods

The following methods were removed from org.eclipse.rdf4j.common.io.FileUtil

  • copyFile(File, File)
  • createDirIfNotExists(File)
  • createTempDir(String)
  • deleteChildren(File)
  • deleteFiles(File)
  • deltree(File)
  • getFileExtension(String)
  • getRelativeFile(File, File)
  • getRelativePath(File, File)
  • isLegalFileName(String)
  • isLegalFileNameChar(char)
  • moveRecursive(File, File, Collection<File>)

The following methods were removed from org.eclipse.rdf4j.common.io.ResourceUtil

  • getImage(String)
  • getImageIcon(String)
  • getURLs(String)
  • resourceToFile(String,File)

The following methods were removed from org.eclipse.rdf4j.common.text.StringUtil

  • concat(String...)
  • decodeArray(String)
  • deriveInitialText(String)
  • encodeArray(String[])
  • getAllAfter(String, char)
  • getAllBefore(String, char)
  • isGarbageText(String)

Removed deprecated ProcessLauncher

The org.eclipse.rdf4j.common.platform.ProcessLauncher class was removed.

Removed deprecated code from ShaclSail

Removed support for UndefinedTargetValidatesAllSubjects, use the dash vocabulary instead.

Removed support for IgnoreNoShapesLoadedException.

Removed org.eclipse.rdf4j.sail.shacl.experimentalSparqlValidation system property because SPARQL based validation is now enabled by default. This can be disabled by setting org.eclipse.rdf4j.sail.shacl.sparqlValidation to false.

IRI hashCode / equals contract changed

The contract on the hashCode() and equals() methods for IRI has changed slightly: previously, it was defined to use the value of toString() to calculate the hash, now it’s defined to use stringValue() instead. Projects that use their own implementations of the IRI interface will need to verify and possibly adjust their hashCode() and equals() implementation to conform to this.

Refined extension points for evaluation strategies in federation

Removed support for defining sparqlEvaluationStrategy and sailEvaluationStrategy using FedXConfig.

Use FedXFactory#withFederationEvaluationStrategyFactory instead to supply a FederationEvaluationStrategyFactory.

Removed support for defining the writeStrategyFactory through FedXConfig. Use FedXFactory#withWriteStrategyFactory instead.

Removed deprecated support for specifying fedxConfig as a location in FedXConfig. Use FedXConfig#setConfig instead.

Acknowledgements

This release was made possible by contributions from Andreas Schwarte, Antoine Willerval, Bart Hanssens, Florian Kleedorfer, Håvard M. Ottestad, Jeen Broekstra, Jerven Bolleman, Ken Wenzel, and Nils Hoffman.

Back to the top