You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "jamesnetherton (via GitHub)" <gi...@apache.org> on 2025/04/11 09:40:36 UTC

[I] [quarkus-main] git integration tests fail due to java.lang.IllegalAccessError for org.eclipse.jgit.dircache.DirCache$DirCacheVersion [camel-quarkus]

jamesnetherton opened a new issue, #7257:
URL: https://github.com/apache/camel-quarkus/issues/7257

   ### Bug description
   
   Not sure what's going on here. `git` integration tests are failing during the augmentation phase with Quarkus 999-SNAPSHOT.
   
   ```
   Caused by: java.lang.IllegalAccessError: failed to access class org.eclipse.jgit.dircache.DirCache$DirCacheVersion from class io.quarkus.jgit.deployment.JGitProcessor (org.eclipse.jgit.dircache.DirCache$DirCacheVersion and io.quarkus.jgit.deployment.JGitProcessor are in unnamed module of loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @29f3c438)
   	at io.quarkus.jgit.deployment.JGitProcessor.reflection(JGitProcessor.java:43)
   	at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:733)
   	at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:856)
   	at io.quarkus.builder.BuildContext.run(BuildContext.java:255)
   	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
   	at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2675)
   	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2654)
   	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1591)
   	at java.base/java.lang.Thread.run(Thread.java:1583)
   	at org.jboss.threads.JBossThread.run(JBossThread.java:499)
   ```
   
   Might be related to the recent class loading improvements in Quarkus. But, the weird thing is, if I craft a simple app and import the Quarkus & Camel Quarkus SNAPSHOT BOMs, I don't see any failures.
   
   I'll disable the tests for now.


-- 
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: commits-unsubscribe@camel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [quarkus-main] git integration tests fail due to java.lang.IllegalAccessError for org.eclipse.jgit.dircache.DirCache$DirCacheVersion [camel-quarkus]

Posted by "gastaldi (via GitHub)" <gi...@apache.org>.
gastaldi commented on issue #7257:
URL: https://github.com/apache/camel-quarkus/issues/7257#issuecomment-2802210936

   Ok, I created https://github.com/quarkiverse/quarkus-jgit/issues/191 and will provide a PR ASAP


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [quarkus-main] git integration tests fail due to java.lang.IllegalAccessError for org.eclipse.jgit.dircache.DirCache$DirCacheVersion [camel-quarkus]

Posted by "holly-cummins (via GitHub)" <gi...@apache.org>.
holly-cummins commented on issue #7257:
URL: https://github.com/apache/camel-quarkus/issues/7257#issuecomment-2800811008

   Hmm, that does look like it could be related, although since both classes are in the same classloader, it's sort of hard to even see what the problem is. I've sometimes found things reproduce if there are several `@TestProfile` or `@WithTestResource` in the same project... but again, the problems that causes are usually things like 'using the wrong classloader' or 'classloader got closed too early'. So the more I stare at it, the less likely it seems to be related.
   
   @dmlloyd, do you have any thoughts here? 


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] git integration tests fail due to java.lang.IllegalAccessError for org.eclipse.jgit.dircache.DirCache$DirCacheVersion [camel-quarkus]

Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton closed issue #7257: git integration tests fail due to java.lang.IllegalAccessError for org.eclipse.jgit.dircache.DirCache$DirCacheVersion
URL: https://github.com/apache/camel-quarkus/issues/7257


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [quarkus-main] git integration tests fail due to java.lang.IllegalAccessError for org.eclipse.jgit.dircache.DirCache$DirCacheVersion [camel-quarkus]

Posted by "ppalaga (via GitHub)" <gi...@apache.org>.
ppalaga commented on issue #7257:
URL: https://github.com/apache/camel-quarkus/issues/7257#issuecomment-2802117536

   Thanks @holly-cummins @dmlloyd and @gastaldi  for your assistance! 
   
   Do you think @gastaldi that we could have a BOM in Quarkus JGit that would manage jgit? We could import that BOM in Camel Quarkus to solve the current problem.


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] git integration tests fail due to java.lang.IllegalAccessError for org.eclipse.jgit.dircache.DirCache$DirCacheVersion [camel-quarkus]

Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
jamesnetherton commented on issue #7257:
URL: https://github.com/apache/camel-quarkus/issues/7257#issuecomment-2820932698

   Fixed by #7265.


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [quarkus-main] git integration tests fail due to java.lang.IllegalAccessError for org.eclipse.jgit.dircache.DirCache$DirCacheVersion [camel-quarkus]

Posted by "gastaldi (via GitHub)" <gi...@apache.org>.
gastaldi commented on issue #7257:
URL: https://github.com/apache/camel-quarkus/issues/7257#issuecomment-2801991649

   FTR I've removed JGit from the quarkus-bom in https://github.com/quarkusio/quarkus/pull/47137, which means that Eclipse JGit version is no longer enforced in main


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [quarkus-main] git integration tests fail due to java.lang.IllegalAccessError for org.eclipse.jgit.dircache.DirCache$DirCacheVersion [camel-quarkus]

Posted by "gastaldi (via GitHub)" <gi...@apache.org>.
gastaldi commented on issue #7257:
URL: https://github.com/apache/camel-quarkus/issues/7257#issuecomment-2802129964

   @ppalaga AFAIU depending on quarkus-jgit 3.4.2 AND quarkus 3.21.2 should be enough. I am not sure if introducing a quarkus-jgit BOM would be a good idea, as it would require you to import that BOM along with the quarkus-bom.


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [quarkus-main] git integration tests fail due to java.lang.IllegalAccessError for org.eclipse.jgit.dircache.DirCache$DirCacheVersion [camel-quarkus]

Posted by "ppalaga (via GitHub)" <gi...@apache.org>.
ppalaga commented on issue #7257:
URL: https://github.com/apache/camel-quarkus/issues/7257#issuecomment-2802186177

   > quarkus-jgit 3.4.2 AND quarkus 3.21.2 should be enough
   
   That combination does not manage jgit anywhere, right? 
   We would prefer Quarkus jGit to manage its prefered version so that we avoid any random clash with camel-git. 
   
   > it would require you to import that BOM before the quarkus-bom (if using a Quarkus version < 3.21.2
   
   I do not think that's an issue for us. 


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [quarkus-main] git integration tests fail due to java.lang.IllegalAccessError for org.eclipse.jgit.dircache.DirCache$DirCacheVersion [camel-quarkus]

Posted by "dmlloyd (via GitHub)" <gi...@apache.org>.
dmlloyd commented on issue #7257:
URL: https://github.com/apache/camel-quarkus/issues/7257#issuecomment-2801754406

   On 2025-03-25, there was a dependabot update to the `quarkus-jgit` Quarkiverse project to update `jgit` from version `7.1.0.202411261347-r` to `7.2.0.202503040940-r`. As a part of this change, @gastaldi changed the class name strings used to register things for reflection to direct class references. This change was included in versions `3.4.0` and later of this extension.
   
   The public class in question - `org.eclipse.jgit.dircache.DirCache.DirCacheVersion` - is marked as `@since 7.2`. Prior to this version, the class in question existed, but was marked package-private. Accessing this (package-private) class in this way (as if it were public) would result in exactly the error & stack seen above.
   
   So, I infer that this access error is occurring because the `quarkus-jgit` extension version is mismatched with respect to the version of `jgit` itself.
   
   It looks like the `camel-quarkus` extension is using version `3.3.3` of `quarkus-jgit`. However, something in the dependency graph must be using a newer version. Because of Maven's... "unusual"... resolution logic, transitive dependency versions are (usually) determined more strongly by closeness to the "root" of the dependency tree rather than a less surprising algorithm (such as latest-always-wins).
   
   The quick fix would be to update the `quarkus-jgit` extension, or to explicitly manage the version of `jgit` to match what `quarkus-jgit` is expecting.
   
   It would be a good idea to do some dependency analysis and figure out why you are getting conflicting versions of `quarkus-jgit` though.


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org