You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
java.lang.IllegalStateException: Invalid syntax in the template "param=faulty+{". Check if a path parameter is terminated with a "}".
at org.glassfish.jersey.client.JerseyWebTarget.getUri(JerseyWebTarget.java:113)
at org.glassfish.jersey.client.JerseyWebTarget.request(JerseyWebTarget.java:198)
at org.glassfish.jersey.client.JerseyWebTarget.request(JerseyWebTarget.java:38)
at org.glassfish.jersey.client.proxy.WebResourceFactory.invoke(WebResourceFactory.java:298)
at com.wamas.platform.rest.impl.WamasWebResourceFactory.invoke(WamasWebResourceFactory.java:60)
at jdk.proxy27/jdk.proxy27.$Proxy92.sayHelloWorld(Unknown Source)
at com.wamas.platform.rest.tests.SimpleServiceTest.testFaultyUrlEncoder(SimpleServiceTest.java:140)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at com.wamas.platform.rest.tests.RSServiceRule$1.evaluate(RSServiceRule.java:53)
at com.wamas.platform.rest.tests.RSFrameworkRule$1.evaluate(RSFrameworkRule.java:70)
at com.wamas.platform.test.junit4.rules.ResetLocalServiceProviderRule$1.evaluate(ResetLocalServiceProviderRule.java:24)
at com.wamas.platform.test.junit4.rules.ClearJmsConnectionPoolRule$1.evaluate(ClearJmsConnectionPoolRule.java:24)
at com.wamas.platform.test.junit4.rules.DumpCoverageRule$1.evaluate(DumpCoverageRule.java:65)
at com.wamas.platform.test.junit4.rules.SecurityTestRule$1.evaluate(SecurityTestRule.java:120)
at com.wamas.platform.test.junit4.rules.EmbeddedBrokerRule$1.evaluate(EmbeddedBrokerRule.java:29)
at com.wamas.platform.test.junit4.rules.ClearActiveMQClientThreadPoolRule$1.evaluate(ClearActiveMQClientThreadPoolRule.java:24)
at com.wamas.platform.test.junit4.rules.ShutdownDelegatorRule$1.evaluate(ShutdownDelegatorRule.java:41)
at com.wamas.platform.test.junit4.rules.SystemPropertiesRule$1.evaluate(SystemPropertiesRule.java:34)
at com.wamas.platform.test.junit4.rules.LogThreadsRule$1.evaluate(LogThreadsRule.java:34)
at com.wamas.platform.test.junit4.rules.LogTestMethodsRule$1.evaluate(LogTestMethodsRule.java:35)
at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
at com.wamas.platform.test.junit4.runners.WamasInVMSynchronizer$2.evaluate(WamasInVMSynchronizer.java:58)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:299)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:293)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.IllegalArgumentException: Invalid syntax in the template "param=faulty+{". Check if a path parameter is terminated with a "}".
at org.glassfish.jersey.uri.internal.UriTemplateParser.parse(UriTemplateParser.java:239)
at org.glassfish.jersey.uri.internal.UriTemplateParser.(UriTemplateParser.java:91)
at org.glassfish.jersey.uri.UriTemplate.createUriComponent(UriTemplate.java:980)
at org.glassfish.jersey.uri.UriTemplate.createURIWithStringValues(UriTemplate.java:946)
at org.glassfish.jersey.uri.UriTemplate.createURIWithStringValues(UriTemplate.java:882)
at org.glassfish.jersey.uri.UriTemplate.createURI(UriTemplate.java:847)
at org.glassfish.jersey.uri.internal.JerseyUriBuilder._build(JerseyUriBuilder.java:972)
at org.glassfish.jersey.uri.internal.JerseyUriBuilder.build(JerseyUriBuilder.java:886)
at org.glassfish.jersey.client.JerseyWebTarget.getUri(JerseyWebTarget.java:111)
... 32 more
Caused by: java.util.NoSuchElementException
at org.glassfish.jersey.uri.internal.CharacterIterator.next(CharacterIterator.java:57)
at org.glassfish.jersey.uri.internal.UriTemplateParser.consumeWhiteSpace(UriTemplateParser.java:452)
at org.glassfish.jersey.uri.internal.UriTemplateParser.parseName(UriTemplateParser.java:292)
at org.glassfish.jersey.uri.internal.UriTemplateParser.parse(UriTemplateParser.java:232)
... 40 more
This is a bit similar to #5249. The { sign is the template sign and Jersey handles this as being a template.
However, the proxy possibly does not expect a template to be used, as there won't be a way to set the template value, and in this case of a proxy, the argument should never have been treated as a template. This can be fixed by the proxy module.
We should also check the implementation of MP Rest Client to not have the same issue.
org.glassfish.jersey.uri.UriComponent._encode(String, Type, boolean, boolean)
does not encode curly braces properly eg in Query parametersExample Service
Test
Error
Versions
jersey-proxy-client-2.38.jar
org.glassfish.jersey.core.jersey-common_2.38.0.jar
The text was updated successfully, but these errors were encountered: