{"time":"2025-03-02T17:06:07.595+00:00","msg":"\r\n\r\nError starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.","logger_name":"org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLogger","level":"INFO","app":"OrchsAPI"}
{"time":"2025-03-02T17:06:07.918+00:00","msg":"Application run failed","logger_name":"org.springframework.boot.SpringApplication","level":"ERROR","stack_trace":"org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'orchsAPIController': Unsatisfied dependency expressed through field 'extractedDataProcessor': Error creating bean with name 'extractedDataProcessor': Unsatisfied dependency expressed through field 'mongoCoreService': Error creating bean with name 'mongoCoreServiceImpl': Injection of autowired dependencies failed\r\n\tat org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessorAutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:768)\r\n\tat org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:145)\r\n\tat org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:509)\r\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1439)\r\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:599)\r\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522)\r\n\tat org.springframework.beans.factory.support.AbstractBeanFactory.lambda0(AbstractBeanFactory.java:337)\r\n\tat org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)\r\n\tat org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:335)\r\n\tat org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)\r\n\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:975)\r\n\tat org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:971)\r\n\tat org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:625)\r\n\tat org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)\r\n\tat org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)\r\n\tat org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456)\r\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:335)\r\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1363)\r\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1352)\r\n\tat com.mns.intl.partner.integration.orchestration.OrchsAPI.main(OrchsAPI.java:15)\r\nCaused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'extractedDataProcessor': Unsatisfied dependency expressed through field 'mongoCoreService': Error creating bean with name 'mongoCoreServiceImpl': Injection of autowired dependencies failed\r\n\tat org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessorAutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:768)\r\n\tat org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:145)\r\n\tat org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:509)\r\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1439)\r\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:599)\r\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522)\r\n\tat org.springframework.beans.factory.support.AbstractBeanFactory.lambda0(AbstractBeanFactory.java:337)\r\n\tat org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)\r\n\tat org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:335)\r\n\tat org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)\r\n\tat org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254)\r\n\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1443)\r\n\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1353)\r\n\tat org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessordoGetBeanAutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:785)\r\n\t... 34 common frames omitted\r\nCaused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'pigw.mongocore.imagery.extractdata' in value "processPropertiesAutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:785)\r\n\tat org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:768)\r\n\tat org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:145)\r\n\tat org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:509)\r\n\t... 45 common frames omitted\r\n","app":"OrchsAPI"}
The logs you provided indicate that your Spring Boot application is encountering issues during startup due to unsatisfied dependencies and an unresolved configuration property. Here's a step-by-step breakdown of the problem and possible solutions:
Problem Summary
Unsatisfied Dependency: The bean orchsAPIController cannot be created because it has a dependency on extractedDataProcessor, which itself has a dependency on mongoCoreServiceImpl.
Injection Failure: The mongoCoreServiceImpl bean has a dependency that is not being fulfilled due to properties not being resolved.
Missing Property: Specifically, the log indicates:
code
Could not resolve placeholder 'pigw.mongocore.imagery.extractdata' in value "${pigw.mongocore.imagery.extractdata}"
Steps to Fix
Check Property Configuration:
Ensure that the property pigw.mongocore.imagery.extractdata is defined in one of your application's property files (like application.properties or application.yml) or in your environment variables. If it's missing, add an entry for it:
properties
pigw.mongocore.imagery.extractdata=yourValueHere
If you are using multiple profiles or externalized configuration, ensure that you are loading the correct configuration file.
Verify Property Usage:
Confirm that any class that uses this property is correctly annotated with @Value or is set up to fetch environment properties properly. For example:
Re-run your application with debug logging enabled. This can provide additional insights into where and why the configuration is failing. You can enable debug by adding --debug to your application startup command or setting it in your application properties:
properties
debug=true
Check Bean Definitions:
If mongoCoreServiceImpl or the extractedDataProcessor has dependencies of their own, ensure those are correctly annotated with @Autowired, or check if they need any additional constructor parameters.
Check if Dependencies are Available:
If your application relies on external libraries or modules, ensure that they are correctly included in your build configuration (e.g., Maven pom.xml or Gradle build.gradle). Missing dependencies can lead to injection failures.
Consider Default Values:
If appropriate, you can define default values for missing properties to prevent the application from failing:
After making the necessary changes, restart your application and observe the logs for any new or recurring issues.
By following these steps, you should be able to diagnose and rectify the errors related to bean creation and property resolution in your Spring Boot application.