IRI resolution against a same-scheme base rewrites absolute info: IRIs (info:a/b -> info:a/a/b) since jena-iri removal
Maintainers usually reply within 1 day
@afs is already working on this.
Since Nov 6, 2026.
Assessment
This issue has not been assessed yet.
Description
Version
6.2.0
What happened?
When the base IRI and the reference share a scheme and the scheme uses a rootless path with no authority (e.g. info:), an absolute reference is resolved as if it were relative:
var m = ModelFactory.createDefaultModel();
m.read(new ByteArrayInputStream(
"<info:fedora/resource1> <http://x/p> <info:fedora/resource2> .".getBytes()),
"info:fedora/resource1", "TURTLE");
m.write(System.out, "N-TRIPLES");
Jena 5.5.0 (default provider IRIProviderJenaIRI):
<info:fedora/resource1> <http://x/p> <info:fedora/resource2> .
Jena 6.2.0 (default provider IRIProvider3986):
<info:fedora/fedora/resource1> <http://x/p> <info:fedora/fedora/resource2> .
The same happens with UpdateFactory.create(sparql, base).
The cause is in IRI3986.resolve, which already behaves this way in 5.5.0:
IRI3986.create("info:fedora/resource1").resolve(IRI3986.create("info:fedora/resource2"))
// -> info:fedora/fedora/resource2
This matches the non-strict branch of RFC 3986 §5.2.2 (if (!strict) and R.scheme == Base.scheme then undefine R.scheme). RFC 3986 calls this a loophole from earlier specifications whose use "should be avoided" and keeps it only for backward compatibility. A reference with a scheme is expected to be returned unchanged, apart from dot-segment removal.
In 5.x this did not matter because IRIProviderJenaIRI was the default. 6.x removes jena-iri, so IRIProvider3986 is the only provider and there is no way to get strict resolution.
Impact: Fedora Commons (fcrepo) parses internal RDF and SPARQL Update with an info:fedora/... base. With 6.x, every absolute info:fedora/... IRI is rewritten to info:fedora/fedora/..., which corrupts stored triples. Found while evaluating the upgrade in https://github.com/fcrepo/fcrepo/pull/2338.
Expected: an absolute reference whose scheme equals the base's scheme resolves to itself (strict RFC 3986 resolution), or strict mode can at least be configured.
- Dominant language
- Java
- Stars
- 1.5k
- Forks
- 733
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 48
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/jena
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
rset command throws NPE in ResultsFormat.guessSyntaxPossibly taken @Ostrzyciel claimed this 19 days ago. Openbug Cmd
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug JSON-LD
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
apache/jena#4175 · 6 comments ·
Maintainers usually reply within 1 day
-
Flaky e2e fuseki-ui test "Edits the graph"Possibly taken @OyvindLGjesdal claimed this today. Openbug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 30/100
apache/jena#4364 · 15 comments ·
Maintainers usually reply within 1 day
Similar issues
-
Type: bug
Difficulty 1/5 Under an hour Newbie friendliness 83/100
apache/parquet-java#3941 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
objectionary/sabj25#47 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
jakartaee/expression-language#501 ·
Maintainers usually reply within 7 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
objectionary/hone-maven-plugin#1392 ·
Maintainers usually reply within 1 day