0

Anywhere I break, when I hover on variable or try to evaluate, IntelliJ always report:

Method threw 'java.lang.ClassNotFoundException' exception even the variable exist

I tried to clear cache and restart the IntelliJ as well as refresh Gradle cache and rebuild the app. Nothing work. But the application itself did not crash and runs as usually, so I am pretty sure its Intellij problem. But I can't find any solution online.

Also, the file is a Kotlin file.

enter image description here

halfer
  • 19,824
  • 17
  • 99
  • 186
ey dee ey em
  • 7,991
  • 14
  • 65
  • 121
  • The error description is "exception even the variable exist"? – omoshiroiii Jan 10 '20 at 21:05
  • @omoshiroiii yes. and funny part for the snapshot I referenced, if I hover on `SUBSCRIPTION` it will actually show the value it suppose to be which is `subscription` in lower case. – ey dee ey em Jan 10 '20 at 21:06
  • "After Launching Debug Mode. Go to Window → Show View → Break Points. Now you would be able to see Break Point tab in Debugging mode. Uncheck the option "ClassNotFoundException: caught and uncaught"." Might help you speed past it. Referenced from: https://stackoverflow.com/questions/4525334/debug-in-eclipse-classnotfoundexception – omoshiroiii Jan 10 '20 at 21:10
  • @omoshiroiii but its already unchecked... – ey dee ey em Jan 10 '20 at 21:13
  • Please share the logs: Help | Compress Logs and Show in ... There is probably some exception. – CrazyCoder Jan 10 '20 at 21:30
  • I understand why it is confusing, since the code itself seems to be working fine despite the hover saying otherwise. If for some strange reason there is no log of the exception occurring, the only real thing I can think of is that it really is a bug, and in which case I'd say to try to reset to some of the defaults, e.g. Window - Preferences - Java - Editor - Hovers, hit "Restore Defaults" or something of the like. Sometimes even if you didn't change anything, it seems to help (although that might not be the correct one to restore). – omoshiroiii Jan 10 '20 at 21:35
  • This [post](https://stackoverflow.com/questions/44197521/gradle-project-java-lang-noclassdeffounderror-kotlin-jvm-internal-intrinsics) looks like they are having a similar issue. – Marc Cobery Jan 10 '20 at 21:42

2 Answers2

0

First, I forgot to mention, this error came up when I was in JRebel debug mode. For now, none of the existing solution worked. But I did the following:

1. I upgraded to later version of intellij (2019.3). everything stop running and all sort of error came up.
2. I reverted back to the version I was using (2019.2)
3. then I did rebuild with default debug mode icon (little red bug icon) then with jrebel debug mode icon (rocket with a grey bug). Only Jrebel debug mode have that error message!

I still did not know why jRebel acts like that suddenly, but at least this is a piece of information that may help lead to better solution than what I would have to do now ---- use default Intellij debug mode.... which is very very slow.... So likely you may not even need to take any of the above step, but simply try to build with the Intellij Debug mode to see if it still work so to isolate out that if its a JRebel problem.

ey dee ey em
  • 7,991
  • 14
  • 65
  • 121
0

Could you please open a JRebel Support ticket and we can then take a closer look at the issue? You can open a ticket either from the JRebel IDE plugin or by sending an email to support@jrebel.com

Rasmus T
  • 26
  • 2
  • not motivated to spend effort on help debugging and building up a proprietary app which did not try to benefit open source community anything. – ey dee ey em Jan 13 '20 at 18:22