2012-07-02 7 views
3

Play Framework를 처음 사용하고 있으며 Facebook-OAuth2 제공자가있는 앱에 SecureSocial 플러그인을 통합하려고합니다. .Play Framework + SecureSocial : java.lang.NoSuchMethodError : securesocial.controllers.ReverseLoginPage.authenticate

! @6apkmf9m3 - Internal server error, for request [GET /login] -> 

play.core.ActionInvoker$$anonfun$receive$1$$anon$1: Execution exception [[NoSuchMethodError: securesocial.controllers.ReverseLoginPage.authenticate(Ljava/lang/String;)Lplay/api/mvc/Call;]] 
    at play.core.ActionInvoker$$anonfun$receive$1.apply(Invoker.scala:134) [play_2.9.1.jar:2.0.2] 
    at play.core.ActionInvoker$$anonfun$receive$1.apply(Invoker.scala:115) [play_2.9.1.jar:2.0.2] 
    at akka.actor.Actor$class.apply(Actor.scala:318) [akka-actor.jar:2.0.2] 
    at play.core.ActionInvoker.apply(Invoker.scala:113) [play_2.9.1.jar:2.0.2] 
    at akka.actor.ActorCell.invoke(ActorCell.scala:626) [akka-actor.jar:2.0.2] 
    at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:197) [akka-actor.jar:2.0.2] 
Caused by: java.lang.NoSuchMethodError: securesocial.controllers.ReverseLoginPage.authenticate(Ljava/lang/String;)Lplay/api/mvc/Call; 
    at securesocial.core.IdentityProvider.authenticationUrl(IdentityProvider.scala:86) ~[classes/:na] 
    at securesocial.views.html.login$$anonfun$apply$3$$anonfun$apply$4.apply(login.template.scala:44) ~[classes/:na] 
    at securesocial.views.html.login$$anonfun$apply$3$$anonfun$apply$4.apply(login.template.scala:43) ~[classes/:na] 
    at play.templates.TemplateMagic$.defining(ScalaTemplates.scala:756) ~[templates_2.9.1.jar:2.0.2] 
    at securesocial.views.html.login$$anonfun$apply$3.apply(login.template.scala:43) ~[classes/:na] 
    at securesocial.views.html.login$$anonfun$apply$3.apply(login.template.scala:42) ~[classes/:na] 
  • 누군가가 나에게이 오류에 대한 자세한 정보를 찾아 볼 수있는 위치에 대한 힌트를 줄 수 : 나는 /login에 GET 요청을 보낼 때이 오류에 달렸다?
  • Play는 securesocial.controllers.ReverseLoginPage에서 securesocial.controllers.LoginPage까지 모듈에서 어떻게 작동합니까? Play 2 documentation에서
+0

로그인 템플릿에 오류가있는 것 같습니다. 그거 붙여 줄 수 있니? – Sietse

+0

그것은 securesocial에 의한 템플릿 사용입니까? https://github.com/jaliss/securesocial/blob/master/module-code/app/securesocial/views/login.scala.html – Alex

+0

예. – Sietse

답변

4

:

For each controller used in the routes file, the router will generate a ‘reverse controller’ in the routes package, having the same action methods, with the same signature, but returning a play.api.mvc.Call instead of a play.api.mvc.Action.

나는이 ReverseLoginPage이 어디에서 오는 것 같아요,하지만 난 실패 무슨 단서가 없다. 경로에 오류가 있거나 주변에있는 오래된 클래스 일 수 있습니다. clean을 실행 해보십시오. 그렇지 않은지 확인하십시오.

0

프레임 워크를 처음 사용하는 경우입니다. 왜 지금 당장 할 수 없지만 이것은 라우트 파일과 관련이 있습니다. 그것은 securesocial가 자신의 설정에 주어진 경로가없는 액션을 호출하려고하기 때문입니다. 이 샘플 라우트를 시도해보십시오. 누락 된 하나의 라우트를 얻기 위해 불필요하다고 생각되는 라우트를 제거하여 디버깅을 시도해보십시오.

# Routes 
# This file defines all application routes (Higher priority routes first) 
# ~~~~ 

# Home page 
GET /       controllers.Application.index() 




# Map static resources from the /public folder to the /assets URL path 
GET  /assets/*file    controllers.Assets.at(path="/public", file) 

# Login page 
GET  /login      securesocial.controllers.LoginPage.login 
GET  /logout      securesocial.controllers.LoginPage.logout 

# User Registration and password handling (only needed if you are using UsernamePasswordProvider) 
GET  /signup      securesocial.controllers.Registration.startSignUp 
POST /signup      securesocial.controllers.Registration.handleStartSignUp 
GET  /signup/:token    securesocial.controllers.Registration.signUp(token) 
POST /signup/:token    securesocial.controllers.Registration.handleSignUp(token) 
GET  /reset      securesocial.controllers.Registration.startResetPassword 
POST /reset      securesocial.controllers.Registration.handleStartResetPassword 
GET  /reset/:token    securesocial.controllers.Registration.resetPassword(token) 
POST /reset/:token    securesocial.controllers.Registration.handleResetPassword(token) 
GET  /password     securesocial.controllers.PasswordChange.page 
POST /password     securesocial.controllers.PasswordChange.handlePasswordChange 


# Providers entry points 
GET  /authenticate/:provider  securesocial.controllers.ProviderController.authenticate(provider) 
POST /authenticate/:provider  securesocial.controllers.ProviderController.authenticateByPost(provider) 
GET  /not-authorized    securesocial.controllers.ProviderController.notAuthorized 

재생 2.2.0 버전으로 나에게 적합하며 안전한 사회는 master-SNAPSHOT입니다.