I'm doing a simple authentication on an app built on Play! and Scala. Up until recently, simple authentication was working just fine until I created a manyToManyRelation
in our DB object.
The error:
ExceptionInInitializerError occured : null
The error points to line 2 of this code:
def authenticate(emailAddress:String, password:String) = {
from(DB.users)(u =>
where(u.emailAddress === emailAddress)
select(u)).headOption.flatMap(user => user.passwordMatches(password))
}
The change made to our DB object was this:
val owners =
manyToManyRelation(users, accounts).
via[Owner]((u,a,ua) => (ua.userId === u.id, a.id === ua.accountId))
I'm stumped how this would have an impact since there's no requirement in our code for each user to have an account. Any insight? Thanks.