RDF4J 4.0.0-M2 is the second Milestone build of the upcoming 4.0.0 release of RDF4J.
RDF4J 4.0.0 is a major release of the RDF4J framework, focusing on improved performance and improved maintainability. A large effort to clean up the structure is intended to make it easier to deliver new features in this and future releases.
Some of the highlights covered in this second milestone:
This milestone build is not yet feature-complete, but we are putting it out to receive early feedback on all the improvements we have put in.
RDF4J 4.0.0-M2 contains several backward incompatible changes, including removal of several deprecated modules and classes.
RDF4J 4.0.0-M2 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).
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-M2. This is because support for upgrading from the legacy SYSTEM repository configuration has been removed. We recommend the following upgrade path:
The deprecated initialize() methods on Repository, Sail and RepositoryManager have been removed. Use init() instead. (see GH-1243 )
The deprecated org.eclipse.rdf4j.queryrender.builder has been removed.
Use org.eclipse.rdf4j.sparqlbuilder.core.SparqlBuilder instead.
The LuceneSpinSail component, which was first marked deprecated in release 3.0.3, has now been removed from the RDF4J project (GH-1706).
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).
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:
lucene-core jarBoth 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.
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.
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.
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.
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.RDF4JExceptionProjects that directly reference the RDF4JException class will need to update their imports.
org.eclipse.rdf4j.RDF4JConfigException moved to org.eclipse.rdf4j.common.exception.RDF4JConfigExceptionProjects that directly reference the RDF4JConfigException class will need to update their imports.
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)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)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)The org.eclipse.rdf4j.common.platform.ProcessLauncher class was removed.
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.
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.
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.
This milestone was made possible by contributions from Ken Wenzel, Andreas Schwarte, Florian Kleedorfer, Jerven Bolleman, Havard M. Ottestad, Bart Hanssens, and Jeen Broekstra.
Table of Contents