Intégration du framework Apache Shiro on Play 2.1

J’essaie d’intégrer Apache Shiro dans Play Framework 2.1 J’utilise un projet open source ( https://github.com/wsargent/play-shiro ) qui supporte la structure de lecture 2.0

J’ai essayé de migrer cette application de la lecture 2.0 vers la version 2.1 mais je continue à recevoir ces erreurs lorsque je comstack le projet …

Est-ce que quelqu’un sait comment gérer ces erreurs?

[play-shiro] $ comstack [info] Updating {file:/Users/shai/Documents/Projects/opensource/play-shiro/}play-shiro... [info] Done updating. [info] Compiling 13 Scala sources and 1 Java source to /Users/shai/Documents/Projects/opensource/play-shiro/target/scala-2.10/classes... [error] /Users/shai/Documents/Projects/opensource/play-shiro/app/views/login.scala.html:0: not found: type Flash [error] /Users/shai/Documents/Projects/opensource/play-shiro/app/views/login.scala.html:1: not found: type Flash [error] @(form: Form[(Ssortingng,Ssortingng)])(implicit flash: Flash) [error] ^ [error] /Users/shai/Documents/Projects/opensource/play-shiro/app/controllers/Login.scala:36: type mismatch; [error] found : play.api.data.Form[(Ssortingng, Ssortingng)] [error] required: play.data.Form[(Ssortingng, Ssortingng)] [error] Ok(html.login(loginForm)) [error] ^ [error] /Users/shai/Documents/Projects/opensource/play-shiro/app/controllers/Login.scala:44: type mismatch; [error] found : play.api.data.Form[(Ssortingng, Ssortingng)] [error] required: play.data.Form[(Ssortingng, Ssortingng)] [error] formWithErrors => { BadRequest(html.login(formWithErrors)) }, [error] ^ [error] /Users/shai/Documents/Projects/opensource/play-shiro/app/views/register.scala.html:0: not found: type Flash [error] /Users/shai/Documents/Projects/opensource/play-shiro/app/views/register.scala.html:1: not found: type Flash [error] @(form: Form[(Ssortingng,Ssortingng)])(implicit flash: Flash) [error] ^ [error] /Users/shai/Documents/Projects/opensource/play-shiro/app/controllers/Register.scala:30: type mismatch; [error] found : play.api.data.Form[(Ssortingng, Ssortingng)] [error] required: play.data.Form[(Ssortingng, Ssortingng)] [error] Ok(html.register(registerForm)) [error] ^ [error] /Users/shai/Documents/Projects/opensource/play-shiro/app/controllers/Register.scala:37: type mismatch; [error] found : play.api.data.Form[(Ssortingng, Ssortingng)] [error] required: play.data.Form[(Ssortingng, Ssortingng)] [error] BadRequest(html.login(formWithErrors)) [error] ^ [error] /Users/shai/Documents/Projects/opensource/play-shiro/app/views/login.scala.html:19: value map is not a member of play.data.validation.ValidationError [error] @form.globalError.map { error => [error] ^ [error] /Users/shai/Documents/Projects/opensource/play-shiro/app/views/login.scala.html:53: not found: type Flash [error] /Users/shai/Documents/Projects/opensource/play-shiro/app/views/login.scala.html:55: not found: type Flash [error] /Users/shai/Documents/Projects/opensource/play-shiro/app/views/register.scala.html:18: value map is not a member of play.data.validation.ValidationError [error] @form.globalError.map { error => [error] ^ [error] /Users/shai/Documents/Projects/opensource/play-shiro/app/views/register.scala.html:51: not found: type Flash [error] /Users/shai/Documents/Projects/opensource/play-shiro/app/views/register.scala.html:53: not found: type Flash [error] 14 errors found [error] (comstack:comstack) Compilation failed [error] Total time: 3 s, completed Apr 17, 2013 7:00:42 PM [play-shiro] $ 

J’ai mis à jour le code à la version 2.1, mais veuillez utiliser Play Authenticate ou SecureSocial à la place. Ce code n’a jamais été destiné à être une qualité de production.

Après la mise à niveau de Play! 2.0 à jouer! 2.1, avez-vous exécuté les commandes suivantes?

 play clean play clean-files play comstack 

C’est généralement la cause de ces problèmes de compilation.

Si le problème persiste, consultez le guide de migration pour vérifier si vous avez bien suivi toutes les étapes requirejses.