Spring Boot 启动报错:LoggingFailureAnalysisReporter


17:57:19: Executing task ‘bootRun‘...


Parallel execution with configuration on demand is an incubating feature.
:thinkvenus-common:compileJava
:thinkvenus-tool:processResources UP-TO-DATE
:thinkvenus-common:compileJava UP-TO-DATE
:thinkvenus-common:processResources UP-TO-DATE
:thinkvenus-common:classes UP-TO-DATE
:thinkvenus-common:jar UP-TO-DATE
:thinkvenus-tool:compileJava UP-TO-DATE
:thinkvenus-tool:classes UP-TO-DATE
:thinkvenus-tool:findMainClass
:thinkvenus-tool:bootRun


. ____ _ __ _ _
/\\ / ___‘_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | ‘_ | ‘_| | ‘_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
‘ |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.5.9.RELEASE)


2017-12-12 17:57:21.856 INFO 6176 --- [ main] c.t.tool.controller.SampleController : Starting SampleController on MAO-MAO with PID 6176 (D:\java\ThinkVenus\thinkvenus-tool\build\classes\main started by mao.mao in D:\java\ThinkVenus\thinkvenus-tool)
2017-12-12 17:57:21.856 INFO 6176 --- [ main] c.t.tool.controller.SampleController : No active profile set, falling back to default profiles: default
2017-12-12 17:57:22.121 INFO 6176 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot[email protected]5d20e46: startup date [Tue Dec 12 17:57:22 CST 2017]; root of context hierarchy
2017-12-12 17:57:22.605 INFO 6176 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean ‘dataSource‘ with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Dbcp2; factoryMethodName=dataSource; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Dbcp2.class]] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfigure.jdbc.DataSourceConfiguration$Hikari; factoryMethodName=dataSource; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]]
2017-12-12 17:57:23.464 INFO 6176 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
2017-12-12 17:57:23.480 INFO 6176 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2017-12-12 17:57:23.480 INFO 6176 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.23
2017-12-12 17:57:23.620 INFO 6176 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2017-12-12 17:57:23.620 INFO 6176 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 1499 ms
2017-12-12 17:57:23.745 INFO 6176 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: ‘dispatcherServlet‘ to [/]
2017-12-12 17:57:23.761 INFO 6176 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: ‘characterEncodingFilter‘ to: [/*]
2017-12-12 17:57:23.761 INFO 6176 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: ‘hiddenHttpMethodFilter‘ to: [/*]
2017-12-12 17:57:23.761 INFO 6176 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: ‘httpPutFormContentFilter‘ to: [/*]
2017-12-12 17:57:23.761 INFO 6176 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: ‘requestContextFilter‘ to: [/*]
2017-12-12 17:57:24.026 INFO 6176 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot[email protected]5d20e46: startup date [Tue Dec 12 17:57:22 CST 2017]; root of context hierarchy
2017-12-12 17:57:24.088 INFO 6176 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/]}" onto java.lang.String com.thinkvenus.tool.controller.SampleController.home()
2017-12-12 17:57:24.104 INFO 6176 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2017-12-12 17:57:24.104 INFO 6176 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2017-12-12 17:57:24.120 INFO 6176 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-12-12 17:57:24.120 INFO 6176 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-12-12 17:57:24.166 INFO 6176 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-12-12 17:57:24.260 WARN 6176 --- [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘dataSource‘ defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method ‘dataSource‘ threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Cannot determine embedded database driver class for database type NONE. If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).
2017-12-12 17:57:24.260 INFO 6176 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
2017-12-12 17:57:24.260 INFO 6176 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2017-12-12 17:57:24.291 INFO 6176 --- [ main] utoConfigurationReportLoggingInitializer :


Error starting ApplicationContext. To display the auto-configuration report re-run your application with ‘debug‘ enabled.
2017-12-12 17:57:24.291 ERROR 6176 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :


***************************
APPLICATION FAILED TO START
***************************


Description:


Cannot determine embedded database driver class for database type NONE


Action:


If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).


:thinkvenus-tool:bootRun FAILED


FAILURE: Build failed with an exception.


* What went wrong:
Execution failed for task ‘:thinkvenus-tool:bootRun‘.
> Process ‘command ‘C:\Program Files\Java\jdk1.8.0_60\bin\java.exe‘‘ finished with non-zero exit value 1


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.


BUILD FAILED


Total time: 4.587 secs
Process ‘command ‘C:\Program Files\Java\jdk1.8.0_60\bin\java.exe‘‘ finished with non-zero exit value 1
17:57:24: Task execution finished ‘bootRun‘.


在多方查证后,需要在启动类的@EnableAutoConfiguration或@SpringBootApplication中添加exclude = {DataSourceAutoConfiguration.class},排除此类的autoconfig。启动以后就可以正常运行。 
后期在继续抽取spring boot底层功能封装时,会从源码找到此问题发生的原因,并更新此文章

时间: 2024-07-30 14:48:40

Spring Boot 启动报错:LoggingFailureAnalysisReporter的相关文章

spring Boot启动报错Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotatedElementUtils.getAnnotationAttributes

spring boot 启动报错如下 org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.boot.autoconfigure

spring boot 启动报错:Cannot determine embedded database driver class for database type NONE

错误原因:spring boot默认会加载org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration类,DataSourceAutoConfiguration类使用了@Configuration注解向spring注入了dataSource bean.因为工程中没有关于dataSource相关的配置信息,当spring创建dataSource bean因缺少相关的信息就会报错. 解决办法:第一种:在Applicat

Spring Boot 启动报错 Exception in thread &quot;main&quot; java.lang.StringIndexOutOfBoundsException: String index out of range: 37

使用命令 java -jar springBoot.jar  启动项目,结果报错如下: Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 37 at java.lang.String.substring(String.java:1963) at org.springframework.boot.loader.jar.JarFile.create

Spring boot 启动报错:com.mongodb.MongoSocketOpenException: Exception opening socket

详细错误信息: com.mongodb.MongoSocketOpenException: Exception opening socket at com.mongodb.connection.SocketStream.open(SocketStream.java:63) ~[mongodb-driver-core-3.4.2.jar:na] at com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnect

解决spring boot启动报错java.lang.NoClassDefFoundError: ch/qos/logback/classic/Level

学习了:https://blog.csdn.net/yunfeng482/article/details/78106433 没想到啊:我都看见了,idea也反编不了: 没想到要重新下载啊: 原文地址:https://www.cnblogs.com/stono/p/9126417.html

spriing boot 启动报错:Cannot determine embedded database driver class for database type NONE

最近在学习使用spring boot.使用maven创建好工程,只引用需要用到的spring boot相关的jar包,除此之外没有任何的配置. 写了一个最简单的例子,如下所示: 1 package com.torlight; 2 3 import org.springframework.boot.SpringApplication; 4 import org.springframework.boot.autoconfigure.EnableAutoConfiguration; 5 import

spring Ehcache启动报错的问题

之前找大牛给我写了个spring mvc使用缓存的项目例子但是自己结合项目的时候,在启动的时候就报错,一大片红加蓝,错误信息一大堆,在网上搜了很久也没有找到答案,两天后,我又把大牛请来了,用了一分钟解决了,他只让我在百度里搜了一下tried to access method net.sf.ehcache.CacheManager这个错误,点开第一个结果,就解决了 关于 java.lang.IllegalAccessError: tried to access method net.sf.ehca

spring boot启动报内存溢出的问题

问题: springBoot项目,已经两次了,启动报内存溢出,内存泄露 分析: 内存泄露是因为垃圾回收器想要回收程序不用的对象,但是该对象还有引用存在 解决: 1.第一次是mybatis文件和Java的dao层里的接口类,参数不同,导致编译时停在这个mapper文件 可以查看控制台看停在那个mapper来解决该文件的参数问题 2.第二次是启动的时候有一个controller类的属性靠配置文件注入值,后来不用了也没注释掉, 但是配置文件修改了,没有这个值的配置,启动报内存泄露 总结: 可以看出,都

spring项目启动报错BeanFactory not initialized or already closed

spring项目启动的时候报如下错误: java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContextat org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanF