1 Reply Latest reply on Jun 3, 2014 3:34 AM by Vijay Bhaskar Chintalapati

    JMS bridge making is not working with HornetQ while JBOSS EAPas server.

    Palash Karal Newbie

      Currently i am trying to create a bridge in JBOSS instance(server0) which is having default JBOSS Queue.I am having a separate domain which is having JBOSS with HornetQ provider(server1).

       

      Now i am making a bridge in Jboss instance(server0) but its failing to make the connection.Its failing on authentication.could you please help.Detail of the bridge and exception is below--

       

      <connection-factories>

       

      <mbean code="org.jboss.jms.jndi.JMSProviderLoader"

                name="jboss.messaging:service=JMSProviderLoader,name=JMSProvider">

            <attribute name="ProviderName">DefaultJMSProvider</attribute>

            <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>

            <attribute name="FactoryRef">java:/XAConnectionFactory</attribute>

            <attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>

            <attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>

         </mbean>

       

      <mbean code="org.jboss.jms.server.bridge.BridgeService" name="jboss.messaging:service=Bridge,name=TestBridge" xmbean-dd="xmdesc/Bridge-xmbean.xml">

          <depends optional-attribute-name="SourceProviderLoader">jboss.messaging:service=JMSProviderLoader,name=MyRemoteJMSProvider</depends>

          <depends optional-attribute-name="TargetProviderLoader">jboss.messaging:service=JMSProviderLoader,name=JMSProvider</depends>

              <attribute name="SourceDestinationLookup">/queue/A</attribute>

           <attribute name="TargetDestinationLookup">palash</attribute>

            <attribute name="SourceUsername">guest</attribute> <!-- 4 -->

            <attribute name="SourcePassword">guest</attribute> <!-- 4 -->

             <attribute name="TargetUsername">admin</attribute> <!-- 4 -->

            <attribute name="TargetPassword">jboss51</attribute> <!-- 4 -->

              <attribute name="QualityOfServiceMode">1</attribute>

              <attribute name="MaxBatchSize">5</attribute>

              <attribute name="MaxBatchTime">1</attribute>

              <attribute name="FailureRetryInterval">5000</attribute>

              <attribute name="MaxRetries">-1</attribute>

              <attribute name="AddMessageIDInHeader">false</attribute>

         </mbean>

      <mbean code="org.jboss.jms.jndi.JMSProviderLoader" name="jboss.messaging:service=JMSProviderLoader,name=MyRemoteJMSProvider">

          <attribute name="ProviderName">MyRemoteJMSProvider</attribute>

          <attribute name="ProviderAdapterClass">org.jboss.jms.jndi.JNDIProviderAdapter</attribute>

          <attribute name="FactoryRef">/ConnectionFactory</attribute>

          <attribute name="QueueFactoryRef">/ConnectionFactory</attribute>

          <attribute name="TopicFactoryRef">/ConnectionFactory</attribute>

         <attribute name="Properties">

           java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory

           java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

           java.naming.provider.url=jnp://jbosshost:41099

           java.naming.security.principal=admin

           java.naming.security.credentials=jboss51      

          </attribute>

        </mbean>

       

       

       

         <tx-connection-factory>

            <jndi-name>JmsXA</jndi-name>

            <xa-transaction/>

            <rar-name>jms-ra.rar</rar-name>

            <connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition>

            <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>

            <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/DefaultJMSProvider</config-property>

            <max-pool-size>20</max-pool-size>

            <security-domain-and-application>JmsXARealm</security-domain-and-application>

            <depends>jboss.messaging:service=ServerPeer</depends>

         </tx-connection-factory>

       

      </connection-factories>

       

      Error message:

       

      2014-06-02 18:56:55,779 WARN  [org.jboss.jms.server.bridge.Bridge] (Thread-17) jboss.messaging:name=TestBridge,service=Bridge Failed to set up connections

      javax.jms.JMSSecurityException: User admin is NOT authenticated

          at org.jboss.jms.server.jbosssx.JBossASSecurityMetadataStore.authenticate(JBossASSecurityMetadataStore.java:223)

          at sun.reflect.GeneratedMethodAccessor264.invoke(Unknown Source)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          at java.lang.reflect.Method.invoke(Method.java:597)

          at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:93)

          at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:27)

          at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:208)

          at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:120)

          at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:262)

          at javax.management.StandardMBean.invoke(StandardMBean.java:391)

          at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)

          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)

          at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)

          at $Proxy93.authenticate(Unknown Source)

          at org.jboss.jms.server.endpoint.ServerConnectionFactoryEndpoint.createConnectionDelegateInternal(ServerConnectionFactoryEndpoint.java:230)

          at org.jboss.jms.server.endpoint.ServerConnectionFactoryEndpoint.createConnectionDelegate(ServerConnectionFactoryEndpoint.java:170)

          at org.jboss.jms.server.endpoint.advised.ConnectionFactoryAdvised.org$jboss$jms$server$endpoint$advised$ConnectionFactoryAdvised$createConnectionDelegate$aop(ConnectionFactoryAdvised.java:108)

          at org.jboss.jms.server.endpoint.advised.ConnectionFactoryAdvised.createConnectionDelegate(ConnectionFactoryAdvised.java)

          at org.jboss.jms.wireformat.ConnectionFactoryCreateConnectionDelegateRequest.serverInvoke(ConnectionFactoryCreateConnectionDelegateRequest.java:91)

          at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:165)

          at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:967)

          at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106)

          at org.jboss.remoting.Client.invoke(Client.java:2070)

          at org.jboss.remoting.Client.invoke(Client.java:879)

          at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$createConnectionDelegate$aop(ClientConnectionFactoryDelegate.java:188)

          at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeTarget(ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.java)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)

          at org.jboss.jms.client.container.StateCreationAspect.handleCreateConnectionDelegate(StateCreationAspect.java:80)

          at org.jboss.aop.advice.org.jboss.jms.client.container.StateCreationAspect_z_handleCreateConnectionDelegate_8758028.invoke(StateCreationAspect_z_handleCreateConnectionDelegate_8758028.java)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.createConnectionDelegate(ClientConnectionFactoryDelegate.java)

          at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:205)

          at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:87)

          at org.jboss.jms.server.bridge.Bridge.createConnection(Bridge.java:921)

          at org.jboss.jms.server.bridge.Bridge.setupJMSObjects(Bridge.java:1030)

          at org.jboss.jms.server.bridge.Bridge.setupJMSObjectsWithRetry(Bridge.java:1238)

          at org.jboss.jms.server.bridge.Bridge.access$1600(Bridge.java:68)

          at org.jboss.jms.server.bridge.Bridge$FailureHandler.run(Bridge.java:1591)

          at java.lang.Thread.run(Thread.java:619)

      2014-06-02 18:56:55,809 WARN  [org.jboss.jms.server.bridge.Bridge] (Thread-17) jboss.messaging:name=TestBridge,service=Bridge Failed to set up connections, will retry after a pause of 5000 ms

      2014-06-02 18:57:00,873 ERROR [org.jboss.messaging.util.ExceptionUtil] (Thread-17) ConnectionFactoryEndpoint[jboss.messaging.connectionfactory:service=ConnectionFactory] createFailoverConnectionDelegate [wl9-9slsfyvh-1-j3asayvh-hn01y7-6262m2i4]

      javax.jms.JMSSecurityException: User admin is NOT authenticated

          at org.jboss.jms.server.jbosssx.JBossASSecurityMetadataStore.authenticate(JBossASSecurityMetadataStore.java:223)

          at sun.reflect.GeneratedMethodAccessor264.invoke(Unknown Source)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          at java.lang.reflect.Method.invoke(Method.java:597)

          at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:93)