Hi Osma,
I checked with maven 3.8.1 / java 21 with no problems (I used 3.9.9 /
java17 to do the release).
NoClassDefFound Could not initialize class
together with the fact the class not found is in jena-arq as is the as
the place throwing the error suggests it is a class initialization
issue. i.e. JenaSystem.init
When did you last build Jena from source?
Andy
On 17/04/2025 15:10, Osma Suominen wrote:
Hi,
it's been a while. I tried building the release candidate, since I'm
interested in the timeout fixes included.
But I couldn't make the tests pass. There are tons of NoClassDefFound
exceptions in the ARQ tests, causing the build to break. See output
snippets at the end of the message. This is probably some simple mistake
on my end, though I can't figure it out. I'm reporting it because it
could be a problem with the release candidate, not just my environment.
I have cloned the repo and am using the release commit
1af1a75db645cf745ee418225b99651a60b2434a. git status shows "working tree
clean".
I have Ubuntu 24.04 with OpenJDK 21 JDK and Maven 3.8.7 installed from
Ubuntu packages.
$ java -version
openjdk version "21.0.6" 2025-01-21
OpenJDK Runtime Environment (build 21.0.6+7-Ubuntu-124.04.1)
OpenJDK 64-Bit Server VM (build 21.0.6+7-Ubuntu-124.04.1, mixed mode,
sharing)
$ mvn -version
Apache Maven 3.8.7
Maven home: /usr/share/maven
Java version: 21.0.6, vendor: Ubuntu, runtime: /usr/lib/jvm/java-21-
openjdk-amd64
Default locale: en_GB, platform encoding: UTF-8
OS name: "linux", version: "6.11.0-21-generic", arch: "amd64", family:
"unix"
I'm building from the command line, no IDE involved. I tried both of
these build commands (one from BUILD.md, another from the GitHub Actions
workflow), with essentially the same result:
mvn clean install -Pdev
mvn -B --file pom.xml -Dmaven.javadoc.skip=true install
Overview:
[ERROR] Tests run: 7901, Failures: 117, Errors: 6452, Skipped: 0
[INFO]
[INFO]
------------------------------------------------------------------------
[INFO] Reactor Summary for Apache Jena 5.4.0:
[INFO]
[INFO] Apache Jena ........................................ SUCCESS
[ 22.565 s]
[INFO] Apache Jena - IRI .................................. SUCCESS
[ 2.805 s]
[INFO] Apache Jena - IRI3986 .............................. SUCCESS
[ 2.843 s]
[INFO] Apache Jena - Language tags ........................ SUCCESS
[ 1.565 s]
[INFO] Apache Jena - Base ................................. SUCCESS
[ 2.688 s]
[INFO] Apache Jena - Core ................................. SUCCESS
[ 50.171 s]
[INFO] Apache Jena - ARQ .................................. FAILURE
[ 19.121 s]
[INFO] Apache Jena - ONTAPI ............................... SKIPPED
[INFO] Apache Jena - SHACL ................................ SKIPPED
[INFO] Apache Jena - ShEx ................................. SKIPPED
Examples of failures in ARQ tests (there are many more):
[ERROR]
TestNormalization>AbstractTestNormalization.normalize_float_19:108-
>AbstractTestNormalization.normalize:142 » NoClassDefFound Could not
initialize class org.apache.jena.sparql.util.NodeFactoryExtra
[ERROR]
TestNormalization>AbstractTestNormalization.normalize_float_20:109-
>AbstractTestNormalization.normalize:142 » NoClassDefFound Could not
initialize class org.apache.jena.sparql.util.NodeFactoryExtra
[ERROR]
TestNormalization>AbstractTestNormalization.normalize_float_21:110-
>AbstractTestNormalization.normalize:142 » NoClassDefFound Could not
initialize class org.apache.jena.sparql.util.NodeFactoryExtra
...
[ERROR] TestSSE_Builder.testBuildInt_01:73 NoClassDefFound Could not
initialize class org.apache.jena.sparql.sse.SSE
[ERROR] TestSSE_Builder.testBuildInt_02:80 NoClassDefFound Could not
initialize class org.apache.jena.sparql.sse.SSE
[ERROR] TestSSE_Builder.testBuildInt_03:87 NoClassDefFound Could not
initialize class org.apache.jena.sparql.sse.SSE
...
[ERROR] TestRDFStarTranslation.rdfx_01 » NoClassDefFound Could not
initialize class org.apache.jena.system.TestRDFStarTranslation
[ERROR] TestRDFStarTranslation.rdfx_02 » NoClassDefFound Could not
initialize class org.apache.jena.system.TestRDFStarTranslation
[ERROR] TestRDFStarTranslation.rdfx_03 » NoClassDefFound Could not
initialize class org.apache.jena.system.TestRDFStarTranslation
[ERROR] TestRDFStarTranslation.rdfx_04 » NoClassDefFound Could not
initialize class org.apache.jena.system.TestRDFStarTranslation
[ERROR] TestRDFStarTranslation.rdfx_05 » NoClassDefFound Could not
initialize class org.apache.jena.system.TestRDFStarTranslation
Thanks, and sorry for the noise.