arne-bdt commented on issue #2787:
URL: https://github.com/apache/jena/issues/2787#issuecomment-2430051418

   > Ok, got it.
   > 
   > @afs This reliably gets stuck every time I run it, with a very similar 
thread dump to what I posted above: 
https://github.com/Ostrzyciel/jena-default-graphs/blob/issue-2787/jena-default-graphs/src/main/java/org/example/Main.java
   > 
   > I'm not sure if this qualifies as a "bug", but it's surely pretty 
confusing to me.
   
   We are encountering a chicken-and-egg problem with the `ModelFactory` and 
`JenaSystem.init()`. 
   
   The `ModelFactory` has a static constructor call to `JenaSystem.init();`. 
This means that `ModelFactory` assumes the `JenaSystem` has already been 
initialized and requires `JenaSystem.init()` to be called first.
   
![image](https://github.com/user-attachments/assets/0ce295e1-ad5d-4eba-aba4-2839239981ad)
   
   However, during the `JenaSystem.init()` process, some code is executed that 
calls `ModelFactory.createDefaultModel()`, which in turn assumes that 
`ModelFactory` is already available, even though `JenaSystem.init()` has not 
yet completed.
   
![image](https://github.com/user-attachments/assets/1c85fd72-1068-435d-822a-bbb26d8148ff)
   
   This circular dependency between `JenaSystem` initialization and the 
`ModelFactory` is causing the issue.
   
   Unfortunately, I don’t yet have a clue how to fix it.


-- 
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]

Reply via email to