Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to Create Scala 2.10 and Play 2.1 project

 
Nishan Patel
Ranch Hand
Posts: 689
Eclipse IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have recently downloaded Play 2.1 for create sample project using Scala 2.10 already installed to my machine, I habe also installed Sbt for making project. Step to create Scala 2.10 and Play 2.1 project.

1. Go to my workspace use this command to create new play application.

2. Now I go to my project folder and use command for making my Play project to eclipse project, command create eclipse project and I am able to import in eclipse but having some below error.



3. Then I run Play command at my project folder . It will go to my project console like



4. While I run compile command form Play console I got another error



5. And when I execute Run command server successful started but when I hit localhost:9000 it gives some error and I am not able to make project.

Please let me know what is the problem in it. I tried to create this project since 4-5 days but still I was not getting any resolution on it. I have also got some unresolved dependency error sometimes.

Environment I use:

Windows 8 with 64bit OS
Scala 2.10 and Play 2.1.0 and Sbt

Thanks in advance
 
chris webster
Bartender
Posts: 2407
32
Linux Oracle Postgres Database Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm just guessing here, but your stack trace says that the exception was:

"...Caused by: scala.tools.nsc.MissingRequirementError: object scala not found at scala.tools.nsc.symtab.Definitions$definitions$.getModuleOrClass..."

I think scala.tools.nsc is part of the Scala compiler, so maybe there's a conflict with your Scala/SBT versions and what Play is expecting. Also, I think Play includes its own local version of SBT, but you also have a version of SBT on your machine, so is it getting confused over which SBT to use?

Finally, have you tried creating and compiling/running a new Play project from the command-line without doing the Eclipse step? If this works, then you know the problem is with the Eclipse conversion, rather than with Play itself.
 
Nishan Patel
Ranch Hand
Posts: 689
Eclipse IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply...

I have tried to compile and run without creating eclipse project but still I was having the exception. so what was the resolution for that ?

I think scala.tools.nsc is part of the Scala compiler, so maybe there's a conflict with your Scala/SBT versions and what Play is expecting. Also, I think Play includes its own local version of SBT, but you also have a version of SBT on your machine, so is it getting confused over which SBT to use?


I have only installed SBT and Scala 2.10 so I don't think there was a conflict between then and still if you think so what do i need to do.
 
Nishan Patel
Ranch Hand
Posts: 689
Eclipse IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also when I execute "Run" command and hit localhost to my browser I was getting error,



 
Nishan Patel
Ranch Hand
Posts: 689
Eclipse IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Chris,

Thanks for your reply. Based on your post I have deleted folder .ivy2 and .sbt from C:\Users\Nishan. That folder was created because sometimes back I was trying to create project using Scala and Lift framework so at that time project downloaded some scala and sbt library and that might conflict now as you said when I was trying to create Play and Scala project.

So Now I got the resolution and I am able to create Play 2.1.0 and Scala 2.10 project and run localhost:9000 at my local browser. Please mark this post to resolve if possible.

Thank you so much..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic