Error statuslogger log4j2 could not find a logging implementation

JabRef 5.0.0-dev--2019-10-18----bc26c3ac5 Windows 7 6.1 amd64 Java 12.0.2 [+] I have tested the latest development version from http://builds.jabref.org/master/ and the problem persists Steps to re...

Comments

@bernhard-kleine

JabRef 5.0.0-dev—2019-10-18—-bc26c3ac5
Windows 7 6.1 amd64
Java 12.0.2

  • [+] I have tested the latest development version from http://builds.jabref.org/master/ and the problem persists

Steps to reproduce the behavior:

  1. When opening jabref a console starts with this error message
    ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console…
  2. Then Jabref opens still. I do not know what the effect of this error will be.

Log File

Paste an excerpt of your log file here

@AEgit

JabRef 5.0.0-dev—2019-10-18—-bc26c3ac5
Windows 10 10.0 amd64
Java 12.0.2

I can confirm this «issue». As mentioned by @bernhard-kleine I do not know, whether the error is an actual problem, since JabRef starts flawlessly.

As explained by @tobiasdiez the console starts due to a limitation of the software that is used to created the installer: #5468 (comment)
There is already a ticket open to remove the console window:
#5474

@Siedlerchr

We also have a ticket open at the log4j guys.
It should not be a problem for n the user as JabRef works with it.

@bernhard-kleine

the version from 2019-08-25 didnot show the console. What has changed inbetween?

@AEgit

@koppor

To make is explicit (especially for me): The issue with the console is described here #5474.

@bernhard-kleine

Yes

Am 2. Februar 2020 15:03:42 MEZ schrieb Oliver Kopp <notifications@github.com>:

The issue with the console is described here
#5474. (Right?)


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#5475 (comment)


Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.

@Siedlerchr

@digdig

the version from 2019-08-25 didnot show the console. What has changed inbetween?

neither does 2019-04-19 or 2010-09-16 has the black console problem

@AEgit

@digdig

@AEgit Does the explained reason say something about why previous versions are OK and no consoles?
If it has explained, why not roll back to the previous versions?

@Siedlerchr

We switched to a new installer, we now use the native Java packager to create custom versions for each OS. This enables us to directly build native packages/installer for each OS
And there is currently a bug in one of our external dependencies in combination with the new installation system.

Bugs
automation

moved this from Normal priority
to Closed

Feb 8, 2020

Bugs
automation

moved this from Closed
to Needs triage

Feb 8, 2020

@bernhard-kleine

Which version is supposed the new version, since the snapshot is still from 2020-06-02?

@AEgit

@bernhard-kleine Which new version are you talking about? Is this relevant to this issue?

@bernhard-kleine

I would like to know whether the snapshot from 2020-06-02 has already the new installer or not. Since the statusLogger error is the only thing which is not ok as far as I see, I donot want to download every new snapshot. Maybe you can understand.

@AEgit

You opened the issue yourself (#5475 (comment)) — the new installer has been part of the JabRef dev version since (at least) JabRef 5.0.0-dev—2019-10-18—-bc26c3ac5

There is no other current dev version out there, without this «new» installer (at least I am not aware of it).

Do I misunderstand you?

@bernhard-kleine

Then I have Christoph misinterpreted. I seemed to me that as of today there was a new installer. Sorry for the noise.

@tobiasdiez

The problem is that Log4j2 is simply not compatible with Java 9. I’ve created a very simple Java 9 application which shows this problem: https://github.com/tobiasdiez/javatestbed.
Currently, I’m in contact with the log4j devs to solve this problem. Luckily the consequences for JabRef are not that negative — the only functionality that does not work because of this issue is the «error console» and errors are only written to the command line.

@jorgman1

I do not habe the console log anymore in the latest version:

JabRef 5.0-beta.457—2020-02-22—d38f813
Windows 7 6.1 amd64
Java 13.0.2

@bernhard-kleine

JabRef 5.0-beta.458—2020-02-23—b2ab177
Windows 10 10.0 amd64
Java 13.0.2

I can confirm that there is any console any further. Thanks a lot. Could be closes! :D

Bugs
automation

moved this from Needs triage
to Closed

Feb 24, 2020

@tobiasdiez

Sadly, the bug is still there — it’s only not displayed anymore because the console window is hidden. For the same reason, the Error console is currently not working (nothing is shown there).

Bugs
automation

moved this from Closed
to Needs triage

Feb 26, 2020

@github-actions

This issue has been inactive for half a year. Since JabRef is constantly evolving this issue may not be relevant any longer and it will be closed in two weeks if no further activity occurs.

As part of an effort to ensure that the JabRef team is focusing on important and valid issues, we would like to ask if you could update the issue if it still persists. This could be in the following form:

  • If there has been a longer discussion, add a short summary of the most important points as a new comment (if not yet existing).
  • Provide further steps or information on how to reproduce this issue.
  • Upvote the initial post if you like to see it implemented soon. Votes are not the only metric that we use to determine the requests that are implemented, however, they do factor into our decision-making process.
  • If all information is provided and still up-to-date, then just add a short comment that the issue is still relevant.

Thank you for your contribution!

@bernhard-kleine

@tobiasdiez , @Siedlerchr Is this issue with the Log4j2 resolved, then this should be closed, otherwise it should remain open, even its last activity was 6 months ago.

@AEgit

I think the issue is still present in:

JabRef 5.2—2020-11-07—df80c13
Linux 5.4.0-53-generic amd64
Java 15.0.1

@Siedlerchr

Yep, issue is still here, apache log4j team did not fix it yet. Were thinking of switching to another log framework maybe.

@github-actions

This issue has been inactive for half a year. Since JabRef is constantly evolving this issue may not be relevant any longer and it will be closed in two weeks if no further activity occurs.

As part of an effort to ensure that the JabRef team is focusing on important and valid issues, we would like to ask if you could update the issue if it still persists. This could be in the following form:

  • If there has been a longer discussion, add a short summary of the most important points as a new comment (if not yet existing).
  • Provide further steps or information on how to reproduce this issue.
  • Upvote the initial post if you like to see it implemented soon. Votes are not the only metric that we use to determine the requests that are implemented, however, they do factor into our decision-making process.
  • If all information is provided and still up-to-date, then just add a short comment that the issue is still relevant.

Thank you for your contribution!

@AEgit

JabRef 5.3—2021-06-08—9d1c448
Windows 10 10.0 amd64
Java 16.0.1
JavaFX 16+8

I think the issue is still present in the current dev version.

@koppor

Yep, issue is still here, apache log4j team did not fix it yet. Were thinking of switching to another log framework maybe.

In 2021, I am fan of tinylog in contrast to 2017, where I tried to convince people to use jcabi: #3015

Bugs
automation

moved this from High priority
to Done

Dec 18, 2021

У меня похожая проблема — в эклипсе сперва создан — spring-boot-starter проэкт, с помошью сайта springinitzr.
Все фактически написано — только с логером проблемы.
Создал конфигурацию log4j2.properties, для конфсоли и файла — но работает лиш дефолтная опция в консоль.
Целый вечер все варианты использовал, в том числе из стартер-парент и стартер-веб выключил (<exclude>) зависимость стартер-логгинг-логбпек из pom.xml, что идет по дефолту в спринг-буте.
Но ситуация та же что в начале.
В том числе не применяются настройки для логирования в консоль, не создается файл,
но заметил что пустой файл из старым названием — создан пару часов тому в корне проэкта, а не в папке ресурсы,
где свойства log4j2?! И теперь снова пустой файл там создается из старім названием — то есть какое то кеширование протсходит чтоли?!
Но в файл не выводится та ифнормация, что на консоль — logger.info(«loffing info») — по стандарной дефолтной форме спринг бута.
Пару месяцев тому использовал log4j2.yaml, который работал. Теперь хотел применить его скоректированый вариант под этот проэкт — и в начале загрузки спринг бута выводится —
ERROR StatusLogger No Log4j 2 configuration file found. Using default configuration (logging only errors to the console), or user programmatically provided configurations. Set system property ‘log4j2.debug’ to show Log4j 2 internal initialization logging. See https://logging.apache.org/log… ation.html for instructions on how to configure Log4j 2
Но в предыдущем варианте — такого собщение нет — то есть выходит что log4j2.properties находится, но никак не применяется?!! Еще такой момент что в предыдущем работающим варианте версия log4j 2.9, теперь в .m2/repository еще 2.11 версия, которая появилася очевидно из спринг-бут-стартер зависимостями — может здесь какая то накладка идет?!
Или logback полностью не «отключен» от проэкта через мейвен.
Ну и mvn команда не работает, но может ли это быть причиной,
ибо после <exclude> spring-boot-starter-logging-logback ошибка о том что logback и log4j-slf4j исполбзуеют какой то общий статический биндинг устранилась.

Добавлено через 1 час 35 минут
Вот еще проверил — System.getProperty(«log4j.configuration») или System.getProperty(«log4j.configurationFile») <для log4j2>- возвращает в обоих случаях null.
Что можно сделать?

Вопрос:

Я получаю эту ошибку, пытаясь использовать log4j2 с весенней загрузкой.

ERROR StatusLogger Log4j2 could not find a logging implementation.
Please add log4j-core to the classpath. Using SimpleLogger to log to the console...

Я следую этому руководству: http://docs.spring.io/spring-boot/docs/current/reference/html/howto-logging.html#howto-configure-log4j-for-logging – а также добавил две log4j2-зависимости от https://logging.apache.org/log4j/2.x/maven-artifacts.html

Моя зависимость: дерево выглядит следующим образом:

[INFO] --- maven-dependency-plugin:2.10:tree (default-cli) @  musikkjulekalender ---
[INFO] no.saiboten:musikkjulekalender:war:1.0-SNAPSHOT
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:1.4.0.RELEASE:compile
[INFO] |  +- org.hibernate:hibernate-validator:jar:5.2.4.Final:compile
[INFO] |  |  +- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] |  |  +- org.jboss.logging:jboss-logging:jar:3.3.0.Final:compile
[INFO] |  |  - com.fasterxml:classmate:jar:1.3.1:compile
[INFO] |  +- org.springframework:spring-web:jar:4.3.2.RELEASE:compile
[INFO] |  - org.springframework:spring-webmvc:jar:4.3.2.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-jetty:jar:1.4.0.RELEASE:compile
[INFO] |  +- org.eclipse.jetty:jetty-servlets:jar:9.3.11.v20160721:compile
[INFO] |  |  +- org.eclipse.jetty:jetty-continuation:jar:9.3.11.v20160721:compile
[INFO] |  |  +- org.eclipse.jetty:jetty-http:jar:9.3.11.v20160721:compile
[INFO] |  |  - org.eclipse.jetty:jetty-io:jar:9.3.11.v20160721:compile
[INFO] |  +- org.eclipse.jetty:jetty-webapp:jar:9.3.11.v20160721:compile
[INFO] |  |  +- org.eclipse.jetty:jetty-xml:jar:9.3.11.v20160721:compile
[INFO] |  |  - org.eclipse.jetty:jetty-servlet:jar:9.3.11.v20160721:compile
[INFO] |  |     - org.eclipse.jetty:jetty-security:jar:9.3.11.v20160721:compile
[INFO] |  +- org.eclipse.jetty.websocket:websocket-server:jar:9.3.11.v20160721:compile
[INFO] |  |  +- org.eclipse.jetty.websocket:websocket-common:jar:9.3.11.v20160721:compile
[INFO] |  |  |  - org.eclipse.jetty.websocket:websocket-api:jar:9.3.11.v20160721:compile
[INFO] |  |  +- org.eclipse.jetty.websocket:websocket-client:jar:9.3.11.v20160721:compile
[INFO] |  |  - org.eclipse.jetty.websocket:websocket-servlet:jar:9.3.11.v20160721:compile
[INFO] |  - org.eclipse.jetty.websocket:javax-websocket-server-impl:jar:9.3.11.v20160721:compile
[INFO] |     +- org.eclipse.jetty:jetty-annotations:jar:9.3.11.v20160721:compile
[INFO] |     |  +- org.eclipse.jetty:jetty-plus:jar:9.3.11.v20160721:compile
[INFO] |     |  +- javax.annotation:javax.annotation-api:jar:1.2:compile
[INFO] |     |  +- org.ow2.asm:asm:jar:5.0.1:compile
[INFO] |     |  - org.ow2.asm:asm-commons:jar:5.0.1:compile
[INFO] |     |     - org.ow2.asm:asm-tree:jar:5.0.1:compile
[INFO] |     +- org.eclipse.jetty.websocket:javax-websocket-client-impl:jar:9.3.11.v20160721:compile
[INFO] |     - javax.websocket:javax.websocket-api:jar:1.0:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:1.4.0.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-aop:jar:1.4.0.RELEASE:compile
[INFO] |  |  - org.aspectj:aspectjweaver:jar:1.8.9:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-jdbc:jar:1.4.0.RELEASE:compile
[INFO] |  |  +- org.apache.tomcat:tomcat-jdbc:jar:8.5.4:compile
[INFO] |  |  |  - org.apache.tomcat:tomcat-juli:jar:8.5.4:compile
[INFO] |  |  - org.springframework:spring-jdbc:jar:4.3.2.RELEASE:compile
[INFO] |  +- org.hibernate:hibernate-core:jar:5.0.9.Final:compile
[INFO] |  |  +- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile
[INFO] |  |  +- org.javassist:javassist:jar:3.20.0-GA:compile
[INFO] |  |  +- antlr:antlr:jar:2.7.7:compile
[INFO] |  |  +- org.jboss:jandex:jar:2.0.0.Final:compile
[INFO] |  |  +- dom4j:dom4j:jar:1.6.1:compile
[INFO] |  |  |  - xml-apis:xml-apis:jar:1.4.01:compile
[INFO] |  |  - org.hibernate.common:hibernate-commons-annotations:jar:5.0.1.Final:compile
[INFO] |  +- org.hibernate:hibernate-entitymanager:jar:5.0.9.Final:compile
[INFO] |  +- javax.transaction:javax.transaction-api:jar:1.2:compile
[INFO] |  - org.springframework:spring-aspects:jar:4.3.2.RELEASE:compile
[INFO] +- com.h2database:h2:jar:1.4.192:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:1.4.0.RELEASE:test
[INFO] |  +- org.springframework.boot:spring-boot-test:jar:1.4.0.RELEASE:test
[INFO] |  +- org.springframework.boot:spring-boot-test-autoconfigure:jar:1.4.0.RELEASE:test
[INFO] |  +- com.jayway.jsonpath:json-path:jar:2.2.0:test
[INFO] |  |  - net.minidev:json-smart:jar:2.2.1:test
[INFO] |  |     - net.minidev:accessors-smart:jar:1.1:test
[INFO] |  +- org.assertj:assertj-core:jar:2.5.0:test
[INFO] |  +- org.mockito:mockito-core:jar:1.10.19:test
[INFO] |  |  - org.objenesis:objenesis:jar:2.1:test
[INFO] |  +- org.hamcrest:hamcrest-core:jar:1.3:compile
[INFO] |  +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] |  +- org.skyscreamer:jsonassert:jar:1.3.0:test
[INFO] |  |  - org.json:json:jar:20140107:test
[INFO] |  +- org.springframework:spring-core:jar:4.3.2.RELEASE:compile
[INFO] |  - org.springframework:spring-test:jar:4.3.2.RELEASE:test
[INFO] +- org.springframework.boot:spring-boot-starter:jar:1.4.0.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot:jar:1.4.0.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-autoconfigure:jar:1.4.0.RELEASE:compile
[INFO] |  - org.yaml:snakeyaml:jar:1.17:runtime
[INFO] +- org.springframework.boot:spring-boot-starter-log4j2:jar:1.4.0.RELEASE:compile
[INFO] |  +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.6.2:compile
[INFO] |  +- org.slf4j:jcl-over-slf4j:jar:1.7.21:compile
[INFO] |  - org.slf4j:jul-to-slf4j:jar:1.7.21:compile
[INFO] +- org.apache.logging.log4j:log4j-api:jar:2.6.2:compile
[INFO] +- org.apache.logging.log4j:log4j-core:jar:2.6.2:compile
[INFO] +- org.apache.commons:commons-lang3:jar:3.3.2:compile
[INFO] +- org.mongodb:mongo-java-driver:jar:2.12.4:compile
[INFO] +- org.springframework.data:spring-data-mongodb:jar:1.9.2.RELEASE:compile
[INFO] |  +- org.springframework:spring-tx:jar:4.3.2.RELEASE:compile
[INFO] |  +- org.springframework:spring-context:jar:4.3.2.RELEASE:compile
[INFO] |  +- org.springframework:spring-beans:jar:4.3.2.RELEASE:compile
[INFO] |  +- org.springframework:spring-expression:jar:4.3.2.RELEASE:compile
[INFO] |  +- org.springframework.data:spring-data-commons:jar:1.12.2.RELEASE:compile
[INFO] |  - org.slf4j:slf4j-api:jar:1.7.21:compile
[INFO] +- com.google.api-client:google-api-client:jar:1.18.0-rc:compile
[INFO] +- com.google.http-client:google-http-client-jackson2:jar:1.18.0-rc:compile
[INFO] |  - com.google.http-client:google-http-client:jar:1.18.0-rc:compile
[INFO] +- com.google.oauth-client:google-oauth-client:jar:1.18.0-rc:compile
[INFO] |  - com.google.code.findbugs:jsr305:jar:1.3.9:compile
[INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.2:compile
[INFO] |  - com.fasterxml.jackson.core:jackson-annotations:jar:2.8.1:compile
[INFO] +- com.google.apis:google-api-services-oauth2:jar:v2-rev81-1.19.0:compile
[INFO] +- com.fasterxml.jackson.core:jackson-core:jar:2.8.2:compile
[INFO] +- org.mongodb.morphia:morphia:jar:0.107:compile
[INFO] +- org.springframework.security:spring-security-web:jar:4.1.1.RELEASE:compile
[INFO] |  +- aopalliance:aopalliance:jar:1.0:compile
[INFO] |  - org.springframework.security:spring-security-core:jar:4.1.1.RELEASE:compile
[INFO] +- org.springframework.security:spring-security-config:jar:4.1.1.RELEASE:compile
[INFO] |  - org.springframework:spring-aop:jar:4.3.2.RELEASE:compile
[INFO] +- org.springframework.social:spring-social-config:jar:1.1.4.RELEASE:compile
[INFO] |  - org.springframework.social:spring-social-web:jar:1.1.4.RELEASE:compile
[INFO] |     - javax.inject:javax.inject:jar:1:compile
[INFO] +- org.springframework.social:spring-social-core:jar:1.1.4.RELEASE:compile
[INFO] +- org.springframework.social:spring-social-facebook:jar:2.0.3.RELEASE:compile
[INFO] +- org.apache.httpcomponents:httpclient:jar:4.3.6:compile
[INFO] |  +- org.apache.httpcomponents:httpcore:jar:4.4.5:compile
[INFO] |  - commons-codec:commons-codec:jar:1.10:compile
[INFO] +- org.mockito:mockito-all:jar:1.10.8:compile
[INFO] +- junit:junit:jar:4.11:compile
[INFO] +- org.eclipse.jetty:apache-jsp:jar:9.3.11.v20160721:provided
[INFO] |  +- org.eclipse.jetty:jetty-util:jar:9.3.11.v20160721:compile
[INFO] |  +- org.eclipse.jetty:jetty-server:jar:9.3.11.v20160721:compile
[INFO] |  +- org.eclipse.jetty.toolchain:jetty-schemas:jar:3.1:provided
[INFO] |  +- javax.servlet:javax.servlet-api:jar:3.1.0:compile
[INFO] |  +- org.mortbay.jasper:apache-jsp:jar:8.0.33:provided
[INFO] |  |  - org.mortbay.jasper:apache-el:jar:8.0.33:provided
[INFO] |  - org.eclipse.jdt.core.compiler:ecj:jar:4.4.2:provided
[INFO] +- javax.servlet:jstl:jar:1.2:compile
[INFO] +- org.springframework.data:spring-data-jpa:jar:1.10.2.RELEASE:compile
[INFO] |  +- org.springframework:spring-orm:jar:4.3.2.RELEASE:compile
[INFO] |  - org.aspectj:aspectjrt:jar:1.8.9:compile
[INFO] +- postgresql:postgresql:jar:9.1-901-1.jdbc4:compile
[INFO] - joda-time:joda-time:jar:2.9.4:compile

Я добавил стандартный log4j2.xml файл в src/main/resources/config с конфигурацией по умолчанию:

<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
<Appenders>
<Console name="STDOUT" target="SYSTEM_OUT">
<PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/>
</Console>
</Appenders>
<Loggers>
<Logger name="org.apache.log4j.xml" level="info"/>
<Root level="debug">
<AppenderRef ref="STDOUT"/>
</Root>
</Loggers>
</Configuration>

Какие-нибудь догадки? Я пробовал работать из Spring Tool Suite и с плагином для загрузки maven.

По популярному запросу, вот полный pom.xml:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.0.RELEASE</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<groupId>no.saiboten</groupId>
<artifactId>musikkjulekalender</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>Musikkjulekalender</name>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.6.2</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.6.2</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.3.2</version>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
<version>2.12.4</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>com.google.api-client</groupId>
<artifactId>google-api-client</artifactId>
<version>1.18.0-rc</version>
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-jackson2</artifactId>
<version>1.18.0-rc</version>
</dependency>
<dependency>
<groupId>com.google.oauth-client</groupId>
<artifactId>google-oauth-client</artifactId>
<version>1.18.0-rc</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.8.2</version>
</dependency>
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-oauth2</artifactId>
<version>v2-rev81-1.19.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.8.2</version>
</dependency>
<dependency>
<groupId>org.mongodb.morphia</groupId>
<artifactId>morphia</artifactId>
<version>0.107</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.social</groupId>
<artifactId>spring-social-facebook</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.3.6</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.10.8</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>apache-jsp</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.1-901-1.jdbc4</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.9.4</version>
</dependency>
</dependencies>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<useSystemClassLoader>false</useSystemClassLoader>
</configuration>
</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>

Ответ №1

Я посмотрел исходный код LogManager.class и обнаружил, что причина в том, что LoggerContextFactory не найден в log4j-provider.properties, который должен быть найден в log4j-core.jar/META-INF.
Поэтому проверьте ваш файл log4j-core.jar/META-INF/log4j-provider.properties, или вы можете удалить свой файл log4j-core.jar в своем локальном репозитории.

Ответ №2

Это сообщение об ошибке генерируется модулем log4j-api, когда он не может найти или загрузить реализацию своих интерфейсов. Обычно это означает, что модуль log4j-core отсутствует в пути к классам, но просматривает график зависимости, который, похоже, не так.

Существуют некоторые транзитивные зависимости от модулей log4j-slf4j-impl и log4j-jul, но я не думаю, что это могло вызвать сообщение об ошибке.

Один из способов дальнейшего изучения – снова попробовать снова запустить приложение с этим набором системных свойств: -Dorg.apache.logging.log4j.simplelog.StatusLogger.level=TRACE. Это будет печатать log4j внутреннее ведение журнала отладки на консоли.

(Как только ваш файл конфигурации загружен, уровень выходного уровня StatusLogger можно контролировать, установив <Configuration status="trace"> в начале файла конфигурации log4j2.xml. Однако файл конфигурации загружается модулем log4j-core и мы еще не там…)

Ответ №3

Ответ №4

Он выглядит правильно. Это pom рабочего приложения с пружинным загрузочным механизмом с log4j2 в качестве рамки ведения журнала:

    <!-- Spring logging -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>

Поместите свой log4j2.xml в папку ресурсов для запуска из eclipse; если вы предпочитаете использовать другой каталог – resource/conf – укажите путь к конфигурации log4j2 с аргументом JVM следующим образом:

-Dlog4j.configurationFile = “CONF/log4j2.xml”

Не сдавайтесь и не возвращайтесь с logback на log4j2…

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Error starting workbench administrator
  • Error starting userland proxy
  • Error starting tomcat context exception org springframework beans factory beancreationexception
  • Error 7 ntc2 opened tefal grill
  • Error 6p2 ariston

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии