Somewhat new to Scala but have been using other languages and have a few questions regards environment and Play 2.1.
I am using Ubuntu 12.10 with the Scala 2.9.2 and Java 7 installed.
One of my several questions below is regards which version of Scala is being referred to and how do I change that?
Eclipse Juno seems to refer to Scala 2.9.3 and 'play compile' to Scala 2.10 however I have Scala 2.9.2 installed.
4. It would be nice to be able to create a project with name such as json.21. The .21 generates an error on 'play compile':
at xsbt.boot.Boot$.main(Boot.scala:20)at xsbt.boot.Boot.main(Boot.scala)Caused by: java.lang.RuntimeException: Invalid project ID: Expected ID characterjson.21^at scala.sys.package$.error(package.scala:27)at scala.Predef$.error(Predef.scala:123)at sbt.Project$$anonfun$apply$2.apply(Project.scala:153)It would allow for more flexibility with naming projects and such. if possible to make this possible would be great.
5. I have been working through the examples in Play for Scala and the examples that use JSON (Ch 8/ 10) compiles fine in Play 2.0.4 however generates error on compile (as well as Eclipse) as such:
"ean" -> Json.toJson(p.ean),* class file needed by DefaultWrites is missing. reference typeClassTag of package reflect refers to nonexisting symbol.I looked through the documentation of play.api.libs.json.toJson - seems like the method definition has not changed.
--...Thank you very much for your help.Monosij
Hello -
Somewhat new to Scala but have been using other languages and have a few questions regards environment and Play 2.1.I am using Ubuntu 12.10 with the Scala 2.9.2 and Java 7 installed.
One of my several questions below is regards which version of Scala is being referred to and how do I change that?
Eclipse Juno seems to refer to Scala 2.9.3 and 'play compile' to Scala 2.10 however I have Scala 2.9.2 installed.
Thank you upfront for your help with my questions below. Again, new to Scala and Play but not to programming....1. I generate a play 2.1 project for Scala and Eclipse project as well. When I import into Eclipse (Juno) I see an error in the default Application.scala it generates in:def list = Action { ... )** Multiple markers at this line- class file needed by BodyParser is missing. reference type Eitherof object package refers to nonexisting symbol.It however compiles fine from the command line and runs as well.Wondering why this error happens? I am using Ubuntu 12.10 with Scala 2.9.2 installed....2. This question may not be for this forum but somewhat related.I am using the Scala plugin from Scala lang. In there there does not seem to be a way to set which Scala compiler to use such as for Python, R where I can set which version of Python or R to use.For example when I import the Play project into Eclipse it says it is using Scala library 2.9.3-20121217-...However my installation of Ubuntu has Scala 2.9.2 - so where is it getting 2.9.3 from?I went to the Project Propoerties / Scala compiler settings and in Advanced tab for Xpluginsdir got the value: /opt/development/ide/eclipse-jee-scala/configuration/org.eclipse.osgi/bundles/842/1/.cp/libHow do i use Scala 2.10-RC1 that I have unzipped an installed in a separate directory?...3. When I execute 'play compile' on the project I do get:[info] Set current project to json21 (in build file:/space/code.trials/Play.21/json21/)[info] Compiling 7 Scala sources and 1 Java source to /space/code.trials/Play.21/json21/target/scala-2.10/classes...So here it is using Scala 2.1 - where is this 2.10 version coming from - from within Play-2.1-RC1?I am a little confused by the different versions being referenced Scala 2.9.3 (from Eclipse) and Scala 2.10 from 'play compile' when I have installed in Ubuntu Scala 2.9.2....
4. It would be nice to be able to create a project with name such as json.21. The .21 generates an error on 'play compile':at xsbt.boot.Boot$.main(Boot.scala:20)at xsbt.boot.Boot.main(Boot.scala)Caused by: java.lang.RuntimeException: Invalid project ID: Expected ID characterjson.21^at scala.sys.package$.error(package.scala:27)at scala.Predef$.error(Predef.scala:123)at sbt.Project$$anonfun$apply$2.apply(Project.scala:153)It would allow for more flexibility with naming projects and such. if possible to make this possible would be great.
...
5. I have been working through the examples in Play for Scala and the examples that use JSON (Ch 8/ 10) compiles fine in Play 2.0.4 however generates error on compile (as well as Eclipse) as such:"ean" -> Json.toJson(p.ean),* class file needed by DefaultWrites is missing. reference typeClassTag of package reflect refers to nonexisting symbol.I looked through the documentation of play.api.libs.json.toJson - seems like the method definition has not changed.
I had a similar problem when upgrading from play 2.0 to 2.1 ... you need to uninstall the eclipse scala-ide plugin and install the 2.10 RC1 plugin from http://download.scala-ide.org/sdk/e38/scala210/dev/site/Otherwise "play compile" builds the project just fine, but Eclipse has squiggly red lines in way too many places!