Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-21878

NullPointerException when logging is at WARN level

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • fuse-7.13-GA, fuse-7.12.1-GA
    • fuse-7.12-GA
    • Karaf
    • None

      From rhn-support-mrobson:

      As part of the Fuse 7.12 upgrade we made the following change:

      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      

      to

      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      

      When we set the logging level to WARN we begin seeing the following exception.

      'java.lang.NullPointerException|nn at org.ops4j.pax.logging.slf4j.Slf4jMDCAdapter.getCopyOfContextMap(Slf4jMDCAdapter.java:91)|nn at '
      

      We are beginning to setup to debug to see if the pax logging is introducing but wondering if anyone on RH side saw this. Logging level of DEBUG or INFO runs fine.

      Exception:{
          "component": "plansponsor-assembly-b",
          "timestamp": "2023-09-14T18:16:10.016Z",
          "thread": "features-3-thread-1 ",
          "level": "ERROR",
          "logger": "com.proxy.impl.MyServiceImpl",
          "appId": "",
          "message": "Failed to start the service 'com.services.v1~-profile.v6'.",
          "exception": "java.lang.NullPointerException
                          at org.ops4j.pax.logging.slf4j.Slf4jMDCAdapter.getCopyOfContextMap(Slf4jMDCAdapter.java:91)
                          at org.slf4j.MDC.getCopyOfContextMap(MDC.java:224)
                          at org.apache.camel.impl.DefaultCamelContext$MDCHelper.<init>(DefaultCamelContext.java:4774)
                          at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:3146)
                          at com.soap.scr.service.internal.AbstractCamelContextBuilder.setup(AbstractCamelContextBuilder.java:138)
                          at com..soap.scr.service.AbstractSoapServiceImpl.activate(AbstractSoapServiceImpl.java:182)
                          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                          at sun.reflect.NativeMethodAccessorImpl.in...
      

      The NullPointerException only happens when the log level is warn... INFO/DEBUG work fine...
      waiting on some data from them, but wonder if you had an idea - thanks!

              ggrzybek Grzegorz Grzybek
              ggrzybek Grzegorz Grzybek
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: