Doubts the management of external libraries (activemq)

Hi, I’m trying to add a message broker (activemq) embedded, I followed these steps:

  1. In Studio add in properties -> Advanced: org.apache.activemq: activemq-spring: 5.14.0.
  2. I added a listener to start the application to load the broker:
    @Component (CargaInicial.NAME)
    public class implements CargaInicial AppContext.Listener {
    public static final String NAME = “connectoctopus_CargaInicial”;
    @Inject
    CargaBrokerMensajes cargaBrokerMensajes;
    public CargaInicial () {
    AppContext.addListener (this);
    }
    / **
    • Called by {@link appcontext} after successful application startup and initialization.
    • /
      @Override
      applicationStarted public void () {
      // Position the message broker
      cargaBrokerMensajes.inicio ();
      }
      / **
    • Called by {@link appcontext} before application shutdown.
    • /
      @Override
      applicationStopped public void () {
      }
      }

This has worked well for me except throwing me the error:
2016-08-29 17:01:36.172 ERROR [localhost-startStop-1] org.apache.activemq.broker.BrokerService - Cannot create SystemUsage
java.io.IOException: org.apache.activemq.store.kahadb.KahaDBPersistenceAdapter

  1. To solve the error I added another line in Studio -> Properties -> Advanced: org.apache.activemq-mq: activemq-all: 5.14.0.
  2. After this the application no longer start, displaying the error in catalina.out:

GRAVE: One or more listeners failed to start. Full details will be found in the Appropriate container log file
SLF4J: Class path SLF4J contains multiple bindings.
SLF4J: Found binding in [jar: file: /Users/Alberto/studio-projects/ConnectOctopus/build/tomcat/shared/lib/activemq-all-5.14.0.jar /org/slf4j/impl/StaticLoggerBinder.class!]
SLF4J: Found binding in [jar: file: /Users/Alberto/studio-projects/ConnectOctopus/build/tomcat/shared/lib/logback-classic-1.1.3.jar /org/slf4j/impl/StaticLoggerBinder.class!]
SLF4J: Found binding in [jar: file: /Users/Alberto/studio-projects/ConnectOctopus/build/tomcat/shared/lib/slf4j-log4j12-1.7.7.jar /org/slf4j/impl/StaticLoggerBinder.class!]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Current binding is of type [org.slf4j.impl.Log4jLoggerFactory]

  1. He returned to remove the last line introduced in advanced properties but the application still does not start
    Can there be a conflict of libraries ?, there a way to delete all the libraries downloaded the last time to leave the system clean as it was before loading?.
    I also review a log indicates:
    Full details will be found in the Appropriate container log file, but I find this log anywhere.
    Thanks and regards.

Hi, I found the log where the error is displayed, though still lost. I deleted the class that runs the AppContext.Listener but still gives the error:
30-Aug-2016 14: 30: 22,741 SEVERE [localhost-startstop-1] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class com.haulmont.cuba.core.sys .AppContextLoader
java.lang.RuntimeException: java.lang.NoSuchMethodError: org.springframework.util.ReflectionUtils.doWithLocalFields (Ljava / lang / Class; Lorg / Spring Framework / util / ReflectionUtils $ FieldCallback;) V

Thank you

Solved, he had a duplicate library.
Thanks.

I’m facing same issue, please guide me how to find which library conflicting. (Upgraded spring lib from 4.1.5 to Spring 4.3.7).
After updating library getting same error while initializing spring context.
java.lang.RuntimeException: java.lang.NoSuchMethodError: org.springframework.util.ReflectionUtils.doWithLocalFields (Ljava / lang / Class; Lorg / Spring Framework / util / ReflectionUtils $ FieldCallback;) V