Hi, I’m trying to add a message broker (activemq) embedded, I followed these steps:
- In Studio add in properties → Advanced: org.apache.activemq: activemq-spring: 5.14.0.
- 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
- To solve the error I added another line in Studio → Properties → Advanced: org.apache.activemq-mq: activemq-all: 5.14.0.
- 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 SLF4J Error Codes for an explanation.
SLF4J: Current binding is of type [org.slf4j.impl.Log4jLoggerFactory]
- 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.