question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Kubernetes CRD ClassNotFoundException after upgrade to 1.11.2.Final in dev mode

See original GitHub issue

Describe the bug Upgrade 1.11.1.Final -> 1.11.2.Final breaks mvn quarkus:dev with Kubernetes CRD. Quarkus cannot find my CRD’s Spec model class used in this CRD: https://github.com/websitecd/operator/blob/main/service/src/main/java/io/websitecd/operator/crd/Website.java

Only mvn quarkus:dev is affected. Normal jar build (resp. quarkus tests) works correctly.

Expected behavior mvn quarkus:dev should start

Actual behavior After strart

2021-02-22 21:07:28,941 ERROR [io.qua.run.Application] (Quarkus Main Thread) Failed to start application (with profile dev): java.lang.ClassNotFoundException: io.websitecd.operator.crd.WebsiteSpec
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:428)
	at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:378)
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:315)
	at io.fabric8.kubernetes.client.CustomResource.getInstantiator(CustomResource.java:309)
	at io.fabric8.kubernetes.client.CustomResource.genericInit(CustomResource.java:337)
	at io.fabric8.kubernetes.client.CustomResource.initSpec(CustomResource.java:117)
	at io.fabric8.kubernetes.client.CustomResource.<init>(CustomResource.java:108)
	at io.websitecd.operator.crd.Website.<init>(Website.java:20)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
	at io.fabric8.kubernetes.client.dsl.base.CustomResourceDefinitionContext.fromCustomResourceType(CustomResourceDefinitionContext.java:116)
	at io.fabric8.openshift.client.DefaultOpenShiftClient.customResources(DefaultOpenShiftClient.java:480)
	at io.websitecd.operator.controller.WebsiteController.initWebsiteCrd(WebsiteController.java:71)
	at io.websitecd.operator.controller.WebsiteController.onStart(WebsiteController.java:66)
	at io.websitecd.operator.controller.WebsiteController_Observer_onStart_fd71b5e0b207b7d1ef838b94eaeff75e52b8f463.notify(WebsiteController_Observer_onStart_fd71b5e0b207b7d1ef838b94eaeff75e52b8f463.zig:147)
	at io.quarkus.arc.impl.EventImpl$Notifier.notifyObservers(EventImpl.java:282)
	at io.quarkus.arc.impl.EventImpl$Notifier.notify(EventImpl.java:267)
	at io.quarkus.arc.impl.EventImpl.fire(EventImpl.java:69)
	at io.quarkus.arc.runtime.LifecycleEventRunner.fireStartupEvent(LifecycleEventRunner.java:23)
	at io.quarkus.arc.runtime.ArcRecorder.handleLifecycleEvents(ArcRecorder.java:60)
	at io.quarkus.deployment.steps.LifecycleEventsBuildStep$startupEvent-858218658.deploy_0(LifecycleEventsBuildStep$startupEvent-858218658.zig:81)
	at io.quarkus.deployment.steps.LifecycleEventsBuildStep$startupEvent-858218658.deploy(LifecycleEventsBuildStep$startupEvent-858218658.zig:40)
	at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:686)
	at io.quarkus.runtime.Application.start(Application.java:90)
	at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:97)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:66)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:42)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:119)
	at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:29)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at io.quarkus.runner.bootstrap.StartupActionImpl$3.run(StartupActionImpl.java:134)
	at java.base/java.lang.Thread.run(Thread.java:834)

To Reproduce Try to upgrade quarkus version in this project (module service) https://github.com/websitecd/operator

Environment (please complete the following information):

  • Output of uname -a or ver:
  • Output of java -version: 11
  • GraalVM version (if different from Java):
  • Quarkus version or git rev: 1.11.2.Final
  • Build tool (ie. output of mvnw --version or gradlew --version): 3.6.3

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
metacosmcommented, Feb 23, 2021

@metacosm how serious is this issue? Should I backport the 5.1.0 upgrade?

I’m trying to figure out what’s the best way. Ideally, we’d release a 5.1.1 with a better fix and backport this.

1reaction
lkrzyzanekcommented, Feb 23, 2021

Workaround works.

pom snippet:

    <properties>
        <maven.compiler.target>11</maven.compiler.target>
        <maven.compiler.source>11</maven.compiler.source>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <maven.compiler.parameters>true</maven.compiler.parameters>
        <surefire-plugin.version>2.22.1</surefire-plugin.version>
        <compiler-plugin.version>3.8.1</compiler-plugin.version>

        <!-- Be sure that mvn clean install and also mvn quarkus:dev works !!! -->
        <quarkus.platform.version>1.11.3.Final</quarkus.platform.version>
        <fabric8-client.version>5.1.0</fabric8-client.version>
        <snakeyaml.version>1.27</snakeyaml.version>
        <fabric8.client.version>5.0.1</fabric8.client.version>

        <!-- By default just do maven install and let github to do the deploy on release -->
        <release.goal>install</release.goal>
    </properties>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>io.fabric8</groupId>
                <artifactId>kubernetes-client-bom</artifactId>
                <version>${fabric8-client.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-universe-bom</artifactId>
                <version>${quarkus.platform.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Quarkus 1.12.1.Final released - Bugfixes - LinkedIn
Final ); #15319 - Disable instrumentation for remote-dev ... #15250 - Kubernetes CRD ClassNotFoundException after upgrade to 1.11.2.Final in ...
Read more >
chore(deps): update dependency io.quarkus:quarkus ... - GitLab
... #​15250 - Kubernetes CRD ClassNotFoundException after upgrade to 1.11.2.Final in dev mode; #​15238 - Fix Qute namespace extensions with no parameters ...
Read more >
Bug listing with status RESOLVED with resolution TEST ...
Bug:233 - "Emacs segfaults when merged through the sandbox." status:RESOLVED resolution:TEST-REQUEST severity:critical · Bug:3888 - "yenta_socket module not ...
Read more >
Bug List - FreeBSD Bugzilla
This list is too long for Bugzilla's little mind; the Next/Prev/First/Last buttons won't appear on individual bugs. Hide Search Description.
Read more >
Search Results - CVE
MariaDB CONNECT Storage Engine Use-After-Free Privilege Escalation Vulnerability. This vulnerability allows local attackers to escalate privileges on affected ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found