quarkus: Command Line Application fails to start from Intellij

Describe the bug Command Line Application fails to start from Intellij

Expected behavior The application should start

Actual behavior The application fails to start with the following exception:

Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
	at io.quarkus.launcher.QuarkusLauncher.launch(QuarkusLauncher.java:50)
	at io.quarkus.runtime.Quarkus.launchFromIDE(Quarkus.java:93)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:79)
	at io.quarkus.runtime.Quarkus.run(Quarkus.java:38)
	at org.acme.timer.Main.main(Main.java:26)
Caused by: java.lang.reflect.InvocationTargetException
	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.launcher.QuarkusLauncher.launch(QuarkusLauncher.java:47)
	... 4 more
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassNotFoundException: io.quarkus.deployment.dev.IDEDevModeMain
	at io.quarkus.bootstrap.IDELauncherImpl.launch(IDELauncherImpl.java:30)
	... 9 more
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: io.quarkus.deployment.dev.IDEDevModeMain
	at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:134)
	at io.quarkus.bootstrap.app.CuratedApplication.runInAugmentClassLoader(CuratedApplication.java:84)
	at io.quarkus.bootstrap.IDELauncherImpl.launch(IDELauncherImpl.java:28)
	... 9 more
Caused by: java.lang.ClassNotFoundException: io.quarkus.deployment.dev.IDEDevModeMain
	at io.quarkus.launcher.QuarkusLauncher$IDEClassLoader.findClass(QuarkusLauncher.java:70)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:589)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:378)
	at io.quarkus.bootstrap.classloading.QuarkusClassLoader.loadClass(QuarkusClassLoader.java:330)
	at io.quarkus.bootstrap.app.CuratedApplication.runInCl(CuratedApplication.java:129)
	... 11 more

To Reproduce Steps to reproduce the behavior:

  1. checkout https://github.com/apache/camel-quarkus
  2. build the project
  3. run the Main class from examples/timer-log/main from Intellij

Environment (please complete the following information):

  • Output of uname -a or ver:
    Linux moon 5.6.19-300.fc32.x86_64 #1 SMP Wed Jun 17 16:10:48 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
    
  • Output of java -version:
    openjdk version "11.0.7" 2020-04-14
    OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.7+10)
    OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.7+10, mixed mode)
    
  • GraalVM version (if different from Java):
  • Quarkus version or git rev:
    1.5.2.Final
    
  • Build tool (ie. output of mvnw --version or gradlew --version):
    Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
    Maven home: /opt/data/sfw/tools/sdkman/candidates/maven/current
    Java version: 11.0.7, vendor: AdoptOpenJDK, runtime: /opt/data/sfw/tools/sdkman/candidates/java/11.0.7.hs-adpt
    Default locale: en_US, platform encoding: UTF-8
    OS name: "linux", version: "5.6.19-300.fc32.x86_64", arch: "amd64", family: "unix"
    

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 4
  • Comments: 25 (19 by maintainers)

Most upvoted comments

Hi, I had this error (CNFE on IDEDevModeMain) when launching a quarkus app in IntelliJ when the app is in a submodule. Updating the “working directory” for the submodule one in the launch configuration fixes the issue. image

Also opening directly the submodule in intellij and launching from there works. I am using community edition of IntelliJ with free “Quarkus Tools” plugin.

no, just opened so I won’t forget 😃 will try it soon