Are you sure you are using Play Framework 2.1 when building your project?
The 2.1 branch indeed defines in GlobalSettings
:
def onHandlerNotFound(request: RequestHeader): Result
While the 2.2 branch reads:
def onHandlerNotFound(request: RequestHeader): Future[SimpleResult]
Maybe you have different versions configured in IntelliJ and your build scripts?
For the 2.2 version you could write:
override def onHandlerNotFound(request: RequestHeader): Future[SimpleResult] = {
Future.successful(NotFound(
views.html.common.notFoundPage(request.path)
))
}