-
Notifications
You must be signed in to change notification settings - Fork 626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Defer initialization of RabbitTemplate until the LogAdapter.Log4jLog is initialized #1148
Labels
Milestone
Comments
garyrussell
added a commit
to garyrussell/spring-amqp
that referenced
this issue
Jan 27, 2020
Resolves spring-projects/spring-amqp-samples#59 Defer creation of all Spring static loggers from appender until the appender is initialized. The first logger (e.g. Spring Boot) intializes the static `LoggerContext` field in `LogAdapter.Log4jLog`; this, in turn initializes the appender. However, the appender references Spring objects that have static loggers. This causes the `Log4jLog` CTOR to be called before the field is initialized, causing an NPE. Defer creation of all static loggers until the appender is fully initialized. Tested with the log4j2 sample app.
garyrussell
added a commit
to garyrussell/spring-amqp
that referenced
this issue
Jan 27, 2020
Resolves spring-projects/spring-amqp-samples#59 Defer creation of all Spring static loggers from appender until the appender is initialized. The first logger (e.g. Spring Boot) intializes the static `LoggerContext` field in `LogAdapter.Log4jLog`; this, in turn initializes the appender. However, the appender references Spring objects that have static loggers. This causes the `Log4jLog` CTOR to be called before the field is initialized, causing an NPE. Defer creation of all static loggers until the appender is fully initialized. Tested with the log4j2 sample app. **cherry-pick to 2.1.x**
garyrussell
added a commit
to garyrussell/spring-amqp
that referenced
this issue
Jan 27, 2020
Resolves spring-projects/spring-amqp-samples#59 Defer creation of all Spring static loggers from appender until the appender is initialized. The first logger (e.g. Spring Boot) initializes the static `LoggerContext` field in `LogAdapter.Log4jLog`; this, in turn initializes the appender. However, the appender references Spring objects that have static loggers. This causes the `Log4jLog` CTOR to be called before the field is initialized, causing an NPE. Defer creation of all static loggers until the appender is fully initialized. Tested with the log4j2 sample app. Also add a test for async sends. **cherry-pick to 2.1.x**
garyrussell
added a commit
to garyrussell/spring-amqp
that referenced
this issue
Jan 27, 2020
Resolves spring-projects#1148 Defer creation of all Spring static loggers from appender until the appender is initialized. The first logger (e.g. Spring Boot) initializes the static `LoggerContext` field in `LogAdapter.Log4jLog`; this, in turn initializes the appender. However, the appender references Spring objects that have static loggers. This causes the `Log4jLog` CTOR to be called before the field is initialized, causing an NPE. Defer creation of all static loggers until the appender is fully initialized. Tested with the log4j2 sample app. Also add a test for async sends. **cherry-pick to 2.1.x**
artembilan
pushed a commit
that referenced
this issue
Jan 27, 2020
Resolves #1148 Defer creation of all Spring static loggers from appender until the appender is initialized. The first logger (e.g. Spring Boot) initializes the static `LoggerContext` field in `LogAdapter.Log4jLog`; this, in turn initializes the appender. However, the appender references Spring objects that have static loggers. This causes the `Log4jLog` CTOR to be called before the field is initialized, causing an NPE. Defer creation of all static loggers until the appender is fully initialized. Tested with the log4j2 sample app. Also add a test for async sends. **cherry-pick to 2.1.x** * NOSONAR - inconsistent sync
garyrussell
added a commit
that referenced
this issue
Jan 27, 2020
Resolves #1148 Defer creation of all Spring static loggers from appender until the appender is initialized. The first logger (e.g. Spring Boot) initializes the static `LoggerContext` field in `LogAdapter.Log4jLog`; this, in turn initializes the appender. However, the appender references Spring objects that have static loggers. This causes the `Log4jLog` CTOR to be called before the field is initialized, causing an NPE. Defer creation of all static loggers until the appender is fully initialized. Tested with the log4j2 sample app. Also add a test for async sends. **cherry-pick to 2.1.x** * NOSONAR - inconsistent sync
We will be able to revert this change with a change to Spring Framework. See spring-projects/spring-framework#24440 |
garyrussell
added
the
status: on-hold-dependency
Waiting for a fix to a dependent project
label
Jan 28, 2020
garyrussell
added a commit
to garyrussell/spring-amqp
that referenced
this issue
Jan 31, 2020
Resolves spring-projects#1148 Fix is now in Spring Framework.
garyrussell
added a commit
to garyrussell/spring-amqp
that referenced
this issue
Jan 31, 2020
Resolves spring-projects#1148 Fix is now in Spring Framework.
This was referenced Jan 31, 2020
artembilan
pushed a commit
that referenced
this issue
Jan 31, 2020
Resolves #1148 Fix is now in Spring Framework.
artembilan
pushed a commit
that referenced
this issue
Jan 31, 2020
Resolves #1148 Fix is now in Spring Framework.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
See spring-projects/spring-amqp-samples#59
The text was updated successfully, but these errors were encountered: