Integrating Intellij Idea and SBT II

I have written this question on SO as a follow-up of this other question. I basically, have to manage a dependency between three projects: the project I write -> Welder -> Inox where my project also depends on Inox. Thanks to the answer in the first question I could successfully build my project with SBT in Intellij Idea. Basically, the solution was to enable the option "Use SBT shell for build and import" in the Intellij Idea settings.

Now I'm facing a run-time error:

Exception in thread "main" java.lang.NoClassDefFoundError: inox/ast/Types$Type
    at Main$.main(Main.scala:9)
    at Main.main(Main.scala)
Caused by: java.lang.ClassNotFoundException: inox.ast.Types$Type
    at java.lang.ClassLoader.loadClass(
    at sun.misc.Launcher$AppClassLoader.loadClass(
    at java.lang.ClassLoader.loadClass(
    ... 2 more

The error appears while trying to run the project as an Application and using the main object of my Scala project. Given the above, I have good reasons to believe that Intellij Idea has something to do with it.

Please let me know if you need more details.

Comment actions Permalink

I couldn't reproduce this exact problem given this information. I did notice that the highlighting was completely broken when trying to use classes from the inox project in a main. But that is still a side effect from the project import not being handled correctly.

Perhaps it will help if you rename the modules manually as shown in my previous SO answer and also add a module dependency from welder to inox, enabling the export button.

Comment actions Permalink

This is solved now. See my answer on so. Thanks for helping


Please sign in to leave a comment.