From 2cc9bb0cf2e3445bf16091b827084a16c540f46c Mon Sep 17 00:00:00 2001 From: Pete Edwards Date: Mon, 18 Dec 2023 16:41:17 +0000 Subject: [PATCH 1/9] Maintain RDFa support This flag is not ready for deprecation as it is used by 3rd party plugins. It would be good to set up an alternative mechanism for providing this support before this is deprecated. See https://github.com/eclipse-rdf4j/rdf4j/issues/4779 for details. --- .../java/org/eclipse/rdf4j/rio/helpers/RDFaParserSettings.java | 1 - 1 file changed, 1 deletion(-) diff --git a/core/rio/api/src/main/java/org/eclipse/rdf4j/rio/helpers/RDFaParserSettings.java b/core/rio/api/src/main/java/org/eclipse/rdf4j/rio/helpers/RDFaParserSettings.java index 14d913b3f7e..1ede9f2f74d 100644 --- a/core/rio/api/src/main/java/org/eclipse/rdf4j/rio/helpers/RDFaParserSettings.java +++ b/core/rio/api/src/main/java/org/eclipse/rdf4j/rio/helpers/RDFaParserSettings.java @@ -26,7 +26,6 @@ public class RDFaParserSettings { *

* Defaults to {@link RDFaVersion#RDFA_1_0}. */ - @Deprecated(since = "4.3.0", forRemoval = true) public static final RioSetting RDFA_COMPATIBILITY = new RioSettingImpl<>( "org.eclipse.rdf4j.rio.rdfa.version", "RDFa Version Compatibility", RDFaVersion.RDFA_1_0); From 787846cf71395e2b30df392a59396b5982f67562 Mon Sep 17 00:00:00 2001 From: Pete Edwards Date: Mon, 18 Dec 2023 16:54:18 +0000 Subject: [PATCH 2/9] Undo deprecation --- .../src/main/java/org/eclipse/rdf4j/rio/helpers/RDFaVersion.java | 1 - 1 file changed, 1 deletion(-) diff --git a/core/rio/api/src/main/java/org/eclipse/rdf4j/rio/helpers/RDFaVersion.java b/core/rio/api/src/main/java/org/eclipse/rdf4j/rio/helpers/RDFaVersion.java index e2d8855479f..69b6a55483e 100644 --- a/core/rio/api/src/main/java/org/eclipse/rdf4j/rio/helpers/RDFaVersion.java +++ b/core/rio/api/src/main/java/org/eclipse/rdf4j/rio/helpers/RDFaVersion.java @@ -15,7 +15,6 @@ * * @author Peter Ansell */ -@Deprecated(since = "4.3.0", forRemoval = true) public enum RDFaVersion { /** From a7f062f79307fc9c4deee16575f09cc1246e9b51 Mon Sep 17 00:00:00 2001 From: Pete Edwards Date: Mon, 15 Jan 2024 15:36:59 +0000 Subject: [PATCH 3/9] Update core/rio/api/src/main/java/org/eclipse/rdf4j/rio/helpers/RDFaParserSettings.java --- .../java/org/eclipse/rdf4j/rio/helpers/RDFaParserSettings.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/rio/api/src/main/java/org/eclipse/rdf4j/rio/helpers/RDFaParserSettings.java b/core/rio/api/src/main/java/org/eclipse/rdf4j/rio/helpers/RDFaParserSettings.java index 1ede9f2f74d..93064e65429 100644 --- a/core/rio/api/src/main/java/org/eclipse/rdf4j/rio/helpers/RDFaParserSettings.java +++ b/core/rio/api/src/main/java/org/eclipse/rdf4j/rio/helpers/RDFaParserSettings.java @@ -23,6 +23,8 @@ public class RDFaParserSettings { /** * Boolean setting for parser to determine the RDFa version to use when processing the document. + * Note that although these settings are not used within RDF4J, they are in use by external plugins. + * @see https://github.com/eclipse-rdf4j/rdf4j/issues/4779 *

* Defaults to {@link RDFaVersion#RDFA_1_0}. */ From 57102d1418529f11c505f5327d1889af9594f9fb Mon Sep 17 00:00:00 2001 From: Pete Edwards Date: Mon, 15 Jan 2024 15:37:05 +0000 Subject: [PATCH 4/9] Update core/rio/api/src/main/java/org/eclipse/rdf4j/rio/helpers/RDFaVersion.java --- .../main/java/org/eclipse/rdf4j/rio/helpers/RDFaVersion.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/rio/api/src/main/java/org/eclipse/rdf4j/rio/helpers/RDFaVersion.java b/core/rio/api/src/main/java/org/eclipse/rdf4j/rio/helpers/RDFaVersion.java index 69b6a55483e..74a3d3db49e 100644 --- a/core/rio/api/src/main/java/org/eclipse/rdf4j/rio/helpers/RDFaVersion.java +++ b/core/rio/api/src/main/java/org/eclipse/rdf4j/rio/helpers/RDFaVersion.java @@ -12,6 +12,8 @@ /** * Enumeration for tracking versions of the RDFa specification to specify processing capabilities of RDFa modules. + * Note that although these settings are not used within RDF4J, they are in use by external plugins. + * @see https://github.com/eclipse-rdf4j/rdf4j/issues/4779 * * @author Peter Ansell */ From 4f2f5c4d9fa09682f2540a0f9276d64804034f85 Mon Sep 17 00:00:00 2001 From: Pete Edwards Date: Mon, 22 Jan 2024 09:27:39 +0000 Subject: [PATCH 5/9] Run mvn process-resources to fix formatting --- .../rdf4j/rio/helpers/RDFaParserSettings.java | 12 +++++++----- .../org/eclipse/rdf4j/rio/helpers/RDFaVersion.java | 8 +++++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/core/rio/api/src/main/java/org/eclipse/rdf4j/rio/helpers/RDFaParserSettings.java b/core/rio/api/src/main/java/org/eclipse/rdf4j/rio/helpers/RDFaParserSettings.java index 93064e65429..ce3d2499199 100644 --- a/core/rio/api/src/main/java/org/eclipse/rdf4j/rio/helpers/RDFaParserSettings.java +++ b/core/rio/api/src/main/java/org/eclipse/rdf4j/rio/helpers/RDFaParserSettings.java @@ -22,11 +22,13 @@ public class RDFaParserSettings { /** - * Boolean setting for parser to determine the RDFa version to use when processing the document. - * Note that although these settings are not used within RDF4J, they are in use by external plugins. - * @see https://github.com/eclipse-rdf4j/rdf4j/issues/4779 - *

- * Defaults to {@link RDFaVersion#RDFA_1_0}. + * Boolean setting for parser to determine the RDFa version to use when processing the document. Note that although + * these settings are not used within RDF4J, they are in use by external plugins. + * + * @see https://github.com/eclipse-rdf4j/rdf4j/issues/4779 + *

+ * Defaults to {@link RDFaVersion#RDFA_1_0}. */ public static final RioSetting RDFA_COMPATIBILITY = new RioSettingImpl<>( "org.eclipse.rdf4j.rio.rdfa.version", "RDFa Version Compatibility", RDFaVersion.RDFA_1_0); diff --git a/core/rio/api/src/main/java/org/eclipse/rdf4j/rio/helpers/RDFaVersion.java b/core/rio/api/src/main/java/org/eclipse/rdf4j/rio/helpers/RDFaVersion.java index 74a3d3db49e..48f7ebeea02 100644 --- a/core/rio/api/src/main/java/org/eclipse/rdf4j/rio/helpers/RDFaVersion.java +++ b/core/rio/api/src/main/java/org/eclipse/rdf4j/rio/helpers/RDFaVersion.java @@ -11,9 +11,11 @@ package org.eclipse.rdf4j.rio.helpers; /** - * Enumeration for tracking versions of the RDFa specification to specify processing capabilities of RDFa modules. - * Note that although these settings are not used within RDF4J, they are in use by external plugins. - * @see https://github.com/eclipse-rdf4j/rdf4j/issues/4779 + * Enumeration for tracking versions of the RDFa specification to specify processing capabilities of RDFa modules. Note + * that although these settings are not used within RDF4J, they are in use by external plugins. + * + * @see https://github.com/eclipse-rdf4j/rdf4j/issues/4779 * * @author Peter Ansell */ From 26184731aa192d680ef12620ae95c1c634fab50d Mon Sep 17 00:00:00 2001 From: Lorenzo Gabriele Date: Sun, 28 Jan 2024 22:43:47 +0100 Subject: [PATCH 6/9] Fix typo --- site/content/documentation/programming/lmdb-store.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/content/documentation/programming/lmdb-store.md b/site/content/documentation/programming/lmdb-store.md index bc15d96e334..ced2e80d236 100644 --- a/site/content/documentation/programming/lmdb-store.md +++ b/site/content/documentation/programming/lmdb-store.md @@ -125,7 +125,7 @@ Please note that the actual footprint also depends largely on the size of IRIs a Some basic information about LMDB database and RAM sizes can be found in the [OpenLDAP & LMDB Sizing Guide](https://3bmahv3xwn6030jbn72hlx3j-wpengine.netdna-ssl.com/wp-content/uploads/2018/08/OpenLDAP-LMDB-Sizing-Guide.pdf). -The bottom line is thatt more RAM is better. The best is to have enough RAM to accommodate the +The bottom line is that more RAM is better. The best is to have enough RAM to accommodate the entire database or at least the database's working set. From a328662242eeab49ad81b164341edc4b487fddb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=CC=8Avard=20Ottestad?= Date: Mon, 19 Feb 2024 10:42:51 +0100 Subject: [PATCH 7/9] GH-4867 change from Exception to Throwable so that we can also log StackOverflowError and which shape caused it --- .../eclipse/rdf4j/sail/shacl/ShaclValidator.java | 4 ++-- .../rdf4j/sail/shacl/ShapeValidationContainer.java | 13 +++++++++++-- .../org/eclipse/rdf4j/sail/shacl/ast/Shape.java | 8 +++++--- .../shacl/results/lazy/LazyValidationReport.java | 4 ++-- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/core/sail/shacl/src/main/java/org/eclipse/rdf4j/sail/shacl/ShaclValidator.java b/core/sail/shacl/src/main/java/org/eclipse/rdf4j/sail/shacl/ShaclValidator.java index ca2cff3c05f..f6222b4117b 100644 --- a/core/sail/shacl/src/main/java/org/eclipse/rdf4j/sail/shacl/ShaclValidator.java +++ b/core/sail/shacl/src/main/java/org/eclipse/rdf4j/sail/shacl/ShaclValidator.java @@ -77,7 +77,7 @@ public static ValidationReport validate(Sail dataRepo, Sail shapesRepo) { } shapesConnection.commit(); - } catch (Exception e) { + } catch (Throwable e) { logger.warn("Failed to read shapes", e); throw e; } @@ -98,7 +98,7 @@ public static ValidationReport validate(Sail dataRepo, Sail shapesRepo) { return performValidation(shapes, new ConnectionsGroup(verySimpleRdfsBackwardsChainingConnection, null, null, null, new Stats(), () -> reasoner, new ShaclSailConnection.Settings(true, true, true, IsolationLevels.NONE), true)); - } catch (Exception e) { + } catch (Throwable e) { logger.warn("Failed to validate shapes", e); throw e; } diff --git a/core/sail/shacl/src/main/java/org/eclipse/rdf4j/sail/shacl/ShapeValidationContainer.java b/core/sail/shacl/src/main/java/org/eclipse/rdf4j/sail/shacl/ShapeValidationContainer.java index 55f6e0d51b9..65ad077440c 100644 --- a/core/sail/shacl/src/main/java/org/eclipse/rdf4j/sail/shacl/ShapeValidationContainer.java +++ b/core/sail/shacl/src/main/java/org/eclipse/rdf4j/sail/shacl/ShapeValidationContainer.java @@ -53,7 +53,12 @@ public ShapeValidationContainer(Shape shape, Supplier planNodeSupplier } else { this.planNode = planNode; } - } catch (Exception e) { + } catch (Throwable e) { + logger.warn("Error processing SHACL Shape {}", shape.getId(), e); + logger.warn("Error processing SHACL Shape\n{}", shape, e); + if (e instanceof Error) { + throw e; + } throw new SailException("Error processing SHACL Shape " + shape.getId() + "\n" + shape, e); } @@ -76,8 +81,12 @@ public ValidationResultIterator performValidation() { try (CloseableIteration iterator = planNode.iterator()) { validationResults = new ValidationResultIterator(iterator, effectiveValidationResultsLimitPerConstraint); return validationResults; - } catch (Exception e) { + } catch (Throwable e) { logger.warn("Error validating SHACL Shape {}", shape.getId(), e); + logger.warn("Error validating SHACL Shape\n{}", shape, e); + if (e instanceof Error) { + throw e; + } throw new SailException("Error validating SHACL Shape " + shape.getId() + "\n" + shape, e); } finally { handlePostLogging(before, validationResults); diff --git a/core/sail/shacl/src/main/java/org/eclipse/rdf4j/sail/shacl/ast/Shape.java b/core/sail/shacl/src/main/java/org/eclipse/rdf4j/sail/shacl/ast/Shape.java index 0bd3af408bd..78145b6aff6 100644 --- a/core/sail/shacl/src/main/java/org/eclipse/rdf4j/sail/shacl/ast/Shape.java +++ b/core/sail/shacl/src/main/java/org/eclipse/rdf4j/sail/shacl/ast/Shape.java @@ -450,8 +450,9 @@ public PlanNode generatePlans(ConnectionsGroup connectionsGroup, ValidationSetti } else { throw new ShaclUnsupportedException("Unknown validation approach: " + validationApproach); } - } catch (RuntimeException e) { + } catch (Throwable e) { logger.warn("Error processing SHACL Shape {}", id, e); + logger.warn("Error processing SHACL Shape\n{}", this, e); throw new SailException("Error processing SHACL Shape " + id + "\n" + this, e); } @@ -707,7 +708,7 @@ public static List getShapesInContext(ShapeSource shapeSource, .map(r -> { try { return new ShaclProperties(r, shapeSourceWithContext); - } catch (Exception e) { + } catch (Throwable e) { logger.warn("Error parsing shape {}", r, e); throw new ShaclShapeParsingException(e, r); } @@ -720,7 +721,7 @@ public static List getShapesInContext(ShapeSource shapeSource, return PropertyShape.getInstance(p, shapeSourceWithContext, parseSettings, cache); } throw new ShaclShapeParsingException("Unknown shape type", p.getId()); - } catch (Exception e) { + } catch (Throwable e) { logger.warn("Error parsing shape {}", p.getId(), e); if (e instanceof ShaclShapeParsingException) { throw e; @@ -746,6 +747,7 @@ public String toString() { statements.setNamespace(RSX.NS); statements.setNamespace(RDFS.NS); statements.setNamespace(RDF.NS); + statements.setNamespace(DASH.NS); WriterConfig writerConfig = new WriterConfig() .set(BasicWriterSettings.PRETTY_PRINT, true) .set(BasicWriterSettings.INLINE_BLANK_NODES, true); diff --git a/core/sail/shacl/src/main/java/org/eclipse/rdf4j/sail/shacl/results/lazy/LazyValidationReport.java b/core/sail/shacl/src/main/java/org/eclipse/rdf4j/sail/shacl/results/lazy/LazyValidationReport.java index 53b4dd3e520..d7eafafdccf 100644 --- a/core/sail/shacl/src/main/java/org/eclipse/rdf4j/sail/shacl/results/lazy/LazyValidationReport.java +++ b/core/sail/shacl/src/main/java/org/eclipse/rdf4j/sail/shacl/results/lazy/LazyValidationReport.java @@ -81,7 +81,7 @@ private void evaluateLazyAspect() { validationResultIterators = null; } - } catch (Exception e) { + } catch (Throwable e) { logger.warn("Error evaluating lazy validation report", e); throw e; } @@ -104,7 +104,7 @@ public Model asModel(Model model) { } return model; - } catch (Exception e) { + } catch (Throwable e) { logger.warn("Error converting validation report to model", e); throw e; } From a353ab15350cd14b6e914743411b3aaa2b482a21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=CC=8Avard=20Ottestad?= Date: Mon, 19 Feb 2024 11:33:47 +0100 Subject: [PATCH 8/9] GH-4910 update maven plugins --- core/sail/elasticsearch-store/pom.xml | 4 ++-- pom.xml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/sail/elasticsearch-store/pom.xml b/core/sail/elasticsearch-store/pom.xml index e4935a4b8e6..a20262a90f2 100644 --- a/core/sail/elasticsearch-store/pom.xml +++ b/core/sail/elasticsearch-store/pom.xml @@ -183,7 +183,7 @@ com.github.alexcojocaru elasticsearch-maven-plugin - 6.26 + 6.28 ${skipITs} ${skipTests} @@ -193,7 +193,7 @@ 9200 false - ${java.sec.mgr} -Xmx1g + ${java.sec.mgr} -Xmx1G -Xms1G 1 diff --git a/pom.xml b/pom.xml index c00fd122bae..c2b4ebdf9ce 100644 --- a/pom.xml +++ b/pom.xml @@ -648,7 +648,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.11.0 + 3.12.1 false utf8 @@ -729,7 +729,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.6.0 + 3.6.3 utf8 11 @@ -791,7 +791,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.2.1 + 3.2.5 UTF-8 -Xmx2048M @@ -800,7 +800,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.2.1 + 3.2.5 UTF-8 1 From 927a94e7becdb0f576a50a3df9272f43d71edba1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ha=CC=8Avard=20Ottestad?= Date: Mon, 19 Feb 2024 15:31:23 +0100 Subject: [PATCH 9/9] GH-4913 downgrade to java 17 for main/develop status checks to allow some older elasticsearch tests to pass --- .github/workflows/develop-status.yml | 2 +- .github/workflows/main-status.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/develop-status.yml b/.github/workflows/develop-status.yml index e6f2b56afba..76301ef8fbe 100644 --- a/.github/workflows/develop-status.yml +++ b/.github/workflows/develop-status.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - jdk: [11, 21] + jdk: [11, 17] steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/main-status.yml b/.github/workflows/main-status.yml index e0683db34ca..fdf918fb68e 100644 --- a/.github/workflows/main-status.yml +++ b/.github/workflows/main-status.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - jdk: [11, 21] + jdk: [11, 17] steps: - uses: actions/checkout@v2