IllegalArgumentException: Não há valores variáveis suficientes disponíveis no RestTemplate?

Estou tentando executar URL usando RestTemplate assim -

public static void main(String[] args) throws UnsupportedEncodingException {
    RestTemplate restTemplate = new RestTemplate();
    String url = "http://ptr.vip.host.com/pss/repositories/pssdb/branches/main/query/Service[@alias="
                        + "hello"
                        + "].serviceInstances.runsOn{@resourceId}?allowScan=true&limit=10000&skip=0";
    try {
        String response = restTemplate.getForObject(url, String.class);
        System.out.println(response);
    } catch (RestClientException ex) {
        ex.printStackTrace();
    }
}

Mas sempre que estou recebendo erros como este -

Exception in thread "main" java.lang.IllegalArgumentException: Not enough variable values available to expand '@resourceId'
    at org.springframework.web.util.UriComponents$VarArgsTemplateVariables.getValue(UriComponents.java:272)

O que estou errado e como corrigi-lo?

Atualizar:-

Eu tentei com esse URL também e não funcionou para mim. Eu acabei de substituir{@resourceId} com{{@resourceId}}

String url = "http://ptr.vip.host.com/pss/repositories/pssdb/branches/main/query/Service[@alias="
                        + "hello"
                        + "].serviceInstances.runsOn{{@resourceId}}?allowScan=true&limit=10000&skip=0";

Atualização-2

Aqui está o código -

try {

    UriComponentsBuilder builder = UriComponentsBuilder
            .fromPath("http://ptr.vip.str.host.com/pss/repositories/pssdb/branches/main/query/Service[@alias="
                    + "hello"
                    + "].serviceInstances.runsOn{@resourceId}?allowScan=true&limit=10000&skip=0");
    UriComponents uriComponents = builder.build();
    URI uri = uriComponents.toUri();

    String response = restTemplate.getForObject(uri, String.class);
    System.out.println(response);

} catch (RestClientException ex) {
    ex.printStackTrace();
}

E o erro é -

Exception in thread "main" java.lang.IllegalArgumentException: URI is not absolute
    at java.net.URI.toURL(URI.java:1095)
    at org.springframework.http.client.SimpleClientHttpRequestFactory.createRequest(SimpleClientHttpRequestFactory.java:109)
    at org.springframework.http.client.support.HttpAccessor.createRequest(HttpAccessor.java:76)
    at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:479)
    at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:460)
    at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:228)

questionAnswers(2)

yourAnswerToTheQuestion