Once I run 'sbt compile' on a 2.3 play project, I can't use 'sbt compile' to compile any Play 2.2.x projects anymore. This is the error when I run sbt command.
[info] Loading project definition from /Users/macbookpro/playproject/project
[error] java.lang.NoClassDefFoundError: play/Play$
[error] Use 'last' for the full log.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?
I just had this same issue. In my case I was using Play 2.4, but it's probably the same cause. I had run activator ui in my project directory accidentally. It created a
project/play-fork-run.sbt
file which is for activator support, but was preventing sbt from working directly. Deleting that file cleared up the issue and I can now use sbt again.I had the same issue. Make sure that you are using the java-8 version. I was using java-7, changing to java-8 fixed my problem.
That's interesting issue since it works for me (TM) on Mac OS X 10.9.3 with Java 7.
I downloaded the versions of Play - the latest 2.3.1 and the latest in 2.2.x stream - 2.2.3. With these two versions I've used
activator
(2.3.1) to create the web application andplay
for 2.2.3. Both worked well.When I executed
sbt compile
in 2.3.1 and then 2.2.3, both commands worked fine, too. It took me some time to have all the dependencies downloaded, but at the end the results were as follows:And for 2.2.3:
I'm using sbt 0.13.5 installed using homebrew.
Try updating play-fork-run.sbt
update to
Then project will be able to build.
Play 2.3 app is supposed to be built using activator, to ensure proper sbt configuration. Best