Could not resolve placeholder 'feign.client.config.remoteRepositoryService.url'

Hello everyone!
I’m new to Camunda and I’m trying my first scenarios.
What I do need is to create a springboot project (I use IntelliJ 2020.2.3), deployed in an integrated Oracle Weblogic 12.2.1.3, that manipulates processes using the rest engine.
I have created a Camunda BPM project (v7.11.0) with embedded tomcat and is running in localhost:8080 (localhost:8080/engine-rest/engine for the engine).

I then create a spring project, following the examples and the guide in https://camunda.github.io/camunda-rest-client-spring-boot/quick-start/

My client is the following:

@Component
public class CamundaClient {

@Qualifier("remote")
private RuntimeService runtimeService;

@Qualifier("remote")
private RepositoryService repositoryService;

public CamundaClient(RuntimeService runtimeService) {
    this.runtimeService = runtimeService;
}

public void start() {
    this.runtimeService
            .startProcessInstanceByKey("my_process_key");
}

public void correlate() {
    this.runtimeService
            .createMessageCorrelation("message_received")
            .processInstanceBusinessKey("WAIT_FOR_MESSAGE")
            .correlateAllWithResult();
}

public void start(String processKey) {
    this.runtimeService
            .startProcessInstanceByKey(processKey);
}

}

And my application.yml file in resources folder is:

feign:
client:
config:
remoteRuntimeService:
url: “http:/ /localhost:8080/engine-rest/”
remoteRepositoryService:
url: “http:/ /localhost:8080/engine-rest/”

On deployment to my Weblogic I get the following error:

[ERROR] Failed to execute goal com.oracle.weblogic:weblogic-maven-plugin:12.2.1-3-0:redeploy (wls-deploy) on project camundaSpringDemo: weblogic.Deployer$DeployerException: weblogic.deploy.api.tools.deployer.DeployerException: Task 16 failed: [Deployer:149026]deploy application CamundaSpringDemo [Version=0.0.1] on DefaultServer.
[ERROR] Target state: redeploy failed on Server DefaultServer
[ERROR] java.lang.IllegalArgumentException: Could not resolve placeholder ‘feign.client.config.remoteRepositoryService.url’ in value “http://${feign.client.config.remoteRepositoryService.url}”
[ERROR]

Am I doing something wrong on how to define the feign properties?
If you need any more details on the project let me know so that I can provide.

Thanks in advance!

Make sure your application.yml has the proper spaces and quotes, otherwise it won’t be parsed properly. For example, if I remove the two spaces before “client” in the config, I can reproduce your error. The following config works okay:

feign:
  client:
    config:
      remoteRuntimeService:
        url: "http://localhost:8080/engine-rest/"
      remoteRepositoryService:
        url: "http://localhost:8080/engine-rest/"

The formatting of my original post displayed the yaml this way. Apologies for this.
My file is exactly the same as the one you pasted.
I also tried with copy and paste yours.
Still same error.

Can you post application.yml and pom.xml as files? or link to a reproduction project? “Still same error” isn’t enough to go off.

I have pushed a simple project that triggers this error in https://github.com/rexpap/CamundaSpringDemo

Please let me know if you need anything else
thank you

You’re defining application.properties and application.yml, which would have likely caused you grief. But ultimately, you’re overriding the properties file with

@PropertySource(value = "classpath:environment.properties")

You’ll need to move your feign properties into environment.properties.

1 Like

Yes! You are correct!
Adding the following into environment.properties and the issue is resolved:

feign.client.config.remoteRuntimeService.url=http://localhost:8080/engine-rest/
feign.client.config.remoteRepositoryService.url=http://localhost:8080/engine-rest/

Thank you very much

1 Like