Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Can't debug TODO Application: Error Starting ApplicationContext #74

Open
sallyur opened this issue Oct 31, 2018 · 0 comments
Open

Can't debug TODO Application: Error Starting ApplicationContext #74

sallyur opened this issue Oct 31, 2018 · 0 comments

Comments

@sallyur
Copy link

sallyur commented Oct 31, 2018

Platform: Mac & Linux

Repro steps:

  1. Open the cloned project and verify .project and .classpath files and target folder are generated.
  2. Open file todo-app-java-on-azure\src\main\resources\application.properties and replaces it with a test configuration
  3. Set BP on TodoListController.java on addNewTodoItem(@requestbody TodoItem item) and main on TodoApplication.java
  4. Press F5 choose java and F5 again to start debug, verify the BP on main is hit
  5. Press F5 to continue

Result:

 :: Spring Boot ::        (v2.0.3.RELEASE)

[INFO] TodoApplication - Starting TodoApplication on vsunxi00101 with PID 8928 (C:\Users\testuser\Downloads\todo-app-java-on-azure-master\todo-app-java-on-azure-master\target\classes started by testuser in C:\Users\testuser\Downloads\todo-app-java-on-azure-master\todo-app-java-on-azure-master)

[INFO] TodoApplication - No active profile set, falling back to default profiles: default

[INFO] AnnotationConfigServletWebServerApplicationContext - Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@61c4eee0: startup date [Wed Oct 31 08:12:00 UTC 2018]; root of context hierarchy

[INFO] TomcatWebServer - Tomcat initialized with port(s): 8080 (http)

2018-10-31 08:12:04.826  INFO 8928 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]

2018-10-31 08:12:04.826  INFO 8928 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.31

2018-10-31 08:12:04.841  INFO 8928 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener   : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [C:\Program Files\Java\jdk1.8.0_181\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Microsoft SDKs\Azure\Azure Dev Spaces CLI (Preview)\;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\Java\jdk1.8.0_181\bin;C:\Program Files\Git\cmd;C:\Program Files\apache-maven-3.5.4\bin;C:\Users\testuser\AppData\Local\Microsoft\WindowsApps;;C:\Users\testuser\AppData\Local\Programs\Microsoft VS Code\bin;.]

2018-10-31 08:12:05.132  INFO 8928 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext

[INFO] ContextLoader - Root WebApplicationContext: initialization completed in 4180 ms

[INFO] ServletRegistrationBean - Servlet dispatcherServlet mapped to [/]

[INFO] FilterRegistrationBean - Mapping filter: 'characterEncodingFilter' to: [/*]

[INFO] FilterRegistrationBean - Mapping filter: 'hiddenHttpMethodFilter' to: [/*]

[INFO] FilterRegistrationBean - Mapping filter: 'httpPutFormContentFilter' to: [/*]

[INFO] FilterRegistrationBean - Mapping filter: 'requestContextFilter' to: [/*]

[WARN] AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'todoListController': Unsatisfied dependency expressed through field 'todoItemRepository'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'todoItemRepository': Unsatisfied dependency expressed through method 'setDocumentDbOperations' parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.microsoft.azure.spring.data.cosmosdb.core.DocumentDbOperations' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}

2018-10-31 08:12:05.606  INFO 8928 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]

[INFO] ConditionEvaluationReportLoggingListener - 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

[ERROR] LoggingFailureAnalysisReporter - 

***************************

APPLICATION FAILED TO START

***************************

Description:

Parameter 0 of method setDocumentDbOperations in com.microsoft.azure.spring.data.cosmosdb.repository.support.DocumentDbRepositoryFactoryBean required a bean of type 'com.microsoft.azure.spring.data.cosmosdb.core.DocumentDbOperations' that could not be found.

Action:

Consider defining a bean of type 'com.microsoft.azure.spring.data.cosmosdb.core.DocumentDbOperations' in your configuration.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant