Spring Boot 2.0.0.M2 doesn't work with Spring Data MongoDB Kay.M4
See original GitHub issueWhen 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.
Issue Analytics
- State:
- Created 6 years ago
- Comments:20 (12 by maintainers)
Top Results From Across the Web
Spring boot 2.0.0.M1 NoSuchMethodError - Stack Overflow
i am having this problem in 2018 with SPBoot 2.0.4 + SpringCloud Finchley.RELEASE + Spring Cloud Contract 2.0.1... i was able to "solve"...
Read more >Changelog - Spring
#3686 - reading a document with a list with a null element fails with Spring Data Mongo 3.2.2, works with 3.2.1. * #3684...
Read more >spring-projects/spring-data - Gitter
Import dependency management for Spring Boot --> <dependency> ... @nmquyet Spring Data Kay M4 requires Spring Framework 5. ... Upgrade to Boot 2.0...
Read more >This Month in Spring - October 2nd, 2018 - VMware Tanzu
M4 ! The new Spring Boot 2.1.0.M4 release ships with a ton of things including preliminary support for Spring Data JDBC, including a...
Read more >Spring-boot – Spring boot 2.0.0.M1 NoSuchMethodError: org ...
M1 NoSuchMethodError: org.springframework.boot.builder. ... When I try to run the tests I get a lot of log info but these lines seem key...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@snicoll I wonder if the scanner could output a warning to that effect at compile time when the resulting index is below a certain size threshold?
@snicoll a few weeks ago I read about the indexer (in the JIRA ticket system?) and made a note that we should add a dependency on the indexer when we start piloting the upgrade. Sorry, my failure.