activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Derek Mahar <derek.ma...@gmail.com>
Subject Why does EmbbedJMS server throw "IllegalArgumentException: AMQ119062: Acceptor with id 0 already registered"?
Date Thu, 14 Jan 2016 22:26:54 GMT
Any idea what might be the cause of the IllegalArgumentException that the
Tomcat log file sample below shows?  Here, an embedded ActiveMQ Artemis
server runs inside a Tomcat 8 Web application context and Spring
4.1.7.RELEASE creates an instance of EmbeddedJMS similar to what example
"embedded" does in
https://github.com/apache/activemq-artemis/blob/master/examples/features/standard/embedded/src/main/java/org/apache/activemq/artemis/jms/example/EmbeddedExample.java
:

@Configuration
public class MessagingServerConfiguration {
@Bean(initMethod = "start", destroyMethod = "stop")
public EmbeddedJMS jmsServer() {
// Most of the body of this method originates from ActiveMQ Artemis
embedded JMS server example "embedded"
// (see https://goo.gl/Em56Dt).

// Step 1. Create ActiveMQ Artemis core configuration, and set the
properties accordingly
final org.apache.activemq.artemis.core.config.Configuration configuration =
new ConfigurationImpl();
configuration.setPersistenceEnabled(false);
configuration.setJournalType(JournalType.NIO);
configuration.setJournalDirectory("target/data/journal");
configuration.setSecurityEnabled(false);
configuration.getAcceptorConfigurations().add(new
TransportConfiguration(InVMAcceptorFactory.class.getName()));

TransportConfiguration connectorConfig = new
TransportConfiguration(InVMConnectorFactory.class.getName());

configuration.getConnectorConfigurations().put("connector",
connectorConfig);

// Step 2. Create the JMS configuration
final JMSConfiguration jmsConfig = new JMSConfigurationImpl();

// Step 3. Configure the JMS ConnectionFactory
ArrayList<String> connectorNames = new ArrayList<>();
connectorNames.add("connector");
ConnectionFactoryConfiguration cfConfig = new
ConnectionFactoryConfigurationImpl().setName("cf").
setConnectorNames(connectorNames).setBindings("cf");
jmsConfig.getConnectionFactoryConfigurations().add(cfConfig);

// Step 5. Start the JMS Server using the ActiveMQ Artemis core server and
the JMS configuration
EmbeddedJMS jmsServer = new EmbeddedJMS();
jmsServer.setConfiguration(configuration);
jmsServer.setJmsConfiguration(jmsConfig);

return jmsServer;
}
}


2016-01-14 16:47:57.063 [DEBUG] [http-nio-8080-exec-23]
[org.hibernate.loader.entity.plan.EntityLoader:146] Static select for
entity com.opessoftware.fatca.web.beans.FileReceived
[OPTIMISTIC_FORCE_INCREMENT]: select filereceiv0_.id as id1_6_0_,
filereceiv0_.filename as filename2_6_0_, filereceiv0_.filepath as
filepath3_6_0_, filereceiv0_.fatca_type as fatca_ty4_6_0_,
filereceiv0_.file_type as file_typ5_6_0_, filereceiv0_.fi_owner as
fi_owner6_6_0_ from file_received filereceiv0_ where filereceiv0_.id=?
2016-01-14 16:47:57.064 [DEBUG] [http-nio-8080-exec-23]
[org.hibernate.loader.Loader:56] Static select for action ACTION_MERGE on
entity com.opessoftware.fatca.web.beans.FileReceived: select
filereceiv0_.id as id1_6_0_, filereceiv0_.filename as filename2_6_0_,
filereceiv0_.filepath as filepath3_6_0_, filereceiv0_.fatca_type as
fatca_ty4_6_0_, filereceiv0_.file_type as file_typ5_6_0_,
filereceiv0_.fi_owner as fi_owner6_6_0_ from file_received filereceiv0_
where filereceiv0_.id=?
2016-01-14 16:47:57.064 [DEBUG] [http-nio-8080-exec-23]
[org.hibernate.loader.Loader:56] Static select for action ACTION_REFRESH on
entity com.opessoftware.fatca.web.beans.FileReceived: select
filereceiv0_.id as id1_6_0_, filereceiv0_.filename as filename2_6_0_,
filereceiv0_.filepath as filepath3_6_0_, filereceiv0_.fatca_type as
fatca_ty4_6_0_, filereceiv0_.file_type as file_typ5_6_0_,
filereceiv0_.fi_owner as fi_owner6_6_0_ from file_received filereceiv0_
where filereceiv0_.id=?
2016-01-14 16:47:57.064 [DEBUG] [http-nio-8080-exec-23]
[org.hibernate.internal.SessionFactoryRegistry:89] Registering
SessionFactory: 234bd9a1-43c6-492e-ba77-5fe34344f26b (<unnamed>)
2016-01-14 16:47:57.064 [DEBUG] [http-nio-8080-exec-23]
[org.hibernate.internal.SessionFactoryRegistry:96] Not binding
SessionFactory to JNDI, no JNDI name configured
2016-01-14 16:47:57.064 [DEBUG] [http-nio-8080-exec-23]
[org.hibernate.internal.SessionFactoryImpl:505] Instantiated session factory
2016-01-14 16:47:57.065 [DEBUG] [http-nio-8080-exec-23]
[org.hibernate.internal.NamedQueryRepository:155] Checking 0 named HQL
queries
2016-01-14 16:47:57.065 [DEBUG] [http-nio-8080-exec-23]
[org.hibernate.internal.NamedQueryRepository:171] Checking 0 named SQL
queries
2016-01-14 16:47:57.065 [DEBUG] [http-nio-8080-exec-23]
[org.hibernate.stat.internal.StatisticsInitiator:110] Statistics
initialized [enabled=false]
2016-01-14 16:47:57.294 [DEBUG] [http-nio-8080-exec-23]
[org.apache.commons.beanutils.BeanUtils:808]
BeanUtils.populate(ServerLocatorImpl
[initialConnectors=[TransportConfiguration(name=null,
factory=org-apache-activemq-artemis-core-remoting-impl-invm-InVMConnectorFactory)
?serverId=0], discoveryGroupConfiguration=null], {})
2016-01-14 16:47:57.294 [DEBUG] [http-nio-8080-exec-23]
[org.apache.commons.beanutils.BeanUtils:808]
BeanUtils.populate(ActiveMQConnectionFactory
[serverLocator=ServerLocatorImpl
[initialConnectors=[TransportConfiguration(name=null,
factory=org-apache-activemq-artemis-core-remoting-impl-invm-InVMConnectorFactory)
?serverId=0], discoveryGroupConfiguration=null], clientID=null,
consumerWindowSize = 1048576, dupsOKBatchSize=1048576,
transactionBatchSize=1048576, readOnly=false], {})
2016-01-14 16:47:57.794 [INFO] [http-nio-8080-exec-23]
[org.apache.activemq.artemis.core.server:398] AMQ221000: live Message
Broker is starting with configuration Broker Configuration
(clustered=false,journalDirectory=target/data/journal,bindingsDirectory=data/bindings,largeMessagesDirectory=data/largemessages,pagingDirectory=data/paging)
2016-01-14 16:47:57.795 [INFO] [http-nio-8080-exec-23]
[org.apache.activemq.artemis.core.server:146] AMQ221043: Protocol module
found: [artemis-server]. Adding protocol support for: CORE
2016-01-14 16:47:57.860 [ERROR] [http-nio-8080-exec-23]
[org.apache.activemq.artemis.core.server:73] AMQ224000: Failure in
initialisation
java.lang.IllegalArgumentException: AMQ119062: Acceptor with id 0 already
registered
at
org.apache.activemq.artemis.core.remoting.impl.invm.InVMRegistry.registerAcceptor(InVMRegistry.java:32)
~[artemis-server-1.2.1-20160114.030215-15.jar:1.2.1-SNAPSHOT]
at
org.apache.activemq.artemis.core.remoting.impl.invm.InVMAcceptor.start(InVMAcceptor.java:124)
~[artemis-server-1.2.1-20160114.030215-15.jar:1.2.1-SNAPSHOT]
at
org.apache.activemq.artemis.core.remoting.server.impl.RemotingServiceImpl.startAcceptors(RemotingServiceImpl.java:287)
~[artemis-server-1.2.1-20160114.030215-15.jar:1.2.1-SNAPSHOT]
at
org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.completeActivation(ActiveMQServerImpl.java:1733)
~[artemis-server-1.2.1-20160114.030215-15.jar:1.2.1-SNAPSHOT]
at
org.apache.activemq.artemis.core.server.impl.LiveOnlyActivation.run(LiveOnlyActivation.java:63)
~[artemis-server-1.2.1-20160114.030215-15.jar:1.2.1-SNAPSHOT]
at
org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.start(ActiveMQServerImpl.java:404)
~[artemis-server-1.2.1-20160114.030215-15.jar:1.2.1-SNAPSHOT]
at
org.apache.activemq.artemis.jms.server.impl.JMSServerManagerImpl.start(JMSServerManagerImpl.java:384)
~[artemis-jms-server-1.2.1-SNAPSHOT.jar:1.2.1-SNAPSHOT]
at
org.apache.activemq.artemis.jms.server.embedded.EmbeddedJMS.start(EmbeddedJMS.java:118)
~[artemis-jms-server-1.2.1-SNAPSHOT.jar:1.2.1-SNAPSHOT]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[na:1.8.0_66-internal]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[na:1.8.0_66-internal]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[na:1.8.0_66-internal]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_66-internal]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1702)
[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1641)
[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1570)
[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)
[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
[spring-context-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
[spring-context-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at
org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:664)
[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:536)
[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:490)
[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136)
[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
[servlet-api.jar:3.1.FR]
at
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1231)
[catalina.jar:8.0.30]
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1034)
[catalina.jar:8.0.30]
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4997)
[catalina.jar:8.0.30]
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5289)
[catalina.jar:8.0.30]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
[catalina.jar:8.0.30]
at
org.apache.catalina.core.StandardContext.reload(StandardContext.java:3831)
[catalina.jar:8.0.30]
at
org.apache.catalina.manager.ManagerServlet.reload(ManagerServlet.java:1006)
[catalina.jar:8.0.30]
at
org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:354)
[catalina.jar:8.0.30]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
[servlet-api.jar:na]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
[servlet-api.jar:na]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
[catalina.jar:8.0.30]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
[catalina.jar:8.0.30]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
[tomcat-websocket.jar:8.0.30]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
[catalina.jar:8.0.30]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
[catalina.jar:8.0.30]
at
org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
[catalina.jar:8.0.30]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
[catalina.jar:8.0.30]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
[catalina.jar:8.0.30]
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
[catalina.jar:8.0.30]
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
[catalina.jar:8.0.30]
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
[catalina.jar:8.0.30]
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
[catalina.jar:8.0.30]
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
[catalina.jar:8.0.30]
at
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
[catalina.jar:8.0.30]
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
[catalina.jar:8.0.30]
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:521)
[catalina.jar:8.0.30]
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096)
[tomcat-coyote.jar:8.0.30]
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674)
[tomcat-coyote.jar:8.0.30]
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
[tomcat-coyote.jar:8.0.30]
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
[tomcat-coyote.jar:8.0.30]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[na:1.8.0_66-internal]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[na:1.8.0_66-internal]
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
[tomcat-util.jar:8.0.30]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_66-internal]
2016-01-14 16:47:57.864 [INFO] [http-nio-8080-exec-23]
[org.apache.activemq.artemis.core.server:420] AMQ221001: Apache ActiveMQ
Artemis Message Broker version 1.2.1-SNAPSHOT [localhost,
nodeID=798accd1-bb08-11e5-9bf9-080027f267a9]
2016-01-14 16:47:58.324 [DEBUG] [http-nio-8080-exec-23]
[org.hibernate.validator.internal.engine.resolver.DefaultTraversableResolver:103]
Found javax.persistence.Persistence on classpath containing
'getPersistenceUtil'. Assuming JPA 2 environment. Trying to instantiate JPA
aware TraversableResolver
2016-01-14 16:47:58.332 [DEBUG] [http-nio-8080-exec-23]
[org.hibernate.validator.internal.engine.resolver.DefaultTraversableResolver:114]
Instantiated JPA aware TraversableResolver of type
org.hibernate.validator.internal.engine.resolver.JPATraversableResolver.
2016-01-14 16:47:58.333 [DEBUG] [http-nio-8080-exec-23]
[org.hibernate.validator.internal.engine.ConfigurationImpl:145] Setting
custom MessageInterpolator of type
org.springframework.validation.beanvalidation.LocaleContextMessageInterpolator
2016-01-14 16:47:58.333 [DEBUG] [http-nio-8080-exec-23]
[org.hibernate.validator.internal.engine.ConfigurationImpl:167] Setting
custom ConstraintValidatorFactory of type
org.springframework.validation.beanvalidation.SpringConstraintValidatorFactory
2016-01-14 16:47:58.337 [DEBUG] [http-nio-8080-exec-23]
[org.hibernate.validator.internal.engine.ConfigurationImpl:181] Setting
custom ParameterNameProvider of type com.sun.proxy.$Proxy235
2016-01-14 16:47:58.338 [DEBUG] [http-nio-8080-exec-23]
[org.hibernate.validator.internal.xml.ValidationXmlParser:90] Trying to
load META-INF/validation.xml for XML based Validator configuration.
2016-01-14 16:47:58.338 [DEBUG] [http-nio-8080-exec-23]
[org.hibernate.validator.internal.xml.ResourceLoaderHelper:54] Trying to
load META-INF/validation.xml via TCCL
2016-01-14 16:47:58.338 [DEBUG] [http-nio-8080-exec-23]
[org.hibernate.validator.internal.xml.ResourceLoaderHelper:60] Trying to
load META-INF/validation.xml via Hibernate Validator's class loader
2016-01-14 16:47:58.362 [DEBUG] [http-nio-8080-exec-23]
[org.hibernate.validator.internal.xml.ValidationXmlParser:97] No
META-INF/validation.xml found. Using annotation based configuration only.
2016-01-14 16:47:58.590 [DEBUG] [http-nio-8080-exec-23]
[org.apache.activemq.artemis.core.client:779] Trying reconnection attempt
0/1
2016-01-14 16:47:58.590 [DEBUG] [http-nio-8080-exec-23]
[org.apache.activemq.artemis.core.client:1059] Trying to connect with
connector =
org.apache.activemq.artemis.core.remoting.impl.invm.InVMConnectorFactory@8d3cd4c,
parameters = {serverId=0} connector = null
2016-01-14 16:47:58.598 [DEBUG] [http-nio-8080-exec-23]
[org.apache.activemq.artemis.core.client:784] Reconnection successful
2016-01-14 16:47:58.624 [DEBUG] [http-nio-8080-exec-23]
[org.apache.activemq.artemis.core.client:277] ClientSessionFactoryImpl
received backup update for live/backup pair =
TransportConfiguration(name=null,
factory=org-apache-activemq-artemis-core-remoting-impl-invm-InVMConnectorFactory)
?serverId=0 / null but it didn't belong to
TransportConfiguration(name=null,
factory=org-apache-activemq-artemis-core-remoting-impl-invm-InVMConnectorFactory)
?serverId=0
14-Jan-2016 16:47:58.731 INFO [http-nio-8080-exec-23]
org.apache.catalina.core.StandardContext.reload Reloading Context with name
[/fatca-web] is completed

Thank you,

Derek

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message