Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-3383

JMS Log deserialization is failing on jboss eap after upgrade to 2.17.1

    XMLWordPrintableJSON

Details

    • Question
    • Status: Closed
    • Critical
    • Resolution: Information Provided
    • 2.10.0, 2.17.1
    • None
    • Appenders
    • None
    • JBoss EAP 7.2.0 on linux and windows.

        Jboss is using JMS client lib:  artemis-jms-client-2.6.3.redhat-00014

    • Important

    Description

      We upgraded log4j2 from 2.9.0 to 2.17.1.  Using the JMS appender.   In our onMessage JMS handler, we have the following:

       

      ObjectMessage objMessage = (ObjectMessage) message;
      LogEvent ev = (LogEvent) objMessage.getObject();
       
      

       

      The cast to the LogEvent is now throwing this exception:

      javax.jms.JMSException: readObject requires a FilteredObjectInputStream or an ObjectInputStream that accepts an ObjectInputFilter

       

      Here is the lo4j2.xml config for the appender
       
                      <JMS name="AuditAppender"
                       destinationBindingName="jms/queue/AuditQueue"
                       factoryBindingName="jms/RemoteConnectionFactory"
                      providerURL="http-remoting://127.0.0.1:8080"
                                     username="xxxx"
                                     password="xxxx"
                   factoryName="org.wildfly.naming.client.WildFlyInitialContextFactory" >
                             <SerializedLayout />
                     </JMS>
      <Logger name="AuditLogger" level="OFF" additivity="false">
                  <AppenderRef ref="AuditAppender"/>
              </Logger>  

       

      None of the underlying code has changed other than the log4j2 upgrade.  Any suggestions?

      Thanks!

      Attachments

        Activity

          People

            Unassigned Unassigned
            leor.amikam@hsntech.com leor amikam
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: