-
Notifications
You must be signed in to change notification settings - Fork 41.5k
Closed
Labels
status: duplicateA duplicate of another issueA duplicate of another issue
Description
When I use the attached testcase I cannot start the server implemented in Main.java
(see the console output below).
I'm using the following versions:
JDK 8u131
Gradle 4.1-milestone-1
MongoDB 3.5.10
The local MongoDB server is started w/o an authentication database. I get the same error when using an authentication database.
Console output:
Starting a Gradle Daemon, 1 busy and 2 incompatible Daemons could not be reused, use --status for details
> Task :bootRun
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.0.M2)
2017-07-18 13:09:44.301 INFO 9372 --- [ main] de.hska.test.Microservice : Starting Microservice on iwi-w-ziju01-d with PID 9372 (C:\Users\ziju0001\IdeaProjects\testcase\build\classes\java\main started by ziju0001 in C:\Users\ziju0001\IdeaProjects\testcase)
2017-07-18 13:09:44.305 INFO 9372 --- [ main] de.hska.test.Microservice : No active profile set, falling back to default profiles: default
2017-07-18 13:09:44.382 INFO 9372 --- [ main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@402e37bc: startup date [Tue Jul 18 13:09:44 CEST 2017]; root of context hierarchy
2017-07-18 13:09:46.642 INFO 9372 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2017-07-18 13:09:46.658 INFO 9372 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2017-07-18 13:09:46.661 INFO 9372 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.15
2017-07-18 13:09:46.807 INFO 9372 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2017-07-18 13:09:46.807 INFO 9372 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 2429 ms
2017-07-18 13:09:47.015 INFO 9372 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2017-07-18 13:09:47.021 INFO 9372 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2017-07-18 13:09:47.022 INFO 9372 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2017-07-18 13:09:47.022 INFO 9372 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2017-07-18 13:09:47.022 INFO 9372 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2017-07-18 13:09:47.085 WARN 9372 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'testController': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'testService': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'de.hska.test.service.TestRepository' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
2017-07-18 13:09:47.088 INFO 9372 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2017-07-18 13:09:47.110 INFO 9372 --- [ main] utoConfigurationReportLoggingInitializer :
Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
2017-07-18 13:09:47.230 ERROR 9372 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 0 of constructor in de.hska.test.service.TestService required a bean of type 'de.hska.test.service.TestRepository' that could not be found.
Action:
Consider defining a bean of type 'de.hska.test.service.TestRepository' in your configuration.
Metadata
Metadata
Assignees
Labels
status: duplicateA duplicate of another issueA duplicate of another issue