• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

No active profile set, falling back to 1 default profile: "default" spring boot micro service messag

 
Ranch Hand
Posts: 1029
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

While doing Jenkins build of spring boot 3 micro service rest messaging application getting below type of errors in Jenkins build console logs



No active profile set, falling back to 1 default profile: "default"



I have two profiles defined in application.yaml file namely LOCAL, OpenShift as below.




How to resolve these types of errors. Please advise.
 
Bartender
Posts: 15743
368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The error message is reasonably clear. You haven't told Spring which profile to activate. You normally do this using an environment variable or an application.properties file.

Do you know how to set environment variables in Jenkins?
 
sai rama krishna
Ranch Hand
Posts: 1029
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you. When Invoking the sonarqube from jenkins getting this error though. So far not passing any environment variables in jenkins to pass like LOCAL or openshift profiles. Ideally I have to pass openshift to resolve these issues.
 
Stephan van Hulst
Bartender
Posts: 15743
368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay. So have you tried setting environment variables in Jenkins for the stage that runs SonarQube?
 
sai rama krishna
Ranch Hand
Posts: 1029
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is one test case under test class which I commented resolved this issue. Apparently that one test is causing this issue. Thank you.
 
Bartender
Posts: 2453
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Sai,
I am curious. Why your test case is causing the problem?
 
sai rama krishna
Ranch Hand
Posts: 1029
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This test class is like below written by someone else. I commented as below it all worked out well.
 
Himai Minh
Bartender
Posts: 2453
13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am even more curious. That may tell me that your Spring boot context cannot be loaded during the test?
 
sai rama krishna
Ranch Hand
Posts: 1029
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yea. I agree. As of now it is working fine. Due to JFROG security blockage lot of dependencies and versions keep getting blocked adding more challenges to development.
 
I suggest huckleberry pie. But the only thing on the gluten free menu is this tiny ad:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic