The scenario:
I have a Spring boot application with 4 maven profiles, and 5 different application.properties files (e.g. application-dev.properties) (4 for the maven profiles and 1 for the default). Test and Production Maven profiles have almost the same settings, and the differences are things like domains, texts, etc. We have 2 Weblogic servers, with the same configuration and JNDIs. One for test and one for production.
The problem:
When deploying and activating the application on the test Weblogic server (with test maven profile selected on build), the deployment and the activation of the .war are successful. The application runs fine, and everyone is happy.
When deploying and activation the application on the production Weblogic server (with the production maven profile), the deployment is fine, but when activating the .war it goes FAILED with the following error.
weblogic.application.ModuleException: java.lang.IllegalArgumentException: Could not resolve placeholder 'xxxxxxxx' in value "${xxxxxxxx}"
at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:233)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:228)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
Truncated. see log file for complete stacktrace
Caused By: java.lang.IllegalArgumentException: Could not resolve placeholder 'xxxxxxxx' in value "${xxxxxxxx}"
at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:178)
at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:124)
at org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:236)
at org.springframework.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders(AbstractPropertyResolver.java:210)
at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.lambda$processProperties$0(PropertySourcesPlaceholderConfigurer.java:175)
Truncated. see log file for complete stacktrace
At first, I thought that the problem is the production maven profile, but then I tried to deploy and activate the app with the production profile in the test Weblogic, and everything went ok.
I also tried to check setDomainEnv.sh for differences in Weblogic environment variables, but they were the same.
Any ideas?