[2.4.1-java] scala-ide 'ambiguous reference to overloaded definition' errors

345 views
Skip to first unread message

Harley Waldstein

unread,
Jul 3, 2015, 10:05:17 AM7/3/15
to play-fr...@googlegroups.com
Hello all,
I'm taking over an existing Play 2.2.5 codebase and one of the tasks that I've been charged with is updating to a newer version of Play. Currently, I've got my application running just fine on Play 2.4.1, but inside my IDE (scala-ide, because our proejct isn't using scala right now but may in the future) I'm getting hundreds of errors in my view templates about ambiguous references to overloaded definitions. See below.



@(student: Student, assignment: Assignment, schoolClasses: List[SchoolClass], message: String)

is at the top of one of my .scala.html files. This gives the below error:

Multiple annotations found at this line:
    - object HtmlFormat is not a member of package
     play.api.templates
    - type Html is not a member of package play.api.templates



 And, in the error panes at the bottom of the window, I've got 400+ errors that follow the below pattern:

ambiguous reference to overloaded definition, both method _display_ in class BaseScalaTemplate of type (o: Any)(implicit m: Manifest[<error>])<error> and  method _display_ in class BaseScalaTemplate of type (x: <error>)<error> match argument types (Array[Nothing]) and expected result type Any
 
assignmentEdit.scala.html    /myapp/app/views    line 149    Java Problem

Which references the following code:

@for(anOption  <- Application.OPTIONS) {
    <option value=@anOption  @if(anOption.equals(assignment.kindOfAssignment)){selected}> @anOption</option>
}



I have no idea how to fix this. Ideally these error messages would go away. My application compiles and runs just fine, so I suspect it's an error with the IDE or the classpath (as per this link: http://stackoverflow.com/questions/30829053/eclipse-shows-errors-in-play-2-4-setup). Right now, it's just an inconvenience more than anything. However, I would like to make this go away if anyone has ideas for how. Thanks in advance for any help!

I've included details about my Scala-IDE if that's helpful. Also, the eclipse files that I'm using are automatically generated via this method (https://playframework.com/documentation/2.4.1/IDE).

Scala IDE build of Eclipse SDK

Build id: 4.1.0-vfinal-20150525-1102-Typesafe


Eclipse Standard/SDK

Version: 4.3.0

 

Regards,
Harley Waldstein

Harley Waldstein

unread,
Jul 3, 2015, 10:18:09 AM7/3/15
to play-fr...@googlegroups.com
I updated to play 2.4.2 and there was no change.

Brainztorm

unread,
Jul 16, 2015, 10:09:44 AM7/16/15
to play-fr...@googlegroups.com
Same here :/

Brainztorm

unread,
Jul 16, 2015, 10:47:27 AM7/16/15
to play-fr...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages