不知道为什么会发生这种情况,它在两周前开始工作。下面是异常日志:grails spring安全性facebook登录错误
No signature of method: xxxxx.UserInfo.findAllByEmail() is applicable for argument types:() values: []
Possible solutions: findAllByEmail([Ljava.lang.Object;). Stacktrace follows:
groovy.lang.MissingMethodException:
No signature of method: xxxxxx.UserInfo.findAllByEmail() is applicable for argument types:() values: []
Possible solutions: findAllByEmail([Ljava.lang.Object;)
at org.grails.datastore.gorm.GormStaticApi$_methodMissing_closure2.doCall(GormStaticApi.groovy:105)
at xxxxxx.FacebookController.checkEmail(FacebookController.groovy:87)
at xcompare.FacebookController$_closure2.doCall(FacebookController.groovy:49)
at xxxxxxx.OpenIDFilter.doFilter(OpenIDFilter.groovy:64)
at java.lang.Thread.run(Thread.java:662)
这是FacebookController.groovy
代码:
private boolean checkEmail(String email){
def users = UserInfo.findAllByEmail(email)
if(users){
// email is not available
return false;
}
return true;
}
,这里是从UserInfo
代码:
class UserInfo extends SecUser {
Provider provider
String activationCode
String firstName
String lastName
String email
Boolean active
UserType type
Date dateCreated
Date lastUpdated
Category category
static constraints = {
email unique:true, nullable:true, email:true
provider nullable:true
activationCode nullable:true
firstName blank:true, nullable:true
lastName blank:true, nullable:true
category nullable:true
}
String toString() {
// normal user
if(!openIds){
return username
}
// openid user
String name = "";
if(firstName){
name += firstName;
if(lastName){
name += " "+lastName;
}
}else{
name = email;
}
return name;
}
}
请问ypu请显示'FacebookController.groovy:87'和'xxxxx.UserInfo'? –
肯定伊戈尔。 '私人布尔checkEmail(字符串email){ \t \t高清用户= UserInfo.findAllByEmail(电子邮件) \t \t如果(用户){ \t \t \t //电子邮件不可 \t \t \t返回FALSE; \t \t} // //这是FacebookController.grovvy 87 – user1837312
请问您是否也可以添加它?不仅仅只是评论 –