Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/http-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,16 @@ jobs:
runs-on: ubuntu-latest
env:
ASF_ARCHIVE: https://archive.apache.org/dist/
JENA_VERSION: 4.7.0
JENA_VERSION: 6.1.0
BASE_URI: https://localhost:4443/
steps:
- name: Install Linux packages
run: sudo apt-get update && sudo apt-get install -qq raptor2-utils && sudo apt-get install curl
- name: Set up Java 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Download Jena
run: curl -sS --fail "${{ env.ASF_ARCHIVE }}jena/binaries/apache-jena-${{ env.JENA_VERSION }}.tar.gz" -o "${{ runner.temp }}/jena.tar.gz"
- name: Unpack Jena
Expand Down Expand Up @@ -49,6 +54,12 @@ jobs:
run: ./run.sh "$PWD/ssl/owner/cert.pem" "${{ secrets.HTTP_TEST_OWNER_CERT_PASSWORD }}" "$PWD/ssl/secretary/cert.pem" "${{ secrets.HTTP_TEST_SECRETARY_CERT_PASSWORD }}"
shell: bash
working-directory: http-tests
- name: Dump container logs on failure
if: failure()
run: docker compose --env-file ./http-tests/.env logs --no-color
- name: Dump Tomcat logs from linkeddatahub container on failure
if: failure()
run: docker compose --env-file ./http-tests/.env exec -T linkeddatahub sh -c 'for f in /usr/local/tomcat/logs/*; do echo "=== $f ==="; cat "$f"; done' || true
- name: Stop Docker containers and remove volumes
run: docker compose --env-file ./http-tests/.env down -v
- name: Remove Docker containers
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM maven:3.8.4-openjdk-17 AS maven
FROM maven:3.9-eclipse-temurin-21 AS maven

# download and extract Jena

ARG JENA_VERSION=4.7.0
ARG JENA_VERSION=6.1.0

ARG JENA_TAR_URL="https://archive.apache.org/dist/jena/binaries/apache-jena-${JENA_VERSION}.tar.gz"

Expand All @@ -22,7 +22,7 @@ RUN mvn -Pstandalone clean install

# ==============================

FROM atomgraph/letsencrypt-tomcat:10.1.46
FROM atomgraph/letsencrypt-tomcat:10.1.52

LABEL maintainer="martynas@atomgraph.com"

Expand Down
12 changes: 6 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ volumes:
varnish_end_user_cache:
services:
nginx:
image: nginx:1.23.3
image: nginx:1.31.1
mem_limit: 128m
configs:
- source: nginx_conf
Expand Down Expand Up @@ -105,7 +105,7 @@ services:
- ./config/dataspaces.trig:/var/linkeddatahub/datasets/dataspaces.trig
- ./config/system.trig:/var/linkeddatahub/datasets/system.trig
fuseki-admin:
image: atomgraph/fuseki:4.7.0
image: atomgraph/fuseki:6.1.0
user: root # otherwise fuseki user does not have permissions to the mounted folder which is owner by root
expose:
- 3030
Expand All @@ -114,7 +114,7 @@ services:
- ./fuseki/admin:/fuseki/databases
command: [ "--config", "/fuseki/config.ttl" ]
fuseki-end-user:
image: atomgraph/fuseki:4.7.0
image: atomgraph/fuseki:6.1.0
user: root # otherwise the fuseki user does not have permissions to the mounted folder which is owner by root
expose:
- 3030
Expand All @@ -123,7 +123,7 @@ services:
- ./fuseki/end-user:/fuseki/databases
command: [ "--config", "/fuseki/config.ttl" ]
varnish-frontend:
image: varnish:7.3.0
image: varnish:7.7.3
user: root # otherwise varnish user does not have permissions to the mounted folder which is owner by root
configs:
- source: varnish-frontend_vcl
Expand All @@ -136,7 +136,7 @@ services:
entrypoint: varnishd
command: [ "-F", "-f", "/etc/varnish/default.vcl", "-a", "http=:6060,HTTP", "-a", "proxy=:8443,PROXY", "-p", "feature=+http2", "-s", "file,/var/lib/varnish/storage.bin,3G", "-t", "86400" ] # -F: foreground, -f: config, -a: listeners, -p: http2, -s: storage, -t: TTL
varnish-admin:
image: varnish:7.3.0
image: varnish:7.7.3
user: root # otherwise the varnish user does not have permissions to the mounted folder which is owner by root
configs:
- source: varnish-admin_vcl
Expand All @@ -147,7 +147,7 @@ services:
entrypoint: varnishd
command: [ "-F", "-f", "/etc/varnish/default.vcl", "-a", "http=:80,HTTP", "-a", "proxy=:8443,PROXY", "-p", "feature=+http2", "-s", "malloc,1G", "-t", "86400", "-p", "timeout_idle=60s" ] # -F: foreground, -f: config, -a: listeners, -p: http2 + idle timeout, -s: storage, -t: TTL
varnish-end-user:
image: varnish:7.3.0
image: varnish:7.7.3
user: root # otherwise varnish user does not have permissions to the mounted folder which is owner by root
configs:
- source: varnish-end-user_vcl
Expand Down
2 changes: 2 additions & 0 deletions platform/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash
set -e
set -x # DEBUG: trace every command (revert before merge)
exec 2>&1 # DEBUG: merge stderr into stdout so the trace lands in docker logs

# set timezone

Expand Down
79 changes: 50 additions & 29 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,28 +86,28 @@
<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>5.0.0</version>
<version>6.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.connectors</groupId>
<artifactId>jersey-apache-connector</artifactId>
<version>3.1.0</version>
<version>3.1.11</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-multipart</artifactId>
<version>3.1.0</version>
<version>3.1.11</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-processing</artifactId>
<version>3.1.0</version>
<version>3.1.11</version>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
<version>2.0.1</version>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
Expand All @@ -117,7 +117,7 @@
<dependency>
<groupId>com.atomgraph.etl.csv</groupId>
<artifactId>csv2rdf</artifactId>
<version>2.1.11</version>
<version>2.2.0</version>
<exclusions>
<!-- exclude SL4J from CSV2RDF - we already got another coming from Core. Otherwise we get https://www.slf4j.org/codes.html#multiple_bindings -->
<exclusion>
Expand All @@ -129,57 +129,67 @@
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-shacl</artifactId>
<version>4.7.0</version>
<version>6.1.0</version>
</dependency>
<dependency>
<groupId>org.apache.jena</groupId>
<artifactId>jena-arq</artifactId>
<version>6.1.0</version>
</dependency>
<dependency>
<groupId>com.github.jsonld-java</groupId>
<artifactId>jsonld-java</artifactId>
<version>0.13.4</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>twirl</artifactId>
<version>1.0.33</version>
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>client</artifactId>
<version>4.2.11</version>
<version>4.3.0</version>
<classifier>classes</classifier>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>client</artifactId>
<version>4.2.11</version>
<version>4.3.0</version>
<type>war</type>
</dependency>
<!-- required by jsonld-java - version same as Jersey's HTTP Client -->
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient-cache</artifactId>
<version>4.5.13</version>
<version>4.5.14</version>
</dependency>
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>3.19.3</version>
<version>3.19.4</version>
</dependency>
<dependency>
<groupId>net.jodah</groupId>
<artifactId>expiringmap</artifactId>
<version>0.5.10</version>
<version>0.5.11</version>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.15.3</version>
<version>1.22.1</version>
</dependency>
<dependency>
<!-- comes with atomgraph/letsencrypt-tomcat -->
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-coyote</artifactId>
<version>10.1.2</version>
<version>10.1.52</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.11.4</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -188,6 +198,12 @@
<version>5.12.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>5.12.0</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down Expand Up @@ -216,21 +232,26 @@
</pluginManagement>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.5.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
<version>3.3.1</version>
<configuration>
<releaseProfiles>release</releaseProfiles>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<version>3.14.1</version>
<configuration>
<source>17</source>
<target>17</target>
<source>21</source>
<target>21</target>
<!-- ignore warnings about internal Java APIs which we use for WebIDCertGen -->
<compilerArgs>
<arg>-XDignore.symbol.file</arg>
Expand All @@ -243,7 +264,7 @@
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.9.0</version>
<version>0.10.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central-portal-snapshots</publishingServerId>
Expand All @@ -254,7 +275,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.0.0</version>
<version>3.6.3</version>
<executions>
<execution>
<id>find-xsl-files</id>
Expand Down Expand Up @@ -287,7 +308,7 @@
<plugin>
<groupId>org.honton.chas</groupId>
<artifactId>readfiles-maven-plugin</artifactId>
<version>0.0.1</version>
<version>0.1.0</version>
<executions>
<execution>
<id>read-comma-separated-xsl-file-list</id>
Expand Down Expand Up @@ -338,7 +359,7 @@
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.15.1</version>
<version>1.15.4</version>
<configuration>
<nodeVersion>v22.16.0</nodeVersion>
<npmVersion>11.4.2</npmVersion>
Expand Down Expand Up @@ -366,7 +387,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.2</version>
<version>3.5.1</version>
<configuration>
<warName>${build.warName}</warName>
<webappDirectory>${project.build.directory}/${build.warName}</webappDirectory>
Expand Down Expand Up @@ -432,7 +453,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<version>3.4.0</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -445,7 +466,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<version>3.12.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public static MultivaluedMap<String, String> solutionMapToMultivaluedMap(QuerySo
{
String varName = it.next();
RDFNode node = qsm.get(varName);
params.add("$" + varName, NodeFmtLib.str(node.asNode()));
params.add("$" + varName, NodeFmtLib.strNT(node.asNode()));
}

return params;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,13 @@
import jakarta.ws.rs.core.Response.Status;
import jakarta.ws.rs.core.SecurityContext;
import jakarta.ws.rs.core.UriInfo;
import org.apache.jena.iri.IRI;
import org.apache.jena.iri.IRIFactory;
import org.apache.jena.irix.IRIx;
import org.apache.jena.ontology.Ontology;
import org.apache.jena.query.DatasetFactory;
import org.apache.jena.query.Query;
import org.apache.jena.query.QueryFactory;
import org.apache.jena.rdf.model.Model;
import org.apache.jena.rdf.model.ModelFactory;
import org.apache.jena.riot.system.Checker;
import org.apache.jena.update.UpdateRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -182,15 +180,12 @@ public Response post(UpdateRequest update, @QueryParam(USING_GRAPH_URI) List<URI
* @param classIRIStr URI string
* @return IRI
*/
public static IRI checkURI(String classIRIStr)
public static IRIx checkURI(String classIRIStr)
{
if (classIRIStr == null) throw new IllegalArgumentException("URI String cannot be null");

IRI classIRI = IRIFactory.iriImplementation().create(classIRIStr);
// throws Exceptions on bad URIs:
Checker.iriViolations(classIRI);

return classIRI;
// IRIx.create() validates and throws IRIException on bad URIs
return IRIx.create(classIRIStr);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public Ontology getOntology(Application app, String uri)
URI ontologyURI = URI.create(uri);
// remove fragment and normalize
URI ontDocURI = new URI(ontologyURI.getScheme(), ontologyURI.getSchemeSpecificPart(), null).normalize();
Model baseModel = fileManager.loadModel(uri, ontDocURI.toString(), null);
Model baseModel = fileManager.loadModel(ontDocURI.toString());
OntModel ontModel = ModelFactory.createOntologyModel(ontModelSpec, baseModel);
ontModel.getDocumentManager().addModel(uri, ontModel, true);
}
Expand Down
Loading
Loading