spring - @Autowired works in one class, fails in the other -
i have registrantserviceimpl component, autowire formcontroller , uniquepeselvalidator. autowires field in formcontroller, throws nullpointerexception in uniquepeselvalidator class.
registrantserviceimpl.java:
@service public class registrantserviceimpl implements registrantservice { @autowired private registrantdao registrantdao; @override public list<registrant> fetchallregistrants() { return registrantdao.fetchallregistrants(); } @override public void saveorupdate(registrant registrant) { registrantdao.saveorupdate(registrant); } @override public void delete(registrant registrant) { registrantdao.delete(registrant); } @override public registrant getbypesel(string pesel) { return registrantdao.getbypesel(pesel); } @override public boolean ispeselunique(string pesel) { return registrantdao.getbypesel(pesel) == null; } }
formcontroller.java
@controller @requestmapping(value = "/") public class formcontroller { @autowired private registrantservice registrantservice; // autowires here correctly @requestmapping(method = requestmethod.get) public string displayform(model model) { model.addattribute("registrant", new registrant()); return "form"; } @requestmapping(method = requestmethod.post) public string submitform(@valid @modelattribute("registrant") registrant registrant, bindingresult result, model model) { if (result.haserrors()) { return "form"; } registrantservice.saveorupdate(registrant); return "form"; } }
uniquepeselvalidator.java:
public class uniquepeselvalidator implements constraintvalidator<uniquepesel, string> { @autowired private registrantservice registrantservice; // fails autowire @override public void initialize(uniquepesel uniquepesel) {} @override public boolean isvalid(string pesel, constraintvalidatorcontext context) { return pesel != null && registrantservice.ispeselunique(pesel); // throws nullpointerexception here } }
i'm using custom @uniquepesel annotation in pojo:
@entity @table(name = "registrants") public class registrant { @uniquepesel @digits(integer = 11, fraction = 0) @naturalid @column(name = "pesel") private string pesel; }
full stack trace:
org.springframework.web.util.nestedservletexception: request processing failed; nested exception javax.validation.validationexception: hv000028: unexpected exception during isvalid call. org.springframework.web.servlet.frameworkservlet.processrequest(frameworkservlet.java:982) org.springframework.web.servlet.frameworkservlet.dopost(frameworkservlet.java:872) javax.servlet.http.httpservlet.service(httpservlet.java:648) org.springframework.web.servlet.frameworkservlet.service(frameworkservlet.java:846) javax.servlet.http.httpservlet.service(httpservlet.java:729) org.springframework.web.filter.characterencodingfilter.dofilterinternal(characterencodingfilter.java:197) org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) org.apache.tomcat.websocket.server.wsfilter.dofilter(wsfilter.java:53) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:317) org.springframework.security.web.access.intercept.filtersecurityinterceptor.invoke(filtersecurityinterceptor.java:127) org.springframework.security.web.access.intercept.filtersecurityinterceptor.dofilter(filtersecurityinterceptor.java:91) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.access.exceptiontranslationfilter.dofilter(exceptiontranslationfilter.java:115) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.session.sessionmanagementfilter.dofilter(sessionmanagementfilter.java:137) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.authentication.anonymousauthenticationfilter.dofilter(anonymousauthenticationfilter.java:111) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.servletapi.securitycontextholderawarerequestfilter.dofilter(securitycontextholderawarerequestfilter.java:169) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.savedrequest.requestcacheawarefilter.dofilter(requestcacheawarefilter.java:63) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.authentication.ui.defaultloginpagegeneratingfilter.dofilter(defaultloginpagegeneratingfilter.java:177) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.authentication.abstractauthenticationprocessingfilter.dofilter(abstractauthenticationprocessingfilter.java:200) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.authentication.logout.logoutfilter.dofilter(logoutfilter.java:121) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.csrf.csrffilter.dofilterinternal(csrffilter.java:124) org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.header.headerwriterfilter.dofilterinternal(headerwriterfilter.java:66) org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.context.securitycontextpersistencefilter.dofilter(securitycontextpersistencefilter.java:105) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.context.request.async.webasyncmanagerintegrationfilter.dofilterinternal(webasyncmanagerintegrationfilter.java:56) org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.filterchainproxy.dofilterinternal(filterchainproxy.java:214) org.springframework.security.web.filterchainproxy.dofilter(filterchainproxy.java:177) org.springframework.web.filter.delegatingfilterproxy.invokedelegate(delegatingfilterproxy.java:346) org.springframework.web.filter.delegatingfilterproxy.dofilter(delegatingfilterproxy.java:262) root cause javax.validation.validationexception: hv000028: unexpected exception during isvalid call. org.hibernate.validator.internal.engine.constraintvalidation.constrainttree.validatesingleconstraint(constrainttree.java:451) org.hibernate.validator.internal.engine.constraintvalidation.constrainttree.validateconstraints(constrainttree.java:127) org.hibernate.validator.internal.engine.constraintvalidation.constrainttree.validateconstraints(constrainttree.java:87) org.hibernate.validator.internal.metadata.core.metaconstraint.validateconstraint(metaconstraint.java:73) org.hibernate.validator.internal.engine.validatorimpl.validatemetaconstraint(validatorimpl.java:617) org.hibernate.validator.internal.engine.validatorimpl.validateconstraint(validatorimpl.java:580) org.hibernate.validator.internal.engine.validatorimpl.validateconstraintsforsingledefaultgroupelement(validatorimpl.java:524) org.hibernate.validator.internal.engine.validatorimpl.validateconstraintsfordefaultgroup(validatorimpl.java:492) org.hibernate.validator.internal.engine.validatorimpl.validateconstraintsforcurrentgroup(validatorimpl.java:457) org.hibernate.validator.internal.engine.validatorimpl.validateincontext(validatorimpl.java:407) org.hibernate.validator.internal.engine.validatorimpl.validate(validatorimpl.java:205) org.hibernate.cfg.beanvalidation.beanvalidationeventlistener.validate(beanvalidationeventlistener.java:116) org.hibernate.cfg.beanvalidation.beanvalidationeventlistener.onpreinsert(beanvalidationeventlistener.java:80) org.hibernate.action.internal.entityidentityinsertaction.preinsert(entityidentityinsertaction.java:197) org.hibernate.action.internal.entityidentityinsertaction.execute(entityidentityinsertaction.java:75) org.hibernate.engine.spi.actionqueue.execute(actionqueue.java:623) org.hibernate.engine.spi.actionqueue.addresolvedentityinsertaction(actionqueue.java:277) org.hibernate.engine.spi.actionqueue.addinsertaction(actionqueue.java:258) org.hibernate.engine.spi.actionqueue.addaction(actionqueue.java:303) org.hibernate.event.internal.abstractsaveeventlistener.addinsertaction(abstractsaveeventlistener.java:318) org.hibernate.event.internal.abstractsaveeventlistener.performsaveorreplicate(abstractsaveeventlistener.java:275) org.hibernate.event.internal.abstractsaveeventlistener.performsave(abstractsaveeventlistener.java:182) org.hibernate.event.internal.abstractsaveeventlistener.savewithgeneratedid(abstractsaveeventlistener.java:113) org.hibernate.event.internal.defaultpersisteventlistener.entityistransient(defaultpersisteventlistener.java:189) org.hibernate.event.internal.defaultpersisteventlistener.onpersist(defaultpersisteventlistener.java:132) org.hibernate.event.internal.defaultpersisteventlistener.onpersist(defaultpersisteventlistener.java:58) org.hibernate.internal.sessionimpl.firepersist(sessionimpl.java:763) org.hibernate.internal.sessionimpl.persist(sessionimpl.java:743) org.hibernate.internal.sessionimpl.persist(sessionimpl.java:748) org.sieniawski.repository.registrantdaoimpl.saveorupdate(registrantdaoimpl.java:35) sun.reflect.nativemethodaccessorimpl.invoke0(native method) sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) java.lang.reflect.method.invoke(method.java:497) org.springframework.aop.support.aoputils.invokejoinpointusingreflection(aoputils.java:333) org.springframework.aop.framework.reflectivemethodinvocation.invokejoinpoint(reflectivemethodinvocation.java:190) org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:157) org.springframework.transaction.interceptor.transactioninterceptor$1.proceedwithinvocation(transactioninterceptor.java:99) org.springframework.transaction.interceptor.transactionaspectsupport.invokewithintransaction(transactionaspectsupport.java:282) org.springframework.transaction.interceptor.transactioninterceptor.invoke(transactioninterceptor.java:96) org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:179) org.springframework.aop.framework.jdkdynamicaopproxy.invoke(jdkdynamicaopproxy.java:213) com.sun.proxy.$proxy198.saveorupdate(unknown source) org.sieniawski.service.registrantserviceimpl.saveorupdate(registrantserviceimpl.java:23) org.sieniawski.controller.formcontroller.submitform(formcontroller.java:38) sun.reflect.nativemethodaccessorimpl.invoke0(native method) sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) java.lang.reflect.method.invoke(method.java:497) org.springframework.web.method.support.invocablehandlermethod.doinvoke(invocablehandlermethod.java:220) org.springframework.web.method.support.invocablehandlermethod.invokeforrequest(invocablehandlermethod.java:134) org.springframework.web.servlet.mvc.method.annotation.servletinvocablehandlermethod.invokeandhandle(servletinvocablehandlermethod.java:116) org.springframework.web.servlet.mvc.method.annotation.requestmappinghandleradapter.invokehandlermethod(requestmappinghandleradapter.java:827) org.springframework.web.servlet.mvc.method.annotation.requestmappinghandleradapter.handleinternal(requestmappinghandleradapter.java:738) org.springframework.web.servlet.mvc.method.abstracthandlermethodadapter.handle(abstracthandlermethodadapter.java:85) org.springframework.web.servlet.dispatcherservlet.dodispatch(dispatcherservlet.java:963) org.springframework.web.servlet.dispatcherservlet.doservice(dispatcherservlet.java:897) org.springframework.web.servlet.frameworkservlet.processrequest(frameworkservlet.java:970) org.springframework.web.servlet.frameworkservlet.dopost(frameworkservlet.java:872) javax.servlet.http.httpservlet.service(httpservlet.java:648) org.springframework.web.servlet.frameworkservlet.service(frameworkservlet.java:846) javax.servlet.http.httpservlet.service(httpservlet.java:729) org.springframework.web.filter.characterencodingfilter.dofilterinternal(characterencodingfilter.java:197) org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) org.apache.tomcat.websocket.server.wsfilter.dofilter(wsfilter.java:53) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:317) org.springframework.security.web.access.intercept.filtersecurityinterceptor.invoke(filtersecurityinterceptor.java:127) org.springframework.security.web.access.intercept.filtersecurityinterceptor.dofilter(filtersecurityinterceptor.java:91) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.access.exceptiontranslationfilter.dofilter(exceptiontranslationfilter.java:115) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.session.sessionmanagementfilter.dofilter(sessionmanagementfilter.java:137) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.authentication.anonymousauthenticationfilter.dofilter(anonymousauthenticationfilter.java:111) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.servletapi.securitycontextholderawarerequestfilter.dofilter(securitycontextholderawarerequestfilter.java:169) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.savedrequest.requestcacheawarefilter.dofilter(requestcacheawarefilter.java:63) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.authentication.ui.defaultloginpagegeneratingfilter.dofilter(defaultloginpagegeneratingfilter.java:177) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.authentication.abstractauthenticationprocessingfilter.dofilter(abstractauthenticationprocessingfilter.java:200) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.authentication.logout.logoutfilter.dofilter(logoutfilter.java:121) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.csrf.csrffilter.dofilterinternal(csrffilter.java:124) org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.header.headerwriterfilter.dofilterinternal(headerwriterfilter.java:66) org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.context.securitycontextpersistencefilter.dofilter(securitycontextpersistencefilter.java:105) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.context.request.async.webasyncmanagerintegrationfilter.dofilterinternal(webasyncmanagerintegrationfilter.java:56) org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.filterchainproxy.dofilterinternal(filterchainproxy.java:214) org.springframework.security.web.filterchainproxy.dofilter(filterchainproxy.java:177) org.springframework.web.filter.delegatingfilterproxy.invokedelegate(delegatingfilterproxy.java:346) org.springframework.web.filter.delegatingfilterproxy.dofilter(delegatingfilterproxy.java:262) root cause java.lang.nullpointerexception org.sieniawski.validation.uniquepeselvalidator.isvalid(uniquepeselvalidator.java:21) org.sieniawski.validation.uniquepeselvalidator.isvalid(uniquepeselvalidator.java:10) org.hibernate.validator.internal.engine.constraintvalidation.constrainttree.validatesingleconstraint(constrainttree.java:448) org.hibernate.validator.internal.engine.constraintvalidation.constrainttree.validateconstraints(constrainttree.java:127) org.hibernate.validator.internal.engine.constraintvalidation.constrainttree.validateconstraints(constrainttree.java:87) org.hibernate.validator.internal.metadata.core.metaconstraint.validateconstraint(metaconstraint.java:73) org.hibernate.validator.internal.engine.validatorimpl.validatemetaconstraint(validatorimpl.java:617) org.hibernate.validator.internal.engine.validatorimpl.validateconstraint(validatorimpl.java:580) org.hibernate.validator.internal.engine.validatorimpl.validateconstraintsforsingledefaultgroupelement(validatorimpl.java:524) org.hibernate.validator.internal.engine.validatorimpl.validateconstraintsfordefaultgroup(validatorimpl.java:492) org.hibernate.validator.internal.engine.validatorimpl.validateconstraintsforcurrentgroup(validatorimpl.java:457) org.hibernate.validator.internal.engine.validatorimpl.validateincontext(validatorimpl.java:407) org.hibernate.validator.internal.engine.validatorimpl.validate(validatorimpl.java:205) org.hibernate.cfg.beanvalidation.beanvalidationeventlistener.validate(beanvalidationeventlistener.java:116) org.hibernate.cfg.beanvalidation.beanvalidationeventlistener.onpreinsert(beanvalidationeventlistener.java:80) org.hibernate.action.internal.entityidentityinsertaction.preinsert(entityidentityinsertaction.java:197) org.hibernate.action.internal.entityidentityinsertaction.execute(entityidentityinsertaction.java:75) org.hibernate.engine.spi.actionqueue.execute(actionqueue.java:623) org.hibernate.engine.spi.actionqueue.addresolvedentityinsertaction(actionqueue.java:277) org.hibernate.engine.spi.actionqueue.addinsertaction(actionqueue.java:258) org.hibernate.engine.spi.actionqueue.addaction(actionqueue.java:303) org.hibernate.event.internal.abstractsaveeventlistener.addinsertaction(abstractsaveeventlistener.java:318) org.hibernate.event.internal.abstractsaveeventlistener.performsaveorreplicate(abstractsaveeventlistener.java:275) org.hibernate.event.internal.abstractsaveeventlistener.performsave(abstractsaveeventlistener.java:182) org.hibernate.event.internal.abstractsaveeventlistener.savewithgeneratedid(abstractsaveeventlistener.java:113) org.hibernate.event.internal.defaultpersisteventlistener.entityistransient(defaultpersisteventlistener.java:189) org.hibernate.event.internal.defaultpersisteventlistener.onpersist(defaultpersisteventlistener.java:132) org.hibernate.event.internal.defaultpersisteventlistener.onpersist(defaultpersisteventlistener.java:58) org.hibernate.internal.sessionimpl.firepersist(sessionimpl.java:763) org.hibernate.internal.sessionimpl.persist(sessionimpl.java:743) org.hibernate.internal.sessionimpl.persist(sessionimpl.java:748) org.sieniawski.repository.registrantdaoimpl.saveorupdate(registrantdaoimpl.java:35) sun.reflect.nativemethodaccessorimpl.invoke0(native method) sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) java.lang.reflect.method.invoke(method.java:497) org.springframework.aop.support.aoputils.invokejoinpointusingreflection(aoputils.java:333) org.springframework.aop.framework.reflectivemethodinvocation.invokejoinpoint(reflectivemethodinvocation.java:190) org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:157) org.springframework.transaction.interceptor.transactioninterceptor$1.proceedwithinvocation(transactioninterceptor.java:99) org.springframework.transaction.interceptor.transactionaspectsupport.invokewithintransaction(transactionaspectsupport.java:282) org.springframework.transaction.interceptor.transactioninterceptor.invoke(transactioninterceptor.java:96) org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:179) org.springframework.aop.framework.jdkdynamicaopproxy.invoke(jdkdynamicaopproxy.java:213) com.sun.proxy.$proxy198.saveorupdate(unknown source) org.sieniawski.service.registrantserviceimpl.saveorupdate(registrantserviceimpl.java:23) org.sieniawski.controller.formcontroller.submitform(formcontroller.java:38) sun.reflect.nativemethodaccessorimpl.invoke0(native method) sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) java.lang.reflect.method.invoke(method.java:497) org.springframework.web.method.support.invocablehandlermethod.doinvoke(invocablehandlermethod.java:220) org.springframework.web.method.support.invocablehandlermethod.invokeforrequest(invocablehandlermethod.java:134) org.springframework.web.servlet.mvc.method.annotation.servletinvocablehandlermethod.invokeandhandle(servletinvocablehandlermethod.java:116) org.springframework.web.servlet.mvc.method.annotation.requestmappinghandleradapter.invokehandlermethod(requestmappinghandleradapter.java:827) org.springframework.web.servlet.mvc.method.annotation.requestmappinghandleradapter.handleinternal(requestmappinghandleradapter.java:738) org.springframework.web.servlet.mvc.method.abstracthandlermethodadapter.handle(abstracthandlermethodadapter.java:85) org.springframework.web.servlet.dispatcherservlet.dodispatch(dispatcherservlet.java:963) org.springframework.web.servlet.dispatcherservlet.doservice(dispatcherservlet.java:897) org.springframework.web.servlet.frameworkservlet.processrequest(frameworkservlet.java:970) org.springframework.web.servlet.frameworkservlet.dopost(frameworkservlet.java:872) javax.servlet.http.httpservlet.service(httpservlet.java:648) org.springframework.web.servlet.frameworkservlet.service(frameworkservlet.java:846) javax.servlet.http.httpservlet.service(httpservlet.java:729) org.springframework.web.filter.characterencodingfilter.dofilterinternal(characterencodingfilter.java:197) org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) org.apache.tomcat.websocket.server.wsfilter.dofilter(wsfilter.java:53) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:317) org.springframework.security.web.access.intercept.filtersecurityinterceptor.invoke(filtersecurityinterceptor.java:127) org.springframework.security.web.access.intercept.filtersecurityinterceptor.dofilter(filtersecurityinterceptor.java:91) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.access.exceptiontranslationfilter.dofilter(exceptiontranslationfilter.java:115) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.session.sessionmanagementfilter.dofilter(sessionmanagementfilter.java:137) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.authentication.anonymousauthenticationfilter.dofilter(anonymousauthenticationfilter.java:111) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.servletapi.securitycontextholderawarerequestfilter.dofilter(securitycontextholderawarerequestfilter.java:169) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.savedrequest.requestcacheawarefilter.dofilter(requestcacheawarefilter.java:63) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.authentication.ui.defaultloginpagegeneratingfilter.dofilter(defaultloginpagegeneratingfilter.java:177) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.authentication.abstractauthenticationprocessingfilter.dofilter(abstractauthenticationprocessingfilter.java:200) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.authentication.logout.logoutfilter.dofilter(logoutfilter.java:121) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.csrf.csrffilter.dofilterinternal(csrffilter.java:124) org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.header.headerwriterfilter.dofilterinternal(headerwriterfilter.java:66) org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.context.securitycontextpersistencefilter.dofilter(securitycontextpersistencefilter.java:105) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.context.request.async.webasyncmanagerintegrationfilter.dofilterinternal(webasyncmanagerintegrationfilter.java:56) org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:107) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:331) org.springframework.security.web.filterchainproxy.dofilterinternal(filterchainproxy.java:214) org.springframework.security.web.filterchainproxy.dofilter(filterchainproxy.java:177) org.springframework.web.filter.delegatingfilterproxy.invokedelegate(delegatingfilterproxy.java:346) org.springframework.web.filter.delegatingfilterproxy.dofilter(delegatingfilterproxy.java:262)
i have no xml configuration in project, configured using pure java configuration. know there similar questions on stackoverflow, none entirely applicable problem.
your uniquepeselvalidator
class isn't annotated @component
or @service
@autowired
annotation being ignored.
Comments
Post a Comment