title: JMS + Wildfly 8.2.0 Final: The following keys are invalid for configuring a connector: http-upgrade-endpoint
body: <p>I'm trying to use JMS on Wildfly 8.2.0.
  I created one queue called GrinderRemoteQueue with jndi name java:jboss/exported/jms/queue/grinderRemote, using the default Remote Connection Factory. Below there is the section of standalone-full.xml config file for jms configuration.</p>
  
  <pre><code>&lt;subsystem xmlns="urn:jboss:domain:messaging:2.0"&gt;
          &lt;hornetq-server&gt;
              &lt;journal-file-size&gt;102400&lt;/journal-file-size&gt;
  
              &lt;connectors&gt;
                  &lt;http-connector name="http-connector" socket-binding="http"&gt;
                      &lt;param key="http-upgrade-endpoint" value="http-acceptor"/&gt;
                  &lt;/http-connector&gt;
                  &lt;http-connector name="http-connector-throughput" socket-binding="http"&gt;
                      &lt;param key="http-upgrade-endpoint" value="http-acceptor-throughput"/&gt;
                      &lt;param key="batch-delay" value="50"/&gt;
                      &lt;param key="host" value="127.0.0.1"/&gt;
                      &lt;param key="port" value="5445"/&gt;
                  &lt;/http-connector&gt;
                  &lt;in-vm-connector name="in-vm" server-id="0"/&gt;
              &lt;/connectors&gt;
  
              &lt;acceptors&gt;
                  &lt;http-acceptor http-listener="default" name="http-acceptor"/&gt;
                  &lt;http-acceptor http-listener="default" name="http-acceptor-throughput"&gt;
                      &lt;param key="batch-delay" value="50"/&gt;
                      &lt;param key="direct-deliver" value="false"/&gt;
                      &lt;param key="host" value="127.0.0.1"/&gt;
                      &lt;param key="port" value="5445"/&gt;
                  &lt;/http-acceptor&gt;
                  &lt;in-vm-acceptor name="in-vm" server-id="0"/&gt;
              &lt;/acceptors&gt;
  
              &lt;security-settings&gt;
                  &lt;security-setting match="#"&gt;
                      &lt;permission type="send" roles="guest"/&gt;
                      &lt;permission type="consume" roles="guest"/&gt;
                      &lt;permission type="createNonDurableQueue" roles="guest"/&gt;
                      &lt;permission type="deleteNonDurableQueue" roles="guest"/&gt;
                  &lt;/security-setting&gt;
              &lt;/security-settings&gt;
  
              &lt;address-settings&gt;
                  &lt;address-setting match="#"&gt;
                      &lt;dead-letter-address&gt;jms.queue.DLQ&lt;/dead-letter-address&gt;
                      &lt;expiry-address&gt;jms.queue.ExpiryQueue&lt;/expiry-address&gt;
                      &lt;max-size-bytes&gt;10485760&lt;/max-size-bytes&gt;
                      &lt;page-size-bytes&gt;2097152&lt;/page-size-bytes&gt;
                      &lt;message-counter-history-day-limit&gt;10&lt;/message-counter-history-day-limit&gt;
                  &lt;/address-setting&gt;
              &lt;/address-settings&gt;
  
              &lt;jms-connection-factories&gt;
                  &lt;connection-factory name="InVmConnectionFactory"&gt;
                      &lt;connectors&gt;
                          &lt;connector-ref connector-name="in-vm"/&gt;
                      &lt;/connectors&gt;
                      &lt;entries&gt;
                          &lt;entry name="java:/ConnectionFactory"/&gt;
                      &lt;/entries&gt;
                  &lt;/connection-factory&gt;
                  &lt;connection-factory name="RemoteConnectionFactory"&gt;
                      &lt;connectors&gt;
                          &lt;connector-ref connector-name="http-connector"/&gt;
                      &lt;/connectors&gt;
                      &lt;entries&gt;
                          &lt;entry name="java:jboss/exported/jms/RemoteConnectionFactory"/&gt;
                      &lt;/entries&gt;
                  &lt;/connection-factory&gt;
                  &lt;pooled-connection-factory name="hornetq-ra"&gt;
                      &lt;transaction mode="xa"/&gt;
                      &lt;connectors&gt;
                          &lt;connector-ref connector-name="in-vm"/&gt;
                      &lt;/connectors&gt;
                      &lt;entries&gt;
                          &lt;entry name="java:/JmsXA"/&gt;
                          &lt;entry name="java:jboss/DefaultJMSConnectionFactory"/&gt;
                      &lt;/entries&gt;
                  &lt;/pooled-connection-factory&gt;
              &lt;/jms-connection-factories&gt;
  
              &lt;jms-destinations&gt;
                  &lt;jms-queue name="ExpiryQueue"&gt;
                      &lt;entry name="java:/jms/queue/ExpiryQueue"/&gt;
                  &lt;/jms-queue&gt;
                  &lt;jms-queue name="DLQ"&gt;
                      &lt;entry name="java:/jms/queue/DLQ"/&gt;
                  &lt;/jms-queue&gt;
                  &lt;jms-queue name="GrinderRemoteQueue"&gt;
                      &lt;entry name="java:jboss/exported/jms/queue/grinderRemote"/&gt;
                      &lt;durable&gt;true&lt;/durable&gt;
                  &lt;/jms-queue&gt;
              &lt;/jms-destinations&gt;
          &lt;/hornetq-server&gt;
      &lt;/subsystem&gt;
  </code></pre>
  
  <p>For test this configuration I created a new Dynamic Web Project in Eclipse Luna, using the following class:</p>
  
  <pre><code>import java.util.Properties;
  import javax.jms.Connection;
  import javax.jms.Destination;
  import javax.jms.JMSContext;
  import javax.jms.JMSException;
  import javax.jms.MessageConsumer;
  import javax.jms.MessageProducer;
  import javax.jms.Session;
  import javax.jms.TextMessage;
  import javax.naming.Context;
  import javax.naming.InitialContext;
  import javax.naming.NamingException;
  
  
  import org.hornetq.jms.client.HornetQConnectionFactory;
  
  
  public class TestJMS {
  
  
  
  
    public void Test() throws NamingException, JMSException {
  
  
        HornetQConnectionFactory connectionFactory = null;
        Connection connection = null;
        Session session = null;
        MessageProducer producer = null;
        MessageConsumer consumer = null;
        Destination destination = null;
        TextMessage message = null;
        Context context = null;
  
  
        try {
            final Properties env = new Properties();
            env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
            env.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
            env.put(Context.PROVIDER_URL, "http-remoting://localhost:8080");
            env.put(Context.SECURITY_PRINCIPAL, "jmsuser");
            env.put(Context.SECURITY_CREDENTIALS, "*********");
            context = new InitialContext(env);
  
  
            connectionFactory = (HornetQConnectionFactory) context.lookup("jms/RemoteConnectionFactory");
  
  
            System.out.println("lookup: jms/GrinderRemoteConnectionFactory success!");
  
  
            destination = (Destination) context.lookup("jms/queue/grinderRemote");
  
  
            System.out.println("lookup: java:/jms/queue/grinderRemote success!");
  
  
            JMSContext createContext = connectionFactory.createContext("jmsuser", "Logitech550!", JMSContext.AUTO_ACKNOWLEDGE);
  
  
            System.out.println("connectionFactory.createContext success!");
  
  
            createContext.createConsumer(destination);
  
  
            System.out.println("createContext.createConsumer success!");
  
  
            connection = connectionFactory.createConnection("jmsuser", "your password");
  
  
            System.out.println("connectionFactory.createConnection success!");
  
  
            session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
            producer = session.createProducer(destination);
  
  
            System.out.println("session.createProducer success!");
  
  
            connection.start();
  
  
            int count = Integer.parseInt("1");
            String content = "Hello, World!";
  
  
            // Send the specified number of messages
            for (int i = 0; i &lt; count; i++) {
                message = session.createTextMessage(content);
                producer.send(message);
  
  
                System.out.println("Message sent successfully: " + message);
            }
  
  
        } catch (Exception e) {
  
  
            e.printStackTrace();
  
  
        } finally {
            if (context != null) {
                context.close();
            }
  
  
            // closing the connection takes care of the session, producer, and consumer
            if (connection != null) {
                connection.close();
            }
        }
  
    }
  
  
  }
  </code></pre>
  
  <p>Running this class I got this output:</p>
  
  <pre><code>18:23:50,323 INFO  [stdout] (default task-2) lookup: jms/GrinderRemoteConnectionFactory success!
  18:23:50,341 INFO  [stdout] (default task-2) lookup: java:/jms/queue/grinderRemote success!
  18:23:50,374 ERROR [stderr] (default task-2) javax.jms.JMSRuntimeException: Failed to create session factory
  18:23:50,374 ERROR [stderr] (default task-2)    at org.hornetq.jms.client.JmsExceptionUtils.convertToRuntimeException(JmsExceptionUtils.java:86)
  18:23:50,375 ERROR [stderr] (default task-2)    at org.hornetq.jms.client.HornetQConnectionFactory.createContext(HornetQConnectionFactory.java:152)
  18:23:50,375 ERROR [stderr] (default task-2)    at it.vr.pms.TestJMS.Test(TestJMS.java:62)
  18:23:50,375 ERROR [stderr] (default task-2)    at it.vr.pms.Base.doGet(Base.java:81)
  18:23:50,375 ERROR [stderr] (default task-2)    at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
  18:23:50,376 ERROR [stderr] (default task-2)    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
  18:23:50,376 ERROR [stderr] (default task-2)    at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
  18:23:50,376 ERROR [stderr] (default task-2)    at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61)
  18:23:50,376 ERROR [stderr] (default task-2)    at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
  18:23:50,377 ERROR [stderr] (default task-2)    at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
  18:23:50,377 ERROR [stderr] (default task-2)    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
  18:23:50,377 ERROR [stderr] (default task-2)    at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
  18:23:50,378 ERROR [stderr] (default task-2)    at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56)
  18:23:50,378 ERROR [stderr] (default task-2)    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
  18:23:50,378 ERROR [stderr] (default task-2)    at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45)
  18:23:50,379 ERROR [stderr] (default task-2)    at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63)
  18:23:50,379 ERROR [stderr] (default task-2)    at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58)
  18:23:50,379 ERROR [stderr] (default task-2)    at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70)
  18:23:50,379 ERROR [stderr] (default task-2)    at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76)
  18:23:50,380 ERROR [stderr] (default task-2)    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
  18:23:50,380 ERROR [stderr] (default task-2)    at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
  18:23:50,380 ERROR [stderr] (default task-2)    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
  18:23:50,381 ERROR [stderr] (default task-2)    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
  18:23:50,381 ERROR [stderr] (default task-2)    at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261)
  18:23:50,381 ERROR [stderr] (default task-2)    at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247)
  18:23:50,381 ERROR [stderr] (default task-2)    at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76)
  18:23:50,382 ERROR [stderr] (default task-2)    at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166)
  18:23:50,382 ERROR [stderr] (default task-2)    at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197)
  18:23:50,382 ERROR [stderr] (default task-2)    at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759)
  18:23:50,382 ERROR [stderr] (default task-2)    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
  18:23:50,383 ERROR [stderr] (default task-2)    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  18:23:50,383 ERROR [stderr] (default task-2)    at java.lang.Thread.run(Unknown Source)
  18:23:50,383 ERROR [stderr] (default task-2) Caused by: javax.jms.JMSException: Failed to create session factory
  18:23:50,384 ERROR [stderr] (default task-2)    at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:676)
  18:23:50,384 ERROR [stderr] (default task-2)    at org.hornetq.jms.client.HornetQConnectionFactory.createContext(HornetQConnectionFactory.java:142)
  18:23:50,384 ERROR [stderr] (default task-2)    ... 30 more
  18:23:50,385 ERROR [stderr] (default task-2) Caused by: java.lang.IllegalStateException: The following keys are invalid for configuring a connector: http-upgrade-endpoint
  18:23:50,385 ERROR [stderr] (default task-2)    at org.hornetq.core.client.impl.ClientSessionFactoryImpl.checkTransportKeys(ClientSessionFactoryImpl.java:1507)
  18:23:50,385 ERROR [stderr] (default task-2)    at org.hornetq.core.client.impl.ClientSessionFactoryImpl.&lt;init&gt;(ClientSessionFactoryImpl.java:207)
  18:23:50,385 ERROR [stderr] (default task-2)    at org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:867)
  18:23:50,386 ERROR [stderr] (default task-2)    at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:672)
  </code></pre>
  
  <p>I think that the main problem is <code>java.lang.IllegalStateException: The following keys are invalid for configuring a connector: http-upgrade-endpoint</code>, but I can't understand where I'm wrong.</p>
  
  <p>Thanks in advance for replies.</p>
  
  <p>Enrico</p>