Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-2488

Unable to access Serializable class when receiving ObjectMessage in OSGi environment

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.3.0
    • 5.7.0
    • Broker
    • None

    Description

      I have configured applications to use Log4J's JMSAppender in order to log messages on a queue as follows;

      log4j.appender.jms=org.apache.log4j.net.JMSAppender
      log4j.appender.jms.InitialContextFactoryName=org.apache.activemq.jndi.ActiveMQInitialContextFactory
      log4j.appender.jms.ProviderURL=tcp://localhost:61616
      log4j.appender.jms.TopicBindingName=logTopic
      log4j.appender.jms.TopicConnectionFactoryBindingName=ConnectionFactory
      

      Each application logging statement adds a new message to topic://logTopic on the broker. I have a bundle deployed that attempts to route the messages from this topic with camel;

      from("activemq:topic:logTopic")
        .convertBodyTo(String.class)
        .to("log:foo?level=DEBUG&showProperties=true&showHeaders=true");
      

      When using servicemix 4 (Fuse 4.1.0.4), a stack trace is seen with the following message (enhanced using felix.log.level=4);

      Caused by: java.lang.ClassNotFoundException: *** Class 'org.apache.log4j.spi.LoggingEvent' 
      was not found because bundle 56 does not import 'org.apache.log4j.spi' even though bundle 84 
      does export it. To resolve this issue, add an import for 'org.apache.log4j.spi' to bundle 56. ***
      

      Bundles as follows;

      smx@root:/> osgi/list|grep 56
      [  56] [Active     ] [       ] [   60] activemq-core (5.3.0.fuse)
      
      smx@root:/> osgi/list|grep 84
      [  84] [Active     ] [       ] [    8] OPS4J Pax Logging - API (1.3.0)
      

      Attachments

        1. amq-error.log
          15 kB
          Darren Davison
        2. amq-headers.log
          28 kB
          Darren Davison
        3. SMX4-424.diff
          2 kB
          Gert Vanthienen

        Activity

          People

            davsclaus Claus Ibsen
            darren.davison Darren Davison
            Votes:
            3 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: