<p>I have a <code>RestTemplate</code> that I build it with <code>RestTemplateBuilder</code>. I set the rootUri for builder. In below method (updateState1) sometimes I got the "URI is not absolute" error. For example when I called this method concurrently for 2 times I often got 1 error.</p>

<p><strong>EDIT and Solution</strong>:
I use this <code>RestTemplate</code> in service task of camunda process. I launch this project in kubernetes container that has different timezone with the oracle database. When I add timezone variable every things work fine.</p>

<p>Spring boot version: 2.1.1.RELEASE</p>

<p>Here is my code:</p>

<pre><code>@Component
@Slf4j
public class CoreServiceClient {

    private RestTemplate restTemplate;

    private static final String root = "http://localhost:8080/test/api/";

    public CoreServiceClient(RestTemplateBuilder restTemplateBuilder) {
        restTemplate = restTemplateBuilder.rootUri(root).build();
    }


    public void updateState1(UpdateParam updateParam) {
        HttpHeaders headers = generateHeader();
        UpdateRequest updateRequest = new UpdateRequest(updateParam.getState());

        HttpEntity&lt;UpdateRequest&gt; httpEntity = new HttpEntity&lt;&gt;(updateRequest, headers);

        ResponseEntity&lt;String&gt; response = restTemplate.exchange(
                "/food/{id}/state",
                HttpMethod.PUT, httpEntity, String.class, updateParam.getId());

    }
    public void updateState2(String id) {
        HttpHeaders headers = generateHeader();
        UpdateRequest updateRequest = new UpdateRequest("done");

        HttpEntity&lt;UpdateRequest&gt; httpEntity = new HttpEntity&lt;&gt;(updateRequest, headers);

        ResponseEntity&lt;String&gt; response = restTemplate.exchange(
                "/food/{id}/state",
                HttpMethod.PUT, httpEntity, String.class, id);

    }
}
</code></pre>

<p>cuase (stacktrace):</p>

<pre><code>Caused by: java.lang.IllegalArgumentException: URI is not absolute
    at java.net.URI.toURL(URI.java:1088)
    at org.springframework.http.client.SimpleClientHttpRequestFactory.createRequest(SimpleClientHttpRequestFactory.java:145)
    at org.springframework.http.client.support.HttpAccessor.createRequest(HttpAccessor.java:87)
    at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:730)
    at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:669)
    at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:578)
    at com.test.client.CoreServiceClient.updateState(CoreServiceClient.java:39)
    at sun.reflect.GeneratedMethodAccessor263.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.camunda.bpm.engine.impl.javax.el.BeanELResolver.invoke(BeanELResolver.java:479)
    ... 85 more
</code></pre>

<p>Remove <code>/</code> in root:</p>

<pre><code>private static final String root = "http://localhost:8080/test/api";
</code></pre>

<p>RestTemplate accepts uriTemplate as long as they start with <code>/</code> so your root should be without it. if it doesn't start with <code>/</code> it will consider it as a full <code>URL</code></p>
