Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Play Framework 2.1: BodyParser class file missing

I downloaded Play Framework 2.1 and after eclipsifying it I have errors in controllers, and target folder.

In controller, Application.scala I have the following error:

Multiple markers at this line
    - class file needed by BodyParser is missing. reference type Either of object package refers to nonexisting 
     symbol.

If any of you got this errors, how have you fixed it?

like image 271
Andrew Avatar asked Nov 17 '12 13:11

Andrew


2 Answers

Play 2.1 uses Scala 2.10. If you downloaded the Play 2.1 SNAPSHOT just now, your problem is likely due to the Scala IDE which still uses 2.9.X. The error will not show if you compile the project with play compile (as SBT will use the correct Scala library version), but it will show in the IDE until you upgrade it.

To upgrade Scala IDE, please follow the instructions on their website.

By the way, don't forget that the command eclipsify was renamed to eclipse in Play 2.1.

like image 78
Kane Avatar answered Sep 20 '22 17:09

Kane


The problem with the solution is that the latest eclipse (Juno) is not working with the latest Scala IDE plugin, just with a nightly build: http://download.scala-ide.org/nightly-update-juno-master-29x/ ... which supports only scala 2.9.

So: is there a way to develop a Play 2.1 project with Eclipse Juno?

like image 22
BTakacs Avatar answered Sep 21 '22 17:09

BTakacs