Not long ago, I was asked by some colleagues to help troubleshoot an issue; they were having some difficulty with the production deployment of a monolith web service using Wildfly and Spring. How could I resist, considering how much I love event-driven, IOC frameworks and their ridiculously verbose log files? (You can cut the sarcasm with a knife.) In any case, it seems that the server was failing during initialization. After wading through the gazillions of lines written due to an exception from the JedisConnectionFactory, I finally found an Null exception from our code that was a clue. It seemed to indicate that a variable was missing from from our active profile. So, I looked inside the standalone.xml file to see if we were pointing to the right profile:
<!-- list of extension -->
<property name="spring.profiles.active" value="production"/>
That was the right profile name, all right…So I copied the deployed .WAR file and opened it up. Alas, the profile wasn’t inside the “/resources” directory! It seems that they weren’t deploying the right version. Problem solved.
So, that leads me to my point. Can the Spring community do me a big favor? If the target profile does not exist, then maybe the log file (among its gazillions of other lines) should say that THE TARGET PROFILE DOES NOT EXIST!
That would be a big timesaver and most appreciated.