Skip to content

Troubleshooting IntelliJ IDEA

Danny Navarro edited this page Jan 22, 2018 · 7 revisions

OCS builds can break in IntelliJ IDEA when upgrading IDEA plugins, the JDK, the OCS version or IDEA itself. Here are some tips you can try more or less to follow in order to try to fix it.

  • Make sure in File -> Project Structure -> SDKs the JDK home path is correctly selected. With a JDK version upgrade sometimes this path changes, so a symlink (i. e. /Library/Java/Home if using the java homebrew cask) to the most current JDK home path could take care of this issue. You can read more about JDK settings on OcsJava8.

  • Try File -> Invalidate Caches / Restart.

  • Try in sbt: ocsBundleIdeaModule.

  • Before running ocsBundleIdeaModule remove all .iml files: find . -iname '*.iml' | xargs rm.

  • Before removing all .iml files, remove ./app/all-bundles/idea/all-bundles.ipr. In sbt switch to all-bundles project and run ocsAppIdeaModule. Open the new generated ipr file as new project in IDEA.

  • If you get OOM errors you should increase the memory allocation parameters for the JVM in your sbt configuration file, but here is a oneliner from which you can start fiddling until you find the ones that work for you: sbt -J-Xmx12G -J-Xms12G -J-XX:ReservedCodeCacheSize=1024m -J-XX:MaxMetaspaceSize=4096m.

If you are working with different ODB versions and do a sbt clean you'll have to rebuild the ODB versions not specified in the build.sbt file.