steveswinsburg opened a new issue, #3786: URL: https://github.com/apache/jena/issues/3786
### Version 5.5.0 ### Question I'm trying to build a Quarkus application using GraalVM native-image, and I'm running into a persistent issue related to static initialisation in org.apache.jena.http.HttpEnv. Jena is a transitive dependency of another library I am using. The problem is that the static field `org.apache.jena.http.HttpEnv.httpClient` is initialised at class load time, which triggers the JDK HTTP client internals (SelectorManager, DebugLogger, etc.) to start threads and create objects before main() runs. GraalVM native-image cannot safely persist these objects/threads in the image heap. This results in a build-time/run-time initialization loop that cannot be resolved with native-image arguments. **Relevant code:** https://github.com/apache/jena/blob/main/jena-arq/src/main/java/org/apache/jena/http/HttpEnv.java#L61-L65 **Request:** Is it possible to refactor HttpEnv to remove the static initialization of the HTTP client? This would greatly improve compatibility with GraalVM native-image generation. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
