File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Scala and the fly likes Unable to Create Scala 2.10 and Play 2.1 project Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Scala
Bookmark "Unable to Create Scala 2.10 and Play 2.1 project" Watch "Unable to Create Scala 2.10 and Play 2.1 project" New topic
Author

Unable to Create Scala 2.10 and Play 2.1 project

Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 684

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


Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD Java Developer,My Blog
chris webster
Bartender

Joined: Mar 01, 2009
Posts: 1650
    
  14

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.


No more Blub for me, thank you, Vicar.
Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 684

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

Joined: Sep 07, 2008
Posts: 684

Also when I execute "Run" command and hit localhost to my browser I was getting error,



Nishan Patel
Ranch Hand

Joined: Sep 07, 2008
Posts: 684

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..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to Create Scala 2.10 and Play 2.1 project