Trouble with Quickstarts

Latest response

I downloaded and installed fuse on Karaf and codeReady studio and configured the Fuse on Karaf runtime as well as the fuse quickstarts and imported them into codeready studio.

All the quickstarts are showing problems.
mvn clean install in any of the quickstart directories where their pom is located gives this error.

[ERROR] Non-resolvable import POM: Could not find artifact org.jboss.redhat-fuse:fuse-karaf-bom:pom:7.6.0.fuse-760027-redhat-00001 in central (https://repo.maven.apache.org/maven2) @ line 55, column 25

Maven is working fine with dozens of lines like these...
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/felix/maven-bundle-plugin/3.5.1/maven-bundle-plugin-3.5.1.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/felix/maven-bundle-plugin/3.5.1/maven-bundle-plugin-3.5.1.pom (9.9 kB at 4.0 kB/s)

So the real question is how do I get these fuse on karaf quickstarts working?

Attachments

Responses

I reimported not as a fuse integration project but as a maven project and fixed some duplicate executions in the pom but now getting the following...For artifact {javax.servlet:javax.servlet-api:null:jar}: The version cannot be empty. (org.apache.maven.plugins:maven-resources-plugin:3.0.2:resources:default-resources:process-resources)

<version.plugin.maven-resources-plugin>3.0.2</version.plugin.maven-resources-plugin>

org.apache.maven.plugins maven-resources-plugin ${version.plugin.maven-resources-plugin}

I resolved this myself with a little help from google I found the attached maven settings file for RedHat repositories. That solved the build problem.

https://access.redhat.com/documentation/en-us/jboss_enterprise_application_platform/6.2/html/getting_started_guide/configure_the_maven_settings_for_use_with_command_line

Glad to hear that you got the trouble sorted out! Just to provide a bit of context for the error you encountered. When you use the quickstarts from CodeReady studio, the assumption is that you will also use CodeReady studio to build the quickstarts. If you installed the Red Hat Fuse Tooling package in CodeReady studio, this should preconfigure the location of the Red Hat Maven registry for you (CodeReady has a built-in Maven configuration that is separate from the command line Maven tool). So, it should be possible to build a Fuse on Karaf quickstart using the Build action in CodeReady studio, but the equivalent 'mvn install' command at the command line will fail, because the command-line Maven is not configured to search the Red Hat Maven registry.

Instructions for configuring command-line Maven are also provided in Chapter 4 of the Getting Started guide: https://access.redhat.com/documentation/en-us/red_hat_fuse/7.6/html-single/getting_started/index#set-up-maven-locally

Well not so fast Michael (me). I got a new computer and installed all the usual suspects, java jdk and jre 1.7-11, 1.8-15 and maven, and CodeReady 12. Then i downloaded and imported the beginner quickstarts. Thinking I was goldent, I tried to open one of the camel conexts and got this...An internal error occurred during: "Loading errors.xml of project beginner-camel-errorhandler". Could not initialize class groovy.grape.GrapeIvy Whole new problem.

As mentioned by Fintan, when using templates that are not provided as template in Fuse Tooling wizard, you need to configure Maven repositories. https://access.redhat.com/documentation/en-us/red_hat_fuse/7.6/html-single/getting_started/index#set-up-maven-locally

Can you precise from where you downloaded the quickstart please? Can you provide the error log related to the GrapeIvy error?

" java jdk and jre 1.7-11, 1.8-15" If you have several jvm installed. Can you precise which jvm is used by the CodeReady Studio? You should look in /studio/codereadystudio.ini if there is a -vm provided. a jre 11 or newer is required.

Tried to insall Ivy but it says...Cannot complete the install because some dependencies are not satisfiable Software being installed: a.jre.javase 11.0.0 Software currently installed: Red Hat CodeReady Studio (Branded Product) 12.17.0.GA-v20201001-1023-B6979 (com.jboss.devstudio.core.package 12.17.0.GA-v20201001-1023-B6979) Cannot satisfy dependency: From: Red Hat CodeReady Studio (Branded Product) 12.17.0.GA-v20201001-1023-B6979 (com.jboss.devstudio.core.package 12.17.0.GA-v20201001-1023-B6979) To: org.eclipse.equinox.p2.iu; a.jre.javase [1.7.0,12.0.0)

Can you precise what you mean by "installing Ivy"? Do you mean that you try to install Apache IvyIDE? http://ant.apache.org/ivy/ivyde/ If yes, there is no need for that. The Apache IvyIDE is for projects defined with Ivy file. It is not the case for Fuse projects. Ivy is used under the cover for providing tooling (providing Camel component catalog).

There are lot many issues in CodeReady IDE when run in Windows It always freezes on some fixed percentage while build from Maven and then never recovers. I had to kill the Java process and then launch it again. Now doing some labs, I am getting following execption in Workspace log

!ENTRY org.eclipse.core.jobs 4 2 2021-01-12 23:03:53.068 !MESSAGE An internal error occurred during: "Loading camelContext.xml of project camel-lab-2". !STACK 0 java.lang.NoClassDefFoundError: Could not initialize class groovy.grape.GrapeIvy at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:377) at groovy.grape.Grape.getInstance(Grape.java:123) at groovy.grape.Grape.addResolver(Grape.java:228) at org.apache.camel.catalog.maven.MavenVersionManager.addMavenRepository(MavenVersionManager.java:86) at org.fusesource.ide.camel.model.service.internal.DynamicCamelCatalog.configureAdditionalRepos(DynamicCamelCatalog.java:56) at org.fusesource.ide.camel.model.service.internal.DynamicCamelCatalog.(DynamicCamelCatalog.java:47) at org.fusesource.ide.camel.model.service.internal.CamelService.createCatalogForNotEmbeddedVersions(CamelService.java:85) at org.fusesource.ide.camel.model.service.internal.CamelService.getCatalog(CamelService.java:65) at org.fusesource.ide.camel.model.service.internal.CamelService.updateMavenRepositoryLookup(CamelService.java:179) at org.fusesource.ide.camel.model.service.core.catalog.cache.CamelCatalogCacheManager.getCamelModelForProject(CamelCatalogCacheManager.java:131) at org.fusesource.ide.camel.model.service.core.catalog.cache.CamelCatalogCacheManager.getCamelModelForProject(CamelCatalogCacheManager.java:90) at org.fusesource.ide.camel.model.service.core.model.AbstractCamelModelElement.getEipByName(AbstractCamelModelElement.java:1417) at org.fusesource.ide.camel.model.service.core.model.AbstractCamelModelElement.(AbstractCamelModelElement.java:132) at org.fusesource.ide.camel.model.service.core.model.CamelRouteContainerElement.(CamelRouteContainerElement.java:26) at org.fusesource.ide.camel.model.service.core.model.CamelContextElement.(CamelContextElement.java:56) at org.fusesource.ide.camel.model.service.core.model.CamelFile.initialize(CamelFile.java:126) at org.fusesource.ide.camel.model.service.core.io.CamelIOHandler.readDocumentToModel(CamelIOHandler.java:150) at org.fusesource.ide.camel.model.service.core.io.CamelIOHandler.loadCamelModel(CamelIOHandler.java:110) at org.fusesource.ide.camel.model.service.core.io.CamelIOHandler.loadCamelModel(CamelIOHandler.java:63) at org.fusesource.ide.camel.editor.navigator.CamelCtxNavContentProvider$LoadingCamelRoutesForNavigatorViewerJob.getRoutes(CamelCtxNavContentProvider.java:162) at org.fusesource.ide.camel.editor.navigator.CamelCtxNavContentProvider$LoadingCamelRoutesForNavigatorViewerJob.run(CamelCtxNavContentProvider.java:147) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

freezing issue might come from this know issue https://bugs.eclipse.org/bugs/show_bug.cgi?id=569714 To be sure, when reproducing, you will need to take a thread dump and check the stacks. For investigation on freeze, a thread dump will be required anyway (unless you find steps to reproduce working 100% of the time)

For the Groovy stack, can you precise which lab you are using? Also as mentioned Lars, can you provide the version the jvm used for your CodeReady Studio?

@Ashish can you provide some more information on what you did to get this error? We also need to know the version of your Code Ready Studio and your Java / Maven.

Thank you, Lars

Please find the attached details Red Hat CodeReady Studio

Version: 12.17.0.GA Build id: GA-v20201001-1023-B6979 Build date: 20201001-1023

Java Version - zulu15.28.51-ca-jdk15.0.1-win_x64 Maven - Apache Maven 3.5.0

Also I am onto "Camel Development with Red Hat Fuse 7 Part 1" Module 1 - Envinronment Setup course. After importing as Maven project it never completes beyond 73% and runs forever.

I also did some workaround to get it resolved. But now when I am onto Lab 2 - Core Concepts - Exercise 2 (Design New Project) - I am getting following error

An internal error occurred during: "Loading camelContext.xml of project camel-lab-2". Could not initialize class groovy.grape.GrapeIvy

To fix this issue, I added groovy-all.jar into build path but still getting similar error. I don't know how to fix that.

May I ask you to try using Java 11 instead of Java 15?

Yes Lars, I initially tried with Java 11. FYI.. I was using Adopt Open JDK 11 (https://adoptopenjdk.net/). Do you have any recommendation for other version or vendor for Java 11?

I would suggest using OpenJDK 11 instead.

Hi Lars,

Thank you very much. It did somewhat trick for me. But now when I am creating a new project -> Select a Target Environment Standalone and 2.23.2.fuse-780036-redhat-00001 (Fuse 7.8.0 GA)) but no template displayed into Advanced Project Setup page. Can you help me on the same too?

And once again thank you and Aurélien very much for your previous useful suggestions.

For Fuse 7.8, you will need to wait next CodeReady Studio release to have the templates compatible with Karaf and EAP. Planned release date is the 26th January. If you cannot wait, you can try to install snapshots from update site: https://download.jboss.org/jbosstools/photon/snapshots/builds/jbosstools-fuse_master/latest/all/repo/

For Fuse 7.7, you will need to pick the Camel 2.21.x version to have the templates compatible with Karaf and EAP.

Also I am onto "Camel Development with Red Hat Fuse 7 Part 1" Module 1 - Envinronment Setup course. After importing as Maven project it never completes beyond 73% and runs forever.

freezing issue might come from this known issue https://bugs.eclipse.org/bugs/show_bug.cgi?id=569714 To be sure, when reproducing, you will need to take a thread dump and check the stacks. For investigation on freeze, a thread dump will be required anyway (unless you find steps to reproduce working 100% of the time)

But now when I am onto Lab 2 - Core Concepts - Exercise 2 (Design New Project) - I am getting following error An internal error occurred during: "Loading camelContext.xml of project camel-lab-2". Could not initialize class groovy.grape.GrapeIvy

Can you precise which lab you are using? Can you provide a link to the documentation used? the github repo cloned?

I am using following Github location

https://github.com/gpe-mw-training/camel-labs/releases/tag/v1.0-exercise

I can reproduce the Groovy stack error using Zulu 15 version.

Please double-check that the Java 11 version is picked by CodeReady Studio. For instance, you can run jconsole, connect to the local process with name "org.eclipse.equinox.launcher_xxxxx", then go to tab VM summary.

You can double-check the PathToCodereadyStudioInstall/studio/codereadystudio.ini if there is a -vm provided and the value that it has.

Also please note that this github repository has not been updated for 2 years. The version used is Fuse 7.1. Fuse 7.8 has been released recently. Several tutorials are available from documentation page: https://access.redhat.com/documentation/en-us/red_hat_fuse

nota: created an issue to support jdk 15 https://issues.redhat.com/browse/FUSETOOLS-3394