Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev mode does not work using platform 1.4.1 #1171

Closed
hakuseki opened this issue Apr 30, 2020 · 7 comments
Closed

Dev mode does not work using platform 1.4.1 #1171

hakuseki opened this issue Apr 30, 2020 · 7 comments
Assignees
Milestone

Comments

@hakuseki
Copy link

Using 1.0.0-M6 or 1.0.0-M7 on 1.4.1.Final, camel-quarkus-core throws the following exception:

2020-04-30 11:24:03,079 ERROR [io.qua.dep.dev.DevModeMain] (main) Failed to start Quarkus: java.lang.NoSuchMethodError: 'void io.quarkus.builder.BuildChainBuilder.setClassLoader(java.lang.ClassLoader)'
       at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:92)
       at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:245)
       at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:130)
       at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:52)
       at io.quarkus.deployment.dev.IsolatedDevModeMain.firstStart(IsolatedDevModeMain.java:61)
       at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:265)
       at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:40)
       at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:129)
       at io.quarkus.bootstrap.app.CuratedApplication.runInAugmentClassLoader(CuratedApplication.java:82)
       at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:116)
       at io.quarkus.deployment.dev.DevModeMain.main(DevModeMain.java:56)

Removing camel-quartkus-core from dependencies removes this error.

Sample available here

https://github.com/hakuseki/CamelQuarkusDynamicHttp

@lburgazzoli
Copy link
Contributor

1.0.0-M6 was tested against quarkus 1.3.1
there's a new release of camel quakrus 1.0.0-M7 that supports 1.4.1

@hakuseki
Copy link
Author

1.0.0-M6 was tested against quarkus 1.3.1
there's a new release of camel quakrus 1.0.0-M7 that supports 1.4.1

Yes, I know, tested on 1.4.1.Final

@lburgazzoli
Copy link
Contributor

yep but I think there is an issue as there's no quarkus platform that supports camel-quarkus m7 so there may be some conflicts with the version

@ppalaga
Copy link
Contributor

ppalaga commented Apr 30, 2020

Thanks for the feedback, @hakuseki !

Yes, this seems to be caused by maven choosing wrong paths to solve the dependency conflicts between the versions declared in camel-quarkus-bom 1.0.0-M7 and quarkus-universe-bom 1.4.1 (that in turn imports camel-quarkus-bom 1.0.0-M6).

I have found two ways, how to solve it:

(a) remove

      <dependency>
        <groupId>${quarkus.platform.group-id}</groupId>
        <artifactId>${quarkus.platform.artifact-id}</artifactId>
        <version>${quarkus.platform.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

You can do that, because camel-quarkus-bom imports quarkus-bom where all your quarkus deps are managed

(b) Move camel-quarkus-bom before quarkus-universe-bom in your pom, so that it gets a higher precedence.

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.apache.camel.quarkus</groupId>
        <artifactId>camel-quarkus-bom</artifactId>
        <version>1.0.0-M7</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>${quarkus.platform.group-id}</groupId>
        <artifactId>${quarkus.platform.artifact-id}</artifactId>
        <version>${quarkus.platform.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

Universe 1.3.2 and CQ 1.0.0-M6 should be another valid combination:

    <quarkus-plugin.version>1.3.2.Final</quarkus-plugin.version>
    <quarkus.platform.artifact-id>quarkus-universe-bom</quarkus.platform.artifact-id>
    <quarkus.platform.group-id>io.quarkus</quarkus.platform.group-id>
    <quarkus.platform.version>1.3.2.Final</quarkus.platform.version>
    <surefire-plugin.version>2.22.1</surefire-plugin.version>
  </properties>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.apache.camel.quarkus</groupId>
        <artifactId>camel-quarkus-bom</artifactId>
        <version>1.0.0-M6</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>${quarkus.platform.group-id}</groupId>
        <artifactId>${quarkus.platform.artifact-id}</artifactId>
        <version>${quarkus.platform.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

This kind of issues boils down to the problem of synchronization between our (Camel Quarkus) releases and Quarkus Universe releases. Quarkus Universe sometimes upgrades Quarkus without waiting for a compatible Camel Quarkus version. There is some testing in place, but dev mode tests are not part of it. Hence we should either find a way to test dev mode in the platform or we should bind our release schedule to Quarkus.

@hakuseki
Copy link
Author

Thank you, I moved the camel bom over quarkus and now it works

@ppalaga ppalaga changed the title camel-quarkus-core throws exception Dev mode does not work using platform 1.4.1 May 4, 2020
@ppalaga
Copy link
Contributor

ppalaga commented May 4, 2020

Unless somebody has a better idea, I am going to try to

  1. Create a new dev mode test to cover cases like the above

  2. Make the platform to execute it.

@ppalaga
Copy link
Contributor

ppalaga commented May 25, 2020

The platform's CI now runs a basic dev mode test quarkusio/quarkus-platform#64

@ppalaga ppalaga closed this as completed May 25, 2020
@ppalaga ppalaga added this to the 1.0.0-CR2 milestone Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants