spring mvc - java.lang.ClassNotFoundException: org.springframework.security.access.expression.SecurityExpressionHandler when using <security:authorize > tag -
i'm using spring security first time spring mvc , tiles. ok authentication using users/roles database, when add <security:authorize>
tag make adaptation according user authenticated in views i'm getting error :
java.lang.classnotfoundexception: org.springframework.security.access.expression.securityexpressionhandler org.apache.catalina.loader.webappclassloader.loadclass(webappclassloader.java:1714) org.apache.catalina.loader.webappclassloader.loadclass(webappclassloader.java:1559) java.lang.class.getdeclaredmethods0(native method) java.lang.class.privategetdeclaredmethods(unknown source) java.lang.class.getdeclaredmethods(unknown source) org.apache.catalina.util.introspection.getdeclaredmethods(introspection.java:127) org.apache.jasper.runtime.taghandlerpool.get(taghandlerpool.java:121) org.apache.jsp.web_002dinf.pages.jsp.indexadmin2_jsp._jspx_meth_security_005fauthorize_005f0(indexadmin2_jsp.java:262) org.apache.jsp.web_002dinf.pages.jsp.indexadmin2_jsp._jspservice(indexadmin2_jsp.java:223) org.apache.jasper.runtime.httpjspbase.service(httpjspbase.java:70) javax.servlet.http.httpservlet.service(httpservlet.java:728) org.apache.jasper.servlet.jspservletwrapper.service(jspservletwrapper.java:432) org.apache.jasper.servlet.jspservlet.servicejspfile(jspservlet.java:390) org.apache.jasper.servlet.jspservlet.service(jspservlet.java:334) javax.servlet.http.httpservlet.service(httpservlet.java:728) org.springframework.web.servlet.view.internalresourceview.rendermergedoutputmodel(internalresourceview.java:238) org.springframework.web.servlet.view.abstractview.render(abstractview.java:250) org.springframework.web.servlet.dispatcherservlet.render(dispatcherservlet.java:1047) org.springframework.web.servlet.dispatcherservlet.dodispatch(dispatcherservlet.java:817) org.springframework.web.servlet.dispatcherservlet.doservice(dispatcherservlet.java:719) org.springframework.web.servlet.frameworkservlet.processrequest(frameworkservlet.java:669) org.springframework.web.servlet.frameworkservlet.doget(frameworkservlet.java:574) javax.servlet.http.httpservlet.service(httpservlet.java:621) javax.servlet.http.httpservlet.service(httpservlet.java:728) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:343) org.springframework.security.web.access.intercept.filtersecurityinterceptor.invoke(filtersecurityinterceptor.java:109) org.springframework.security.web.access.intercept.filtersecurityinterceptor.dofilter(filtersecurityinterceptor.java:83) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:355) org.springframework.security.web.access.exceptiontranslationfilter.dofilter(exceptiontranslationfilter.java:97) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:355) org.springframework.security.web.session.sessionmanagementfilter.dofilter(sessionmanagementfilter.java:100) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:355) org.springframework.security.web.authentication.anonymousauthenticationfilter.dofilter(anonymousauthenticationfilter.java:78) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:355) org.springframework.security.web.servletapi.securitycontextholderawarerequestfilter.dofilter(securitycontextholderawarerequestfilter.java:54) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:355) org.springframework.security.web.savedrequest.requestcacheawarefilter.dofilter(requestcacheawarefilter.java:35) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:355) org.springframework.security.web.authentication.www.basicauthenticationfilter.dofilter(basicauthenticationfilter.java:177) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:355) org.springframework.security.web.authentication.abstractauthenticationprocessingfilter.dofilter(abstractauthenticationprocessingfilter.java:188) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:355) org.springframework.security.web.authentication.logout.logoutfilter.dofilter(logoutfilter.java:105) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:355) org.springframework.security.web.context.securitycontextpersistencefilter.dofilter(securitycontextpersistencefilter.java:79) org.springframework.security.web.filterchainproxy$virtualfilterchain.dofilter(filterchainproxy.java:355) org.springframework.security.web.filterchainproxy.dofilter(filterchainproxy.java:149) org.springframework.web.filter.delegatingfilterproxy.invokedelegate(delegatingfilterproxy.java:237) org.springframework.web.filter.delegatingfilterproxy.dofilter(delegatingfilterproxy.java:167)
this example of tile causing trouble :
<%@taglib prefix="security" uri="http://www.springframework.org/security/tags" %> <div class="leftpanel"> <div class="leftmenu"> <ul class="nav nav-tabs nav-stacked"> <li class="nav-header">ierp</li> <security:authorize ifanygranted="role_admin" > <li class="dropdown active"><a href="#"><span class="iconfa-th-list"></span>aaa</a> <ul> <li><a href="gestionservices.erp">gestion des services</a></li> </ul> </li> </security:authorize> <security:authorize ifanygranted="role_user" > <li class="dropdown active"><a href="#"><span class="iconfa-list-alt"></span>section de facturation</a> <ul> <li><a href="facturesparmois.erp">facturation par périodes</a></li> </ul> </li> </security:authorize> </ul> </div> </div>
when checked web-inf/lib folder found had different versions of spring-security jars, had 3.1.4 , others 3.0.2. it's working jars on 3.1.4 version ! thank luke, comment gave me answer !
Comments
Post a Comment