0
votes

I've got a List of classes I want to send down to a Scala Template in Play! Framework 2.2.3 however I ran into some issues while trying to do so.

The class I want the list to contain is an arbitrary class type that comes from a package outside of my workspace, but not natively from Java. See the picture below.

Note: I do not have a project/Build.scala file.

First row in the Play! Template

The above image represents the first line in my scala template, I have tried to use @import as well (@import com.***.***.type._, com.***.***.type.Version, etc) but to no avail.

This is the error message given to me by Play! Framework. The error message displayed while running the Server

Is there an issue with the namespacing? Everything works fine when using classes located in my workspace.

The Paths are correct, I've double checked that. For reasons I cannot disclose more code in this region, if more information is required please ask for it and I'll edit the post.

1

1 Answers

1
votes

The problem is related to package named type. This word is reserved in Scala as language keyword. You need to escape it like this:

@import List[com.your.package.`type`.Version]