Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-32519

Upgrade of grpc 1.63 breaks log4j2 Stream appender

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2023.13
    • Component/s: Streams
    • Sprint:
      nxplatform #112, nxplatform #113
    • Story Points:
      1

      Description

      The class io.grpc.Context moved from grpc-context.jar to grpc-api.jar and it's missing on start:

      024-05-06T12:47:30.517064977Z main ERROR An exception occurred processing Appender STREAM org.apache.logging.log4j.core.appender.AppenderLoggingException: java.lang.NoClassDefFoundError: io
      /grpc/Context
              at org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:164)
              at org.apache.logging.log4j.core.config.AppenderControl.callAppender0(AppenderControl.java:133)
              at org.apache.logging.log4j.core.config.AppenderControl.callAppenderPreventRecursion(AppenderControl.java:124)
              at org.apache.logging.log4j.core.config.AppenderControl.callAppender(AppenderControl.java:88)
      ...
      
              at org.apache.logging.log4j.spi.AbstractLogger.warn(AbstractLogger.java:3515)
              at org.nuxeo.ecm.platform.commandline.executor.service.CommandLineExecutorComponent.registerContribution(CommandLineExecutorComponent.java:147)
              at org.nuxeo.runtime.model.DefaultComponent.registerExtension(DefaultComponent.java:87)
      ...
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:568)
              at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:345)
              at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
      Caused by: java.lang.NoClassDefFoundError: io/grpc/Context
              at io.opencensus.trace.unsafe.ContextManagerImpl.currentContext(ContextManagerImpl.java:30)
              at io.opencensus.trace.unsafe.ContextHandleUtils.currentContext(ContextHandleUtils.java:56)
              at io.opencensus.trace.CurrentSpanUtils.getCurrentSpan(CurrentSpanUtils.java:37)
              at io.opencensus.trace.Tracer.getCurrentSpan(Tracer.java:98)
              at org.nuxeo.lib.stream.computation.Record.<init>(Record.java:96)
              at org.nuxeo.lib.stream.computation.Record.<init>(Record.java:81)
              at org.nuxeo.lib.stream.computation.Record.of(Record.java:108)
              at org.nuxeo.log4j.NuxeoStreamAppender.append(NuxeoStreamAppender.java:109)
              at org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:160)
              ... 74 more
      Caused by: java.lang.ClassNotFoundException: io.grpc.Context
              ... 83 more
      

      grpc-api jar must be in tomcat/lib (instead of grpc-context jar) to fix this.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: