Skip to content

Ping fails with NoClassDefFoundError: org/eclipse/jetty/util/log/Log #645

@dennisvang

Description

@dennisvang

Although harvesting (after "Trigger ping") seems to work fine, a NoClassDefFoundError is caught, related to org.eclipse.jetty.util.log.Log:

...
org.fairdatapoint.service.index.harvester.HarvesterService.harvest(java.lang.String) throws
    org.fairdatapoint.database.rdf.repository.exception.MetadataRepositoryException
java.lang.NoClassDefFoundError: org/eclipse/jetty/util/log/Log
...

Not sure if this actually breaks anything in the background...

Looks like jetty.util.log has been dropped (jetty/jetty.project#4572), but rdf4j has not yet caught up?

Possibly related to eclipse-rdf4j/rdf4j#4638

Reproduced running 652ca3c from source (using IntelliJ), and using corresponding locally built docker image.

click to see full logs
...
25-03-06 16:08:20,606 8378 [main] INFO  org.springframework.boot.web.embedded.tomcat.TomcatWebServer - Tomcat started on port 8080 (http) with context path '/'
2025-03-06 16:08:20,614 8386 [main] INFO  org.fairdatapoint.Application - Started Application in 7.248 seconds (process running for 8.416)
20
...
2025-03-06 16:12:10,880 238652 [fdp-task-3] INFO  org.fairdatapoint.service.index.event.EventService - Triggering metadata retrieval for https://staging.fairdatapoint.org as null
2025-03-06 16:12:10,882 238654 [fdp-task-2] INFO  org.fairdatapoint.service.index.entry.IndexEntryService - Checking index entry for 'https://staging.fairdatapoint.org'
2025-03-06 16:12:10,887 238659 [fdp-task-2] INFO  org.fairdatapoint.service.index.harvester.HarvesterService - Start harvesting 'https://staging.fairdatapoint.org'
2025-03-06 16:12:10,889 238661 [fdp-task-2] INFO  org.fairdatapoint.service.index.harvester.HarvesterService - Making request to 'https://staging.fairdatapoint.org'
2025-03-06 16:12:10,900 238672 [fdp-task-3] INFO  org.fairdatapoint.service.index.event.EventService - Retrieving metadata for https://staging.fairdatapoint.org
2025-03-06 16:12:10,927 238699 [fdp-task-2] ERROR org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler - Unexpected exception occurred invoking async method: public void org.fairdatapoint.service.index.harvester.HarvesterService.harvest(java.lang.String) throws org.fairdatapoint.database.rdf.repository.exception.MetadataRepositoryException
java.lang.NoClassDefFoundError: org/eclipse/jetty/util/log/Log
	at org.eclipse.jetty.http2.hpack.HpackEncoder.<clinit>(HpackEncoder.java:46) ~[http2-hpack-9.4.41.v20210516.jar:9.4.41.v20210516]
	at org.eclipse.jetty.http2.hpack.HpackFieldPreEncoder.getEncodedField(HpackFieldPreEncoder.java:49) ~[http2-hpack-9.4.41.v20210516.jar:9.4.41.v20210516]
	at org.eclipse.jetty.http.PreEncodedHttpField.<init>(PreEncodedHttpField.java:79) ~[jetty-http-12.0.16.jar:12.0.16]
	at org.eclipse.jetty.http.PreEncodedHttpField.<init>(PreEncodedHttpField.java:85) ~[jetty-http-12.0.16.jar:12.0.16]
	at org.eclipse.jetty.http.PreEncodedHttpField.<init>(PreEncodedHttpField.java:90) ~[jetty-http-12.0.16.jar:12.0.16]
	at org.eclipse.jetty.http.HttpFields.<clinit>(HttpFields.java:58) ~[jetty-http-12.0.16.jar:12.0.16]
	at org.eclipse.jetty.client.transport.HttpRequest.<init>(HttpRequest.java:70) ~[jetty-client-12.0.16.jar:12.0.16]
	at org.eclipse.jetty.client.HttpClient.newHttpRequest(HttpClient.java:448) ~[jetty-client-12.0.16.jar:12.0.16]
	at org.eclipse.jetty.client.HttpClient.newRequest(HttpClient.java:438) ~[jetty-client-12.0.16.jar:12.0.16]
	at org.springframework.http.client.JettyClientHttpRequestFactory.createRequest(JettyClientHttpRequestFactory.java:136) ~[spring-web-6.2.3.jar:6.2.3]
	at org.springframework.http.client.support.HttpAccessor.createRequest(HttpAccessor.java:124) ~[spring-web-6.2.3.jar:6.2.3]
	at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:883) ~[spring-web-6.2.3.jar:6.2.3]
	at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:800) ~[spring-web-6.2.3.jar:6.2.3]
	at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:682) ~[spring-web-6.2.3.jar:6.2.3]
	at org.fairdatapoint.service.index.harvester.HarvesterService.makeRequest(HarvesterService.java:145) ~[classes/:?]
	at org.fairdatapoint.service.index.harvester.HarvesterService.visitNode(HarvesterService.java:105) ~[classes/:?]
	at org.fairdatapoint.service.index.harvester.HarvesterService.harvest(HarvesterService.java:82) ~[classes/:?]
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[?:?]
	at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[?:?]
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:359) ~[spring-aop-6.2.3.jar:6.2.3]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196) ~[spring-aop-6.2.3.jar:6.2.3]
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-6.2.3.jar:6.2.3]
	at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:114) ~[spring-aop-6.2.3.jar:6.2.3]
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[?:?]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
	at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.util.log.Log
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[?:?]
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[?:?]
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526) ~[?:?]
	... 27 more
2025-03-06 16:12:11,178 238950 [fdp-task-3] INFO  org.fairdatapoint.service.index.event.EventService - Parsing metadata for https://staging.fairdatapoint.org
2025-03-06 16:12:11,179 238951 [fdp-task-3] INFO  org.fairdatapoint.service.index.event.EventService - Storing metadata for https://staging.fairdatapoint.org
2025-03-06 16:12:11,214 238986 [fdp-task-3] INFO  org.fairdatapoint.service.index.event.EventService - Finished metadata retrieval triggered by befcf4ed-0c1c-4530-946b-8f29bbd77f48
2025-03-06 16:12:11,214 238986 [fdp-task-2] INFO  org.fairdatapoint.service.index.webhook.WebhookService - Triggered webhook event ENTRY_VALID by event 9a3260a5-0d37-4c04-b21a-43ef35648394

UPDATE

Turns out this causes scheduled pings to fail.

This was reproduced in v1.17.4 as well as the current develop branch (upcoming v2).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions