Thanks, so there was non need to change from Major to Critical status :-)
Cheers, Sergey
On 28/04/17 14:35, Nicolas Lenoire wrote:
I opened JIRA issues CXF-7351 and CXF-7352 related to the described
problems.
Thanks,
Nicolas Lenoire
On 4/28/2017 11:24, Sergey Beryozkin wrote:
Hi
This method has been stressed by TCK tests, and I can see
JAXRSClientServerBookTest.testUriInfoMatchedResources does go over the
method with the template vars.
Can you please open a JIRA issue with a test case or at least
prototype a sample code there, starting from the root resource till
the resource method where UriInfo.getMatchedURIs is called from ?
Thanks, Sergey
I'm using CXF 3.1.10, and I'm facing an error when invoking
UriInfo.getMatchedURIs() on templated URIs.
Below is a stack-trace of the error.
After digging a little bit into, UriInfoImpl.getMatchedURIs(decode) is
iterating over MethodInvocationInfos that have empty templated values
instead of expected values (note that private field
UriInfoImpl.templateParams is set with correct templated values).
Another issue I discovered at the same time, is that
UriInfoImpl.getMatchedResources() return actually matched resources
twice.
*Error stacktrace:*
Apr 28, 2017 9:51:05 AM org.apache.cxf.phase.PhaseInterceptorChain
doDefaultLogging
WARNING: Application
{http://browsing.restapi.dataui.mdm.semarchy.com/}RootController has
thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Unresolved variables; only 0 value(s)
given for 4 unique variable(s)
at
org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:162)
at
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:128)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:189)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:261)
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:99)
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
at
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at
org.apache.cxf.transport.local.LocalConduit$LocalConduitOutputStream$1.run(LocalConduit.java:88)
at
org.apache.cxf.workqueue.AutomaticWorkQueueImpl$3.run(AutomaticWorkQueueImpl.java:428)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at
org.apache.cxf.workqueue.AutomaticWorkQueueImpl$AWQThreadFactory$1.run(AutomaticWorkQueueImpl.java:353)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalArgumentException: Unresolved variables;
only 0 value(s) given for 4 unique variable(s)
at
org.apache.cxf.jaxrs.impl.UriBuilderImpl.substituteVarargs(UriBuilderImpl.java:286)
at
org.apache.cxf.jaxrs.impl.UriBuilderImpl.doBuildUriParts(UriBuilderImpl.java:121)
at
org.apache.cxf.jaxrs.impl.UriBuilderImpl.doBuild(UriBuilderImpl.java:101)
at
org.apache.cxf.jaxrs.impl.UriBuilderImpl.buildFromEncoded(UriBuilderImpl.java:230)
at
org.apache.cxf.jaxrs.impl.UriInfoImpl.createMatchedPath(UriInfoImpl.java:208)
at
org.apache.cxf.jaxrs.impl.UriInfoImpl.getMatchedURIs(UriInfoImpl.java:191)
at
org.apache.cxf.jaxrs.impl.UriInfoImpl.getMatchedURIs(UriInfoImpl.java:170)
at
org.apache.cxf.jaxrs.impl.tl.ThreadLocalUriInfo.getMatchedURIs(ThreadLocalUriInfo.java:96)
at
com.semarchy.commons.rest.LinkBuilderFactory.getSubResourcePath(LinkBuilderFactory.java:83)
at
com.semarchy.commons.rest.LinkBuilderFactory.linkTo(LinkBuilderFactory.java:71)
at
com.semarchy.commons.rest.AbstractRestResourceController.linkTo(AbstractRestResourceController.java:72)
at
com.semarchy.commons.rest.AbstractRestResourceController.linkTo(AbstractRestResourceController.java:68)
at
com.semarchy.mdm.dataui.restapi.browsing.BrowsingCollectionController.getBrowsingCollectionInfo(BrowsingCollectionController.java:150)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at
org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
at
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
... 13 more
Regards,
Nicolas Lenoire
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/