Hi Benji, Why not use your own ReplayCache implementations based on the older version of EhCache you are using?
Colm. On Tue, Feb 19, 2013 at 6:36 PM, Shults, Benji < [email protected]> wrote: > In case this helps someone else, here is what I ended up doing. This got > us around the issue. > > Also, if anyone sees something non-optimal with this approach, please let > me know. > > These two beans: > > <!-- The following two beans are set because we are using such an > old version > of ehcache. Delete these when we upgrade EhCache. --> > <bean id="nonceMemoryReplayCache" > class="org.apache.ws.security.cache.MemoryReplayCache" /> > <bean id="timestampMemoryReplayCache" > class="org.apache.ws.security.cache.MemoryReplayCache" /> > > Wired in in this way: > > <jaxws:endpoint id="myService" implementor="#myServiceImpl" > address="/myService"> > <jaxws:properties> > <!-- The following two properties are set because > we are using such an > old version of ehcache. Delete these when > we upgrade EhCache. --> > <entry key="ws-security.nonce.cache.instance" > value-ref="nonceMemoryReplayCache" /> > <entry key="ws-security.timestamp.cache.instance" > value-ref="timestampMemoryReplayCache" /> > </jaxws:properties> > <jaxws:inInterceptors> > <ref bean="wss4jInInterceptor" /> > </jaxws:inInterceptors> > </jaxws:endpoint> > > Cheers, > > Benji > > -----Original Message----- > From: Shults, Benji [mailto:[email protected]] > Sent: Monday, February 18, 2013 11:03 AM > To: [email protected] > Subject: RE: ehcache version issue > > I just found this: > > > http://coheigea.blogspot.com/2012/04/security-token-caching-in-apache-cxf-26.html > > which seems to answer my question. I’ll try some stuff and get back to > you if it doesn’t work. > > Cheers, > > Benji > > From: Shults, Benji [mailto:[email protected]] > Sent: Monday, February 18, 2013 10:41 AM > To: [email protected] > Subject: ehcache version issue > > I’m using CXF 2.7.3 but I have to use ehcache 1.2.3 due to other packages > that can’t be upgraded yet. > > There is a binary incompatibility between these ehcache versions that > expresses itself in the stack trace below. > > java.lang.NoSuchMethodError: > net.sf.ehcache.CacheManager.getName()Ljava/lang/String; > at > org.apache.cxf.ws.security.cache.EHCacheManagerHolder.getCacheManager(EHCacheManagerHolder.java:81) > at > org.apache.cxf.ws.security.cache.EHCacheReplayCache.<init>(EHCacheReplayCache.java:54) > at > org.apache.cxf.ws.security.cache.EHCacheReplayCacheFactory.newReplayCache(EHCacheReplayCacheFactory.java:34) > at > org.apache.cxf.ws.security.wss4j.WSS4JUtils.getReplayCache(WSS4JUtils.java:79) > at > org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.getReplayCache(WSS4JInInterceptor.java:740) > at > org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:247) > at > org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:93) > at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:271) > at > org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) > at > org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:239) > at > org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:218) > at > org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:198) > at > org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:137) > at > org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:158) > at > org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:243) > at > org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:163) > at > javax.servlet.http.HttpServlet.service(HttpServlet.java:727) > at > org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:219) > at > weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) > at > weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) > at > weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301) > at > weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26) > at > weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) > at > org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:162) > at > org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237) > at > org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) > at > weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) > at > com.ecologic.components.server.i18n.SetCharacterEncodingFilter.doFilterInternal(SetCharacterEncodingFilter.java:56) > at > org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) > at > weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56) > at > weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730) > at > weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696) > at > weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) > at > weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120) > at > weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273) > at > weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179) > at > weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490) > at > weblogic.work.ExecuteThread.execute(ExecuteThread.java:256) > at weblogic.work.ExecuteThread.run(ExecuteThread.java:221) > > I was going to try to recompile ReplayCacheFactory to have it always > return an in-memory cache. Is there another suggestion? > > Cheers, > > Benji > > Benji Shults PhD > Senior Software Engineer > [cid:[email protected]] > 1650 W 82nd ST<http://g.co/maps/ypezy> STE 1100 > Bloomington MN 55431-1419 > phone: (952) 843-7572 > mobile: (763) 772-2899 > e-mail: [email protected]<mailto: > [email protected]> > website: www.ecologicanalytics.com<http://www.ecologicanalytics.com/> > > > > P PLEASE CONSIDER OUR ENVIRONMENT BEFORE PRINTING THIS EMAIL. > > This e-mail (including any attachments) is confidential and may be legally > privileged. If you are not an intended recipient or an authorized > representative of an intended recipient, you are prohibited from using, > copying or distributing the information in this e-mail or its attachments. > If you have received this e-mail in error, please notify the sender > immediately by return e-mail and delete all copies of this message and any > attachments. Thank you. > -- Colm O hEigeartaigh Talend Community Coder http://coders.talend.com
