7 Replies Latest reply on Oct 27, 2014 10:19 AM by caillou ciso

    Access remote ConnectionFactory deployed on EAP6 from wildfly jms client

    caillou ciso Newbie




      I came here because i have a problem while using my jms client  in wildfly 9.0.0 ALPHA1.

      I'm migrating an application that use to be deployed on EAP 4.3 to wildfly 9.0.0 ALPHA1.

      I did all the module conf and the application correctly deploys.

      Our jms queues are deployed on JBOSS EAP 6 and when i try to register to the remote connection factory, i have an authentication problem while accessing to the remote jndi tree.

      Our EAP6 is correctly configured because the application correctly send messages when deployed to EAP4.3.

      The users have been added to the properties files and standalone.xml of EAP6.
      When deployed into 9.0.0 ALPHA1, i have the following exception:


      javax.naming.AuthenticationException: Failed to connect to any server. Servers tried: [remote://[myMachine]:21846 (Authentication failed: the server presented no authentication mechanisms)] [Root exception is javax.security.sasl.SaslException: Authentication failed: the server presented no authentication mechanisms]



      The code used to retrieve the connection Factory, i use the following code


                  props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
                  props.put(Context.URL_PKG_PREFIXES, "org.jboss.jms.jndi.JNDIProviderAdapter");
                  props.put(Context.PROVIDER_URL, providerUrl);
                  // user
                  props.put(Context.SECURITY_PRINCIPAL, principal);
                  props.put(Context.SECURITY_CREDENTIALS, credential);


              final Context ctxJndi = new InitialContext(props);
              ConnectionFactory hqConnectionFactory = (ConnectionFactory) ctxJndi.lookup(connectionFactory);



      Thank you for your help.