myborobudur
myborobudur

Reputation: 4435

Play doesn't convert java-list to scala-list

I have a controller which hands a java-list of model-objects to the view exactly the way like it's done in the examples.

The compiler throws an error that it can't convert from java.util.List to scala.collection.immutable.List. I have no clue what I should do.

[error] /myapp/myappsubprojects/frontend/app/controllers/frontend/MyController.java:15: error: method render in class linklist cannot be applied to given types;
[error]         return ok(linklist.render("link test", Link.findAll()));
[error]                           ^
[error]   required: String,scala.collection.immutable.List<Link>
[error]   found: String,java.util.List<Link>
[error]   reason: actual argument java.util.List<Link> cannot be converted to scala.collection.immutable.List<Link> by method invocation conversion
[error] 1 error

Note: I'm using subprojects (common, frontend, backend) and I had a hard time to make everything run properly. Probably it's related to that.

Upvotes: 0

Views: 1399

Answers (1)

avik
avik

Reputation: 2708

I went fishing for details and ended up (luckily) answering the question in my comment

Upvotes: 1

Related Questions