spring - AuthenticationManager returns NullPointerException -
this question has answer here:
i'd login page web application. on example project found on internet integrating spring security , ldap, got working. when tried integrate working example real app, i'm gettin nullpointerexception.
you have both spring annotation , jsf annotations on same class, if refer them different names (like did seeing own 'answer'), different instances. not , cause of original problem. (and did not post xhtml) referred bean in xhtml loginviewbean
. removed , (i suspect) started referring loginview
, got spring managed instance authenticationmanager injected, instead of jsf managed 1 without authenticationmanger injected. resulted in npe. got spring 1 caused springel resolver configured having precedence on default jsf resolver. removing @managedbean
, @requestscoped
, refering bean spring name have solved problem , in better way.
see also
Comments
Post a Comment