6

This Error showed up in my IntelliJ and now whatever project I try to run it's just not happening and the same Error shows up again and again and nothing seems to work. I restarted the program, deleted the .idea folder as I read some other blogs, but it's not fixing anything.

Error:Module 'JavaFundamentals' production: java.lang.ClassCastException: class org.jetbrains.jps.builders.java.dependencyView.TypeRepr$PrimitiveType cannot be cast to class org.jetbrains.jps.builders.java.dependencyView.TypeRepr$ClassType (org.jetbrains.jps.builders.java.dependencyView.TypeRepr$PrimitiveType and org.jetbrains.jps.builders.java.dependencyView.TypeRepr$ClassType are in unnamed module of loader java.net.URLClassLoader @2ff4acd0)
Peter
  • 4,752
  • 2
  • 20
  • 32
dummydummy
  • 91
  • 1
  • 6
  • 1
    Worst case: uninstall. Restart computer. Install. Alternatively: ask on the Jetbrains forum directly. – GhostCat Oct 13 '20 at 13:53
  • Could be the https://youtrack.jetbrains.com/issue/SCL-17234 If you are using Scala plugin try with it disabled or make sure to use latest IDE and Scala plugin versions. Also try deleting [IDE system directory](https://www.jetbrains.com/help/idea/tuning-the-ide.html#system-directory). – Andrey Oct 13 '20 at 15:18

4 Answers4

4

Just came across the same problem and I just clicked build on the menu and click on rebuild.

1

I found something from someone having a similar issue, try this:

In menu "Build > Rebuild project". In menu "File > Invalidate caches / Restart... > Invalidate and Restart". Remove last installed/enabled plugins if any. Check dependencies (especially cyclic-dependencies) in "File > Project Structure... > Modules" The last chance: make backup & remove .idea folder from your project directory and create new project from scratch.

CobaltGecko
  • 188
  • 9
1

I just encountered this same error "Production production: java. Lang...." and I just clicked on build then rebuild. Let me know if that Helps. Thanks.

Ola Lekan
  • 11
  • 2
  • You are practically copying the existing answer https://stackoverflow.com/a/70169368/7733418 Why? Do you feel that this contributes any additional insight? Then please [edit] to make that more obvious. – Yunnosch Sep 18 '22 at 18:11
0

Follow the instructions found in answer: Can't compile java project on intelij Idea 14 CE

This answer (Error:Module 'name' production: java.lang.NullPointerException) let me assume that the scala plugin could be the real cause, as @Andery already mentioned in the comment.

Let us know if that helps.

Peter
  • 4,752
  • 2
  • 20
  • 32
  • 1
    Hello, I tried many stuff and the only thing that worked was for me to wait for the next update of the IDEA. Athough thank ypu very much for the time you spared on my problem. :) – dummydummy Oct 16 '20 at 11:09