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.

Command Line Application fails to start from Intellij

See original GitHub issue

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"
    

Issue Analytics

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

github_iconTop GitHub Comments

4reactions
jloupdefcommented, Nov 16, 2020

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.

1reaction
lburgazzolicommented, Jun 22, 2020

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to start IDE from the command line
Below are given the examples on how to start IDE from the command line on different OS. You should substitute the product name...
Read more >
IntelliJ IDEA Won't start
What is your OS? Try to start IDE from command line or terminal and examine the output from terminal. If you are on...
Read more >
Start Failed, Internal error: recovering IDE to the working state ...
There are multiple possible causes for this issue: broken or incompatible plug-in, corrupted IDE installation files, failed patch update, broken caches or ...
Read more >
Failed to start cmd.exe : IDEA-202881 - JetBrains YouTrack
Failed to start cmd.exe · On the main menu "Help | Edit Custom VM Options..." => *.vmoptions file will be opened. · Add...
Read more >
Cannot get simple command line project to compile or run
I am on Ubuntu 20.04, IntelliJ 2020.1.1 Community. I am trying to build/compile/run a simple command line application.
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