5 Replies Latest reply on Jun 17, 2011 5:57 AM by dejanb_dejan

    5.5.0 issues

    topikpl

      Downloaded apache-activemq-5.5.0-fuse-00-27 and tried to start a connection to the broker, but failed with following error:

       

      java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder

           at org.slf4j.LoggerFactory.getSingleton(LoggerFactory.java:230)

           at org.slf4j.LoggerFactory.bind(LoggerFactory.java:121)

           at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:112)

           at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:275)

           at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:248)

           at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:261)

           at org.apache.activemq.ActiveMQPrefetchPolicy.(ActiveMQConnectionFactory.java:134)

       

      I assumed activemq-all-5.5.0-fuse-00-27.jar includes all required dependecies, is there something else to be added to the classpath?

       

      The other thing is the changelog which is somehow messed? Sections 5.5.0-fuse-00-27 and 5.4.2-fuse-02-00 are missing, and 5.4.2-fuse-01-00 is different than in previous release.

        • 1. Re: 5.5.0 issues
          davsclaus

          When you say "started a connection to the broker". Do you mean as a client to connect to a remote broker?

           

          The stacktrace indicate you need slf4j-api.jar on the client side. And possible also the slf4j-log4j12.jar if you want to use log4j as the target logger.

          • 2. Re: 5.5.0 issues
            topikpl

            I mean I've got a client application that has activemq-all-5.5.0-fuse-00-27.jar on classpath and (let's assume) does not depend on anything else, does not use logging etc. And when I call:

             

            new ActiveMQConnectionFactory(dest).createConnection()

             

            I get the error and stack trace. The broker is not even started, so the problem sits in activemq-all-5.5.0-fuse-00-27.jar - unless some other jar must be included, but it was not the case with previous ActiveMQ release, and I believe I haven't seen any additional requirements in the release note (although I might have missed something).

             

            I guess I'm not the only one with such problem: http://activemq.2283324.n4.nabble.com/Problem-with-SLF4J-td3531330.html. Unfortunatelly problem was not solved in the thread.

             

            Cheers

            • 3. Re: 5.5.0 issues
              dejanb_dejan

              Hi,

               

              the solution in that thread should work for you. The user resolved slf4j classpath issue and the rest of the thread was regarding other issue.

               

              So, in 5.5.0 we use slf4j for logging. We provide slf4j-api in activemq-all, but your application should include one of the binders (as explained at http://www.slf4j.org/codes.html#StaticLoggerBinder).

              • 4. Re: 5.5.0 issues
                topikpl

                I checked first and last post of the thread and infered the problem was not solved - my bad. Thanks for the hints. I guess with slf4j 1.6 where there will be a default binder there will be less confusion. Problem solved.

                • 5. Re: 5.5.0 issues
                  dejanb_dejan

                  I'm glad it helped!