Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8952995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:59:52+00:00 2026-06-15T13:59:52+00:00

I just migrated across to Play Framework 2.1-RC1 from 2.0 on an existing project

  • 0

I just migrated across to Play Framework 2.1-RC1 from 2.0 on an existing project and for some reason I’m now having to cast everything to Scala classes from Java classes when I render the views. (Obviously I’m using Play in a Java project rather than a Scala project)

Below is an example error…

render(java.lang.String,scala.collection.immutable.List<models.User>) in views.html.list cannot be applied to (java.lang.String,java.util.List<models.User>)

And the top line of my view…

@(message: String, users : List[models.User])

From this I surmise that for some reason classes aren’t being automatically cast from java.util.List to the scala equivalent. I’m a Java guy, not a Scala guy at this stage so I may be doing something stupid.

Example code that calls render…

public static Result list() {
        List<User> users = MorphiaManager.getDatastore().find(User.class).asList();
    System.out.println("about to try to display list of " + users.size() + " users");
        return ok(list.render("Welcome", msgs));
    }

Build.scala below

import sbt._
import Keys._
import PlayProject._

object ApplicationBuild extends Build {

    val appName         = "blah-worker"
    val appVersion      = "1.0-SNAPSHOT"

    val appDependencies = Seq(
  // Play framework dependencies
  javaCore, javaJdbc, javaEbean,
  // Add your project dependencies here,
  "org.apache.camel" % "camel-core" % "2.10.0",
  "org.apache.camel" % "camel-jms" % "2.10.0",
  "org.apache.camel" % "camel-mail" % "2.10.0",
  "org.apache.camel" % "camel-jackson" % "2.10.0",
  "org.apache.camel" % "camel-gson" % "2.10.0",
  "org.apache.activemq" % "activemq-core" % "5.6.0",
  "org.apache.activemq" % "activemq-camel" % "5.6.0",
  "org.apache.activemq" % "activemq-pool" % "5.6.0",
  "com.google.code.morphia" % "morphia" % "0.99.1-SNAPSHOT",
  "com.google.code.morphia" % "morphia-logging-slf4j" % "0.99",
  "cglib" % "cglib-nodep" % "[2.1_3,)",
  "com.thoughtworks.proxytoys" % "proxytoys" % "1.0",
  "org.apache.james" % "apache-mime4j" % "0.7.2",
  ("org.jclouds" % "jclouds-allblobstore" % "1.5.0-beta.4").exclude("com.google.guava", "guava").exclude("org.reflections", "reflections"),
  ("org.reflections"                  %    "reflections"              %   "0.9.7").exclude("com.google.guava", "guava").exclude("javassist", "javassist")
)

val main = play.Project(appName, appVersion, appDependencies).settings(
  // Add your own project settings here
  resolvers += "Morphia repo" at "http://morphia.googlecode.com/svn/mavenrepo/",
  resolvers += "CodeHaus for ProxyToys" at "http://repository.codehaus.org/",
  checksums := Nil
)

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T13:59:53+00:00Added an answer on June 15, 2026 at 1:59 pm

    Figured it out, I hadn’t updated one of the imports on Build.scala.

    Specifically…

    import PlayProject._
    

    should be updated to…

    import play.Project._
    

    which is also detailed in the migration guide (but I missed it): https://github.com/playframework/Play20/wiki/Migration

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just migrated a project from .NET 3.5 to 4.0, accordingly the reports now
I just right now migrated from C# to C++/CLR. First I was annoyed, that
We just migrated from MYSQL to Oracle 11g and I have to change some
I'm new to the Asset Pipeline, having just migrated over from Rails 3.0. I'm
I've just migrated a somewhat large project from Visual Studio solutions to CMake and
Just migrated ODP.NET 11.2 Release 4 from Devart DotConnect for Oracle http://www.devart.com/dotconnect/oracle/ but I
I just migrated from Windows to Mac OS X and have found theres no
I just migrated one of my app from iOS to WP7. I found that
We have just migrated from solr3.5 to solr3.6, for all this time we have
I have just migrated around 100 ASP.net sites from IIS 6 on Windows Sever

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.