Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

"The resource path is not valid" error

$
0
0
Hi, I'm trying to update my username token tutorial
(http://web-gmazza.rhcloud.com/blog/entry/cxf-usernametoken-profile)
from CXF 2.7.6 to CXF 3.0.1. As part of this upgrade, I'm using Java 8
and Tomcat 8 for the web service provider.

I can deploy the service and view its WSDL from a browser, but when I
try to make a client call the server reports this in the catalina logs:

java.lang.IllegalArgumentException: The resource path
[cxf-ehcache.xml] is not valid
at
org.apache.catalina.webresources.StandardRoot.validate(StandardRoot.java:250)
at
org.apache.catalina.webresources.StandardRoot.getResource(StandardRoot.java:212)
at
org.apache.catalina.webresources.StandardRoot.getResource(StandardRoot.java:206)
at
org.apache.catalina.core.ApplicationContext.getResource(ApplicationContext.java:533)
at
org.apache.catalina.core.ApplicationContextFacade.getResource(ApplicationContextFacade.java:199)
at
org.apache.cxf.transport.servlet.ServletContextResourceResolver.resolve(ServletContextResourceResolver.java:82)
at
org.apache.cxf.resource.DefaultResourceManager.findResource(DefaultResourceManager.java:113)
at
org.apache.cxf.resource.DefaultResourceManager.resolveResource(DefaultResourceManager.java:58)
at
org.apache.cxf.ws.security.wss4j.WSS4JUtils.getConfigFileURL(WSS4JUtils.java:129)
at
org.apache.cxf.ws.security.wss4j.WSS4JUtils.getReplayCache(WSS4JUtils.java:102)
at
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.getReplayCache(WSS4JInInterceptor.java:781)
at
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.configureReplayCaches(WSS4JInInterceptor.java:405)
at
org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor.handleMessage(WSS4JInInterceptor.java:233)
at
org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JInInterceptor.handleMessage(PolicyBasedWSS4JInInterceptor.java:133)
at
org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JInInterceptor.handleMessage(PolicyBasedWSS4JInInterceptor.java:116)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at
org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:243)
at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
...

I haven't configured the location of cxf-ehcache.xml and shouldn't need
to, according to the documentation
(http://cxf.apache.org/docs/ws-securitypolicy.html#WS-SecurityPolicy-Non-booleanWS-SecurityConfigurationparameters)
for the "ws-security.cache.config.file" property: "The default
configuration file that is used is cxf-ehcache.xml
<http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/resources/cxf-ehcache.xml?view=markup>
in the cxf-rt-ws-security module." I've already brought that dependency
into the WSP via the Maven POM:
https://github.com/gmazza/blog-samples/blob/master/cxf_usernametoken_profile/pom.xml,
so the web service provider should be detecting that file but for some
reason isn't. Here is my web service provider configuration:
https://github.com/gmazza/blog-samples/blob/master/cxf_usernametoken_profile/war/src/main/webapp/WEB-INF/cxf-servlet.xml.
Can anyone see why the default cxf-ehcache.xml file isn't getting picked
up by the web service provider?

Thanks,
Glen

Viewing all articles
Browse latest Browse all 5648

Trending Articles