- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我最近将我的 Spring Boot 版本从 1.4.0 更新到 1.4.1,并在从 IntelliJ 运行我的应用程序时开始出现此错误:
15:26:09.700 INFO [Thread-2] AnnotationConfigApplicationContext - Closing org.springframework.context.annotation.AnnotationConfigApplicationContext@2898ac89: startup date [Fri Nov 25 15:26:04 EET 2016]; root of context hierarchy
15:26:09.701 WARN [Thread-2] AnnotationConfigApplicationContext - Exception thrown from ApplicationListener handling ContextClosedEvent
java.lang.NoSuchMethodError: ch.qos.logback.classic.LoggerContext.removeObject(Ljava/lang/String;)V
at org.springframework.boot.logging.logback.LogbackLoggingSystem.markAsUninitialized(LogbackLoggingSystem.java:265) ~[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
at org.springframework.boot.logging.logback.LogbackLoggingSystem.cleanUp(LogbackLoggingSystem.java:196) ~[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
at org.springframework.boot.logging.LoggingApplicationListener.onContextClosedEvent(LoggingApplicationListener.java:248) ~[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
at org.springframework.boot.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:216) ~[spring-boot-1.4.1.RELEASE.jar:1.4.1.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:166) ~[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138) ~[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:382) ~[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:336) ~[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:989) ~[spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
at org.springframework.context.support.AbstractApplicationContext$2.run(AbstractApplicationContext.java:923) [spring-context-4.3.3.RELEASE.jar:4.3.3.RELEASE]
这是我的pom:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>repgen</groupId>
<artifactId>RepGen</artifactId>
<version>1.0</version>
<name>RepGen</name>
<packaging>jar</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.1.RELEASE</version>
</parent>
<properties>
<!-- Generic properties -->
<java.version>1.7</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<hibernate.version>5.2.2.Final</hibernate.version>
<start-class>repgen.Application</start-class>
<!-- Test -->
<assertj.version>2.2.0</assertj.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<version>1.4.1.RELEASE</version>
<exclusions>
<exclusion>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
<version>1.4.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<version>1.4.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
<version>1.4.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>1.4.1.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<version>1.4.1.RELEASE</version>
</dependency>
<!-- HIBERNATE -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<!--<version>5.2.2.FINAL</version>-->
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>5.2.4.Final</version>
</dependency>
<!-- Logback -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.2</version>
</dependency>
<!-- Log4j -->
<!--<dependency>-->
<!--<groupId>log4j</groupId>-->
<!--<artifactId>log4j</artifactId>-->
<!--<version>1.2.16</version>-->
<!--</dependency>-->
<!-- JODA-TIME -->
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.9.4</version>
</dependency>
<!-- APACHE COMMONS for List Utils -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>4.1</version>
</dependency>
<!-- SAXON XSLT Processor -->
<dependency>
<groupId>net.sf.saxon</groupId>
<artifactId>Saxon-HE</artifactId>
<version>9.7.0-8</version>
</dependency>
<!-- APACHE FOP for xsl-fo object formatting -->
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>fop</artifactId>
<version>2.1</version>
</dependency>
<!-- APACHE POI for office documents -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.13</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>ooxml-schemas</artifactId>
<version>1.3</version>
</dependency>
<!-- Databases: Oracle. This needs to be manually imported into local Maven repo. -->
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.4</version>
</dependency>
<!-- JAVA Mail -->
<dependency>
<groupId>javax.mail</groupId>
<artifactId>javax.mail-api</artifactId>
<version>1.5.5</version>
</dependency>
<!-- ZIP file related -->
<dependency>
<groupId>net.lingala.zip4j</groupId>
<artifactId>zip4j</artifactId>
<version>1.3.1</version>
</dependency>
<!-- Test Artifacts -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>2.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.10.19</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.dbunit</groupId>
<artifactId>dbunit</artifactId>
<version>2.5.1</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>junit</artifactId>
<groupId>junit</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.github.springtestdbunit</groupId>
<artifactId>spring-test-dbunit</artifactId>
<version>1.2.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<testSourceDirectory>test</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>1.4.0.RELEASE</version>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>https://repo.spring.io/libs-release</url>
</repository>
<repository>
<id>org.jboss.repository.releases</id>
<name>JBoss Maven Release Repository</name>
<url>https://repository.jboss.org/nexus/content/repositories/releases</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>https://repo.spring.io/libs-release</url>
</pluginRepository>
</pluginRepositories>
</project>
应用程序工作正常,但在操作结束时抛出此异常。我试图找到任何相关的东西,但这些解决方案对我的情况没有帮助......
最佳答案
我的 Spring Boot 1.5.2 应用程序也遇到了同样的问题。将 logback-core 和 logback-classic 升级到至少版本 1.1.3 修复了它。
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.1.3</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.3</version>
</dependency>
关于java - Spring Boot 和 Logback : Exception thrown from ApplicationListener handling ContextClosedEvent,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40806208/
在运行我的单元测试时,有时,即使它们通过了,在所有测试运行结束时,我也会收到以下错误。 在运行 PhantomJS 的 Jenkins CI 构建中: .PhantomJS 2.1.1 (Linux
当我在我的 Angular 项目中运行 ng test 命令时出现错误,它给出了这样的错误 10% building modules 1/1 modules 0 active04 12 2018 11
当我进行 Angular 4 单元测试时,其中一个使用 google maps 和 agm 包的页面显示错误: An error was thrown in afterAll\n[object Err
我的“JavaClassLoader”库有问题。我想为应用程序编写一个启动器。最后应该可以关闭程序、更新并重新启动。现在,当我尝试使用参数调用方法时,我总是得到 NoSuchMethodEx。 我想要
我收到的异常是 Exception thrown at 0x70F8516F (vcruntime140d.dll) in Project.exe: 0xC0000005: Access violat
本周两次,我读到有人写过一个事件 (.net) 被“抛出”。我一直认为用于事件的动词是“fire”或“raise”。我认为“thrown”用于异常,而不是用于事件(“raise”可用于任何一个)。 有
我得到的完整错误是这个。 在“FooBlogBundle:Article:articles.html”中呈现模板期间抛出异常(“缺少一些强制性参数(“id”)以生成路由“FooBlogBund
我正在做一些调试,我真的想打开“抛出异常时中断”选项。我依赖的第三方程序集会定期抛出异常。其中一些,例如 SynchronizationLockException,我可以通过 Debug -> Exc
我的家庭作业有问题。我们的作业由在线网站评分,我不断收到有关下面显示的代码的以下错误。 错误: Exception conditions. Incorrect exception thrown for
我正在尝试通过 ./spark-submit 向 Spark 提交申请。 我用java构建了一个jar,代码如下: import org.apache.spark.SparkConf; import
我的应用程序(基于 vlcj 的音乐播放器)有一个非常奇怪的行为。我使用 ConcurrentHashMap 来缓存有关艺术家的信息。 如果我在 HashMap 上调用 get ,程序似乎会停止,但不
我的网页上有一个下拉列表,其中的选定项目必须传递给数据库中的存储过程查询。但是,我的绑定(bind)方法中的 adp.Fill(ds) 出现了一个奇怪的错误。 异常总是显示“关键字‘to’附近的语法不
创建 javaodc 时,您描述了您的方法可以抛出的异常,对吗? 看例子: public void createLogFile() { try { file.createNe
当我运行我的应用程序时,出现错误:抛出另一个异常:类型 'String' 不是 'index' 类型 'int' 的子类型 我的 android 屏幕立即因上述错误而变红,但只是片刻。之后恢复正常。我
这并不特别适用于任何语言,但如果重要的话,我在 Visual Studio 2008 中使用 VB.NET。 我似乎无法找到任何关于这个主题的真正有用的东西,但我想知道当抛出和捕获异常但由于它已被抛出
当我跑 nuget restore从命令行,我得到 Error parsing solution file at MyProject.sln: Exception has been thrown by
我是 flutter 的新手,每次运行应用程序时都会出错: ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═════════════════════════════
Edit: Visual Studio 2015's new exception window is so much faster than the old dialog that I no long
这是一个常见问题的奇怪变种。 我正在使用 headless Firefox 浏览器运行 Selenium 项目。 我得到了常见的NoSuchElementExceptions。这不是什么新鲜事。但是,
我有一个在 vs 2012 Ultimate 中开发的 ssis 项目。我使用项目部署模型,并将项目设置为在 32 位模式下运行。该包在我的开发环境中执行时没有错误,但是当我将其部署到 ssis 目录
我是一名优秀的程序员,十分优秀!