[logback-dev] [JIRA] Updates for LOGBACK-1549: NPE since classic doesn't open package ".model.processor" for core

QOS.CH (JIRA) noreply-jira at qos.ch
Tue Jan 19 11:58:00 CET 2021


logback / LOGBACK-1549 [Open]
NPE since classic doesn't open package ".model.processor" for core

==============================

Here's what changed in this issue in the last few minutes.
This issue has been created
This issue is now assigned to you.

View or comment on issue using this link
https://jira.qos.ch/browse/LOGBACK-1549

==============================
 Issue created
------------------------------

Vladislav Fuks created this issue on 19/Jan/21 11:42 AM
Summary:              NPE since classic doesn't open package ".model.processor" for core
Issue Type:           Bug
Affects Versions:     1.3.0-alpha5
Assignee:             Logback dev list
Components:           logback-classic
Created:              19/Jan/21 11:42 AM
Environment:
  jdk: 14
  
  slf4j: 2.0.0-alpha1
  
  logback: 1.3.0-alpha5
  
  modularized application
Priority:             Major
Reporter:             Vladislav Fuks
Description:
  There is NPE by initializing of Logger:
  
   
  {code:java}
  org.slf4j.LoggerFactory.getLogger(getClass()){code}
   
  
   
  {code:java}
  java.lang.NullPointerException: Cannot invoke "ch.qos.logback.core.model.processor.ModelHandlerBase.isSupportedModelType(ch.qos.logback.core.model.Model)" because "handler" is nulljava.lang.NullPointerException: Cannot invoke "ch.qos.logback.core.model.processor.ModelHandlerBase.isSupportedModelType(ch.qos.logback.core.model.Model)" because "handler" is null at ch.qos.logback.core/ch.qos.logback.core.model.processor.DefaultProcessor.traverse(DefaultProcessor.java:114) at ch.qos.logback.core/ch.qos.logback.core.model.processor.DefaultProcessor.traversalLoop(DefaultProcessor.java:39) at ch.qos.logback.core/ch.qos.logback.core.model.processor.DefaultProcessor.process(DefaultProcessor.java:54) at ch.qos.logback.core/ch.qos.logback.core.joran.GenericConfigurator.processModel(GenericConfigurator.java:178) at ch.qos.logback.core/ch.qos.logback.core.joran.GenericConfigurator.playEventsAndProcessModel(GenericConfigurator.java:165) at ch.qos.logback.core/ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:151) at ch.qos.logback.core/ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:115) at ch.qos.logback.core/ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:58) at ch.qos.logback.classic/ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:82) at ch.qos.logback.classic/ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:157) at ch.qos.logback.classic/ch.qos.logback.classic.spi.LogbackServiceProvider.initializeLoggerContext(LogbackServiceProvider.java:49) at ch.qos.logback.classic/ch.qos.logback.classic.spi.LogbackServiceProvider.initialize(LogbackServiceProvider.java:40) at org.slf4j/org.slf4j.LoggerFactory.bind(LoggerFactory.java:152) at org.slf4j/org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:139) at org.slf4j/org.slf4j.LoggerFactory.getProvider(LoggerFactory.java:418) at org.slf4j/org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:404) at org.slf4j/org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:353) at org.slf4j/org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:379)
  {code}
  It can be fixed with adding to the run configuration:
  
   
  
   
  {code:java}
  --add-opens ch.qos.logback.classic/ch.qos.logback.classic.model.processor=ch.qos.logback.core
  {code}
  Should this be defined in the {{module-info}} of the {{ch.qos.logback.classic}}?
  
   


==============================
 This message was sent by Atlassian Jira (v8.8.0#808000-sha1:e2c7e59)



More information about the logback-dev mailing list