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

Build does not work (Quarkus 3.11.1) : java.lang.NoSuchFieldError: type at io.quarkiverse.kerberos.deployment.KerberosBuildStep.register2 #119

Closed
omasseau opened this issue Jun 7, 2024 · 7 comments · Fixed by #121

Comments

@omasseau
Copy link

omasseau commented Jun 7, 2024

Hello,

I just cannot use the extension as I get a build error when starting my application.
I'm using quarkus 3.11.1. The project has been generated from code.quarkus.io by selecting Rest and Kerberos extensions.

[INFO] Scanning for projects...
[INFO]
[INFO] --------------< com.inetum.bd.kerberos:kerberos-test-app >--------------
[INFO] Building kerberos-test-app 1.0.0-SNAPSHOT
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- quarkus:3.11.1:dev (default-cli) @ kerberos-test-app ---
[INFO] Invoking resources:3.3.1:resources (default-resources) @ kerberos-test-app
[INFO] Copying 1 resource from src\main\resources to target\classes
[INFO] Invoking quarkus:3.11.1:generate-code (default) @ kerberos-test-app
[INFO] Invoking compiler:3.12.1:compile (default-compile) @ kerberos-test-app
[INFO] Recompiling the module because of added or removed source files.
[INFO] Compiling 3 source files with javac [debug release 17] to target\classes
[INFO] Invoking resources:3.3.1:testResources (default-testResources) @ kerberos-test-app
[INFO] skip non existing resourceDirectory C:\dev\git\kerberos-test-app\src\test\resources
[INFO] Invoking quarkus:3.11.1:generate-code-tests (default) @ kerberos-test-app
[INFO] Invoking compiler:3.12.1:testCompile (default-testCompile) @ kerberos-test-app
[INFO] Recompiling the module because of changed dependency.
[INFO] Compiling 2 source files with javac [debug release 17] to target\test-classes
Listening for transport dt_socket at address: 5005
Press [e] to edit command line args (currently ''), [h] for more options>
2024-06-07 12:32:28,211 INFO [io.qua.dep.dev.IsolatedDevModeMain] (main) Attempting to start live reload endpoint to recover from previous Quarkus startup failure
2024-06-07 12:32:28,589 ERROR [io.qua.dep.dev.IsolatedDevModeMain] (main) Failed to start quarkus: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkiverse.kerberos.deployment.KerberosBuildStep#register2 threw an exception: java.lang.NoSuchFieldError: type
at io.quarkiverse.kerberos.deployment.KerberosBuildStep.register2(KerberosBuildStep.java:59)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1495)
at java.base/java.lang.Thread.run(Thread.java:833)
at org.jboss.threads.JBossThread.run(JBossThread.java:483)

at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:331)
at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:252)
at io.quarkus.runner.bootstrap.AugmentActionImpl.createInitialRuntimeApplication(AugmentActionImpl.java:58)
at io.quarkus.deployment.dev.IsolatedDevModeMain.firstStart(IsolatedDevModeMain.java:113)
at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:435)
at io.quarkus.deployment.dev.IsolatedDevModeMain.accept(IsolatedDevModeMain.java:56)
at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:138)
at io.quarkus.bootstrap.app.CuratedApplication.runInAugmentClassLoader(CuratedApplication.java:93)
at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:131)
at io.quarkus.deployment.dev.DevModeMain.main(DevModeMain.java:62)
Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[error]: Build step io.quarkiverse.kerberos.deployment.KerberosBuildStep#register2 threw an exception: java.lang.NoSuchFieldError: type
at io.quarkiverse.kerberos.deployment.KerberosBuildStep.register2(KerberosBuildStep.java:59)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1495)
at java.base/java.lang.Thread.run(Thread.java:833)
at org.jboss.threads.JBossThread.run(JBossThread.java:483)

at io.quarkus.builder.Execution.run(Execution.java:123)
at io.quarkus.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:79)
at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:160)
at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:327)
... 9 more
Caused by: java.lang.NoSuchFieldError: type
at io.quarkiverse.kerberos.deployment.KerberosBuildStep.register2(KerberosBuildStep.java:59)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:849)
at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2516)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2495)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1495)
at java.base/java.lang.Thread.run(Thread.java:833)
at org.jboss.threads.JBossThread.run(JBossThread.java:483)

pom.xml dependencies :

` 4.0.0
com.inetum.bd.kerberos
kerberos-test-app
1.0.0-SNAPSHOT

<properties>
    <compiler-plugin.version>3.12.1</compiler-plugin.version>
    <maven.compiler.release>17</maven.compiler.release>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
    <quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
    <quarkus.platform.version>3.11.1</quarkus.platform.version>
    <skipITs>true</skipITs>
    <surefire-plugin.version>3.2.5</surefire-plugin.version>
</properties>

<dependencyManagement>
    <dependencies>
        <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>

<dependencies>
    <dependency>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-rest</artifactId>
    </dependency>
    <dependency>
        <groupId>io.quarkiverse.kerberos</groupId>
        <artifactId>quarkus-kerberos</artifactId>
        <version>2.1.0</version>
    </dependency>
    <dependency>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-arc</artifactId>
    </dependency>
    <dependency>
        <groupId>io.quarkus</groupId>
        <artifactId>quarkus-junit5</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>io.rest-assured</groupId>
        <artifactId>rest-assured</artifactId>
        <scope>test</scope>
    </dependency>
</dependencies>`
@omasseau
Copy link
Author

omasseau commented Jun 7, 2024

I needed to downgrade to Quarkus 3.8.5 to have the build working

@AlexanderUkhta
Copy link

Hi there, is the issue going to be fixed later?
Still cannot work with the newest Quarkus versions because of that.

@gastaldi
Copy link
Member

ping @quarkiverse/quarkiverse-kerberos

@gastaldi
Copy link
Member

I created a PR that may fix this: #121

Can anyone build and test it?

@unlazy
Copy link

unlazy commented Jul 22, 2024

Hi team, could someone create a release or a RC with this fix? If it becomes available in maven-central, I'd like to test it with my project

@gastaldi gastaldi mentioned this issue Jul 22, 2024
@gastaldi
Copy link
Member

2.2.0 is now out! Enjoy!

@unlazy
Copy link

unlazy commented Jul 24, 2024

@gastaldi many thanks, works like a charm!

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

Successfully merging a pull request may close this issue.

4 participants