I get NoClassDefFoundError when compiling my Scala application through sbt-console until I also do a "Refresh project" on my build file. Why?

I've been first told by colleagues and finally I've now it confirmed myself: running the sbt-console on Intellij may not be enough to get the Scala application effectively running -- one has to be careful to also click the "Refresh project" if wants to be sure that at run-time no `NoClassDefFoundError`s are found.

I always assumed that the "Refresh project" option would only serve to get syntax highlighting and IDE related features, that is, that as long as I ran sbt-console or sbt in the command-line, no actual harm would be caused to my generated Scala code.

Why is this so? Am I missing something?


1 comment
Comment actions Permalink
Official comment

Hi, Jorge,

It looks like there are conflicting instances of sbt process. One may corrupt or clear caches of the other. Can you give us an example of a project and instructions to reproduce this issue? Full stacktrace also may be helpful.

Please sign in to leave a comment.