Camel IDEA plugin cannot download the Camel Catalog
I get the following error in my Camel 3.7.3 projects.
Camel IDEA plugin cannot download the Camel catalog for the Karaf Runtime with version 3.7.3. Will fallback and use the Camel catalog version 3.18.2
Any idea why this happens? camel-catalog 3.7.3 is available in my local Maven repository.
Could you please provide a simple project to reproduce? Or anything that could help to reproduce?
There is a camel-karaf catalog as well in its own JAR, that is what is attempted to be downloaded https://search.maven.org/artifact/org.apache.camel.karaf/catalog
The camel-karaf catalog does exist in my local repository. In the file idea.log I get the following warning:
2022-10-09 13:30:15,062 [5374216] WARN - #c.g.c.i.s.CamelMavenVersionManager - Could not load the catalog version 3.7.3: Error grabbing Grapes -- [unresolved dependency: org.apache.camel#camel-catalog;3.7.3: not found]
camel-catalog jar is also available in my m2 folder.
camel 3.7 is an old version, can you try using a new camel version
Same problem with a more recent version:
2022-10-09 15:20:02,842 [11961996] FINE - #c.g.c.i.s.CamelMavenVersionManager - java.lang.RuntimeException: Error grabbing Grapes -- [unresolved dependency: org.apache.camel#camel-catalog;3.14.5: not found] at groovy.grape.GrapeIvy.getDependencies(GrapeIvy.groovy:455) at groovy.grape.GrapeIvy.resolve(GrapeIvy.groovy:625) at groovy.grape.GrapeIvy.resolve(GrapeIvy.groovy:592) at groovy.grape.GrapeIvy.grab(GrapeIvy.groovy:256) at groovy.grape.GrapeIvy.grab(GrapeIvy.groovy:236) at groovy.grape.Grape.grab(Grape.java:153) at com.github.cameltooling.idea.service.CamelMavenVersionManager.loadVersion(CamelMavenVersionManager.java:74) at com.github.cameltooling.idea.service.CamelCatalogService.loadVersion(CamelCatalogService.java:116) at com.github.cameltooling.idea.service.CamelService.downloadNewCamelCatalogVersion(CamelService.java:556) at com.github.cameltooling.idea.service.CamelService$1.run(CamelService.java:465) at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:442) at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:114) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$5(CoreProgressManager.java:493) at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:252) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:188) at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$12(CoreProgressManager.java:608) at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:683) at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:639) at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:607) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60) at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:175) at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:252) at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699) at java.base/java.lang.Thread.run(Thread.java:833)
Do you have a custom configuration of Grape? In other words, do you have a file located at ~/.groovy/grapeConfig.xml?
Could you please add the next system properties into the file idea.vmoptions (see https://www.jetbrains.com/help/idea/tuning-the-ide.html#configure-jvm-options to know where it is located according to your OS)
-Dgroovy.grape.report.downloads=true
-Divy.message.logger.level=4
Then relaunch your project and give us the log
Thanks for the tip with grapeConfig.xml. I was able to solve the issue by adding the repos to the XML and selecting the runtime provider "Auto detect". However, when I select the Camel Runtime Provider "Karaf" in the settings, I still get the error message "Camel IDEA plugin cannot download the Camel catalog for the Karaf Runtime with version 3.7.3. Will fallback and use the Camel catalog version 3.19.0".
2022-11-10 18:32:23,157 [ 240784] FINE - #c.g.c.i.s.CamelMavenVersionManager - Trying to find the resource org/apache/camel/catalog/karaf/components.properties from the catalog 2022-11-10 18:32:23,164 [ 240791] FINE - #c.g.c.i.s.CamelMavenVersionManager - The resource org/apache/camel/catalog/karaf/components.properties could not be found in the catalog
Do you know what is causing this error? It looks like "camel-catalog-provider-karaf" won't be downloaded even if it's available in the repo.
Those log entries are not relevant to spot the problem, could you please do what I described in my previous comment?
Thx for the log, I see that it is on a Windows OS, it is not well tested on it. I planned to work on that next week
I could not reproduce your problem while working on other problems that are Windows related. Could you propose a simple project to reproduce?
Or if a project among the examples works on your side, like this one https://github.com/apache/camel-examples/tree/main/examples/main
Yes, same problem with with your linked project (version 3.7.0) as soon as I switch the runtime provider in the plugin settings to "Karaf".
Error: "Camel IDEA plugin cannot download the Camel catalog for the Karaf Runtime with version 3.7.0. Will fallback and use the Camel catalog version 3.19.0"
Interesting, thx for the feedback. Do you get the error with any other runtime or it is only with Karaf? And do you get this error with a more recent version of Camel?
Same for Quarkus and Spring Boot. Only Default and Auto detect (Default) seems to work.
And what about the version? What happens if you use Camel 3.18?
Same problem. With version 3.18 even the Default runtime can't be downloaded.
I can reproduce thx
If you force a runtime and the corresponding core artifacts are not part of the dependencies of the project, the catalog is not downloaded which needs to be more flexible. I created a ticket for that https://github.com/camel-tooling/camel-idea-plugin/issues/769
What I mean is the fact that we are potentially mixing 2 problems here. With the example "main" because of the issue described previously only the "Default" runtime can work so what you described in this comment is expected with the current code. What is not normal is the fact that with 3.18, the "Default" runtime doesn't work on your side. Unfortunately, I cannot reproduce this behavior so it will be hard for me to fix it.
After a restart of IDEA, the download now seems to work for the "Default" runtime with Camel 3.18.0. No idea what caused the problem before. Sorry for the circumstances.
While working on https://github.com/camel-tooling/camel-idea-plugin/pull/771, I met a problem with localm2, as workaround I simply removed it from the grapeConfig.xml
Okay there is a new 0.9.0 release out as well. As we cannot reproduce this, then lets close it, and you can reopen if we can see this again, or create a new ticket.