Hi Osma,
Strange!
Because the NoClassDefFound relates to classes within the current maven
module, it can't be "not found" as far as I know; the "Could not
>>> initialize" points to problems in class initizialation code with
an error thrown deep in in the initialization execution.
But when I try to simulate that, I get a stack trace.
Is there a stack trace in the logs? (Do you have the complete maven logs
you could send to me?)
The build won't have touched jena-ontapi, nor have it on the class path
when running ARQ tests.
When build and testing the release (I did build clean from source) I use
a complete clean maven repository to make sure the there are clean
copies of all dependencies.
Andy
On 18/04/2025 09:05, Osma Suominen wrote:
Hi Andy!
Thanks for checking.
Re last build - on this machine, basically never, except I did test the
timeout fixes a few weeks ago, but I skipped the tests then to save
time. I believe the problem is with running the tests, not the compiling
of classes.
I downloaded all the previous 5.*.0 source releases as zips and tried
building them using "mvn clean install -Pdev". Results:
5.0.0: success
5.1.0: failure
5.2.0: failure
5.3.0: failure
So whatever the problem is, it's not a regression against the previous
5.3.0 release but it happened earlier. I checked the Jena 5.1.0 release
notes, but the only possibly relevant thing I can see there is the
addition of jena-ontapi.
I will be on holiday until Tuesday, but when I get back, I can try to
test the build on some other machines to see if I can pinpoint the
cause. At the moment it's obviously hard since this only happens on one
particular system.
Anyway, I wouldn't consider this a release blocker if nobody else has
encountered it so far. It's probably some unfortunate combination of
changes in Jena and specifics of my own setup (which should be fairly
vanilla, as I don't do much Java development on this machine).
-Osma
On 17/04/2025 23:13, Andy Seaborne wrote:
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.