Strict Standards: Declaration of HTML_Menu3::_findNodeType() should be compatible with HTML_Menu::_findNodeType($nodeId, &$nodeUrl, $level) in /var/www/wi-fizzle.com/lib/HTML/Menu3.php on line 49
Wi-Fizzle.com | Play-framework: Cannot find any HTTP Request here
Wi-Fizzle.com - Putting the fizzle in Wi-Fi since 2005 .. (yes, this was a poor choice for a domain name)

<div class="news_item">#455<div class="news_title">Play-framework: Cannot find any HTTP Request here

Posted by dandriff on Tuesday August 28, 2012@05:34PM

With play 2.0.3 I kept getting "Cannot find any HTTP Request here" with the following Action composition:

 def foo[A](i: Int)(implicit request: Request[A]): Baz = {
 ...
 }

I found the Play Request docs, which list the class annotations as:
 @implicitNotFound( "Cannot find any HTTP Request here" )

But this ended up not being useful information.

Ultimately StackOverflow helped me find a solution to this problem. This error was fixed by changing 'Request[A]' to instead use the type 'RequestHeader'.

e.g.:

 import play.api.mvc.RequestHeader

and:

 def foo(i: Int)(implicit request: RequestHeader): Baz = {
 ...
 }

Helpful:
Unhelpful:
Keywords:
  • Scala
  • Implicit parameters
  • Play-framework
  • Play-framework 2
  • Play-framework 2.0
  • Play-framework 2.0.x
  • Play-framework 2.0.3
  • Cannot find any HTTP Request here