2

java.lang.ClassNotFoundException: org.springframework.security.acls.model.SidRetrievalStrategy

asked 2014-05-19 10:25:50 +0800

aloulen gravatar image aloulen
75 5

updated 2014-05-19 13:37:28 +0800

chillworld gravatar image chillworld flag of Belgium
5337 4 9
https://github.com/chillw...

Hello I try using spring-security with zk

this is my zul page

<?page title="new page title" contentType="text/html;charset=UTF-8"?>
<?taglib uri="/WEB-INF/security.tld" prefix="sec"?>
<?variable-resolver class="org.zkoss.spring.DelegatingVariableResolver"?>
<zk>
    <window title="new page title" border="normal">
        <zk if="${sec:isAllGranted('ROLE_userList')}">
            You are a supervisor! You can therefore see the 
        </zk>
        <zk unless="${sec:isAllGranted('ROLE_kk')}">
            You are NOT a supervisor! You can NOT see the 
        </zk>

    </window>
</zk>

And this is th "security.tld" file

<taglib>
<uri>zkoss.org/demo/integration/security</uri>
<description>
    Methods and actions for ZK + Spring Security
</description>

<function>
    <name>isAllGranted</name>
    <function-class>org.zkoss.spring.security.SecurityUtil</function-class>
    <function-signature>boolean isAllGranted(java.lang.String authorities) 
    </function-signature>
    <description> 
        Return true if the authenticated principal is granted authorities of ALL the specified roles.
    </description>
</function>

</taglib>


after deploying the project I get this error

Grave: Servlet.service() for servlet [zkLoader] in context with path [/VisProd] threw exception [L''exécution de la servlet a lancé une exception] with root cause
java.lang.ClassNotFoundException: org.springframework.security.acls.model.SidRetrievalStrategy
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:270)
    at org.zkoss.lang.Classes.forNameByThread(Classes.java:270)
    at org.zkoss.xel.taglib.Taglibs.load(Taglibs.java:233)
    at org.zkoss.xel.taglib.Taglibs$TaglibLoader.load(Taglibs.java:291)
    at org.zkoss.xel.taglib.Taglibs$TaglibLoader.load(Taglibs.java:286)
    at org.zkoss.util.resource.ResourceCache$Info.load(ResourceCache.java:227)
    at org.zkoss.util.resource.ResourceCache$Info.<init>(ResourceCache.java:202)
    at org.zkoss.util.resource.ResourceCache.get(ResourceCache.java:134)
    at org.zkoss.xel.taglib.Taglibs.load(Taglibs.java:211)
    at org.zkoss.xel.util.TaglibMapper.load(TaglibMapper.java:85)
    at org.zkoss.xel.util.TaglibMapper.load(TaglibMapper.java:111)
    at org.zkoss.xel.util.TaglibMapper.load(TaglibMapper.java:93)
    at org.zkoss.xel.taglib.Taglibs.getFunctionMapper(Taglibs.java:134)
    at org.zkoss.xel.taglib.Taglibs.getFunctionMapper(Taglibs.java:110)
    at org.zkoss.zk.ui.metainfo.PageDefinition.getTaglibMapper(PageDefinition.java:881)
    at org.zkoss.zk.ui.metainfo.PageDefinition.preInit(PageDefinition.java:897)
    at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:420)
    at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:356)
    at org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:215)
    at org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:136)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:151)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.__invoke(StandardContextValve.java:123)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    at org.apache.catalina.core.StandardHostValve.__invoke(StandardHostValve.java:171)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:744)

Please help me thank you

delete flag offensive retag edit

1 Answer

Sort by » oldest newest most voted
2

answered 2014-05-19 13:39:26 +0800

chillworld gravatar image chillworld flag of Belgium
5337 4 9
https://github.com/chillw...

updated 2014-05-19 13:39:34 +0800

If you use maven you have to add spring-security-acl to your dependencies.

<dependency>
    <groupId>org.springframework.security</groupId>
    <artifactId>spring-security-acl</artifactId>
    <version>3.2.3.RELEASE</version>
</dependency>

Greetz chill.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-05-19 10:25:50 +0800

Seen: 24 times

Last updated: May 19 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More