Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-10835

Connection factory with discovery-group doesn't work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Critical Critical
    • None
    • 13.0.0.Final
    • JMS
    • None

      Jms client can not use remote connection factory defined as follows

      <discovery-group name="dg-group1" jgroups-cluster="activemq-cluster"/>
      <connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" discovery-group="dg-group1" ha="true" block-on-acknowledge="true" reconnect-attempts="-1"/>
      

      Following exception is thrown on client

      Exception in thread "main" java.lang.RuntimeException: javax.naming.CommunicationException: WFNAM00020: Remote naming operation failed [Root exception is java.io.EOFException: Read past end of file]
      	at client.ProducerJms11.sendMessages(ProducerJms11.java:67)
      	at client.Producer.run(Producer.java:34)
      	at client.Producer.sendAllSync(Producer.java:25)
      	at client.ProducerJms11.main(ProducerJms11.java:14)
      Caused by: javax.naming.CommunicationException: WFNAM00020: Remote naming operation failed [Root exception is java.io.EOFException: Read past end of file]
      	at org.wildfly.naming.client.remote.RemoteClientTransport.lookup(RemoteClientTransport.java:261)
      	at org.wildfly.naming.client.remote.RemoteContext.lambda$lookupNative$0(RemoteContext.java:190)
      	at org.wildfly.naming.client.NamingProvider.performExceptionAction(NamingProvider.java:222)
      	at org.wildfly.naming.client.remote.RemoteContext.performWithRetry(RemoteContext.java:100)
      	at org.wildfly.naming.client.remote.RemoteContext.lookupNative(RemoteContext.java:188)
      	at org.wildfly.naming.client.AbstractFederatingContext.lookup(AbstractFederatingContext.java:74)
      	at org.wildfly.naming.client.store.RelativeFederatingContext.lookupNative(RelativeFederatingContext.java:58)
      	at org.wildfly.naming.client.AbstractFederatingContext.lookup(AbstractFederatingContext.java:74)
      	at org.wildfly.naming.client.AbstractFederatingContext.lookup(AbstractFederatingContext.java:60)
      	at org.wildfly.naming.client.AbstractFederatingContext.lookup(AbstractFederatingContext.java:66)
      	at org.wildfly.naming.client.WildFlyRootContext.lookup(WildFlyRootContext.java:144)
      	at javax.naming.InitialContext.lookup(InitialContext.java:417)
      	at client.ProducerJms11.sendMessages(ProducerJms11.java:43)
      	... 3 more
      Caused by: java.io.EOFException: Read past end of file
      	at org.jboss.marshalling.SimpleDataInput.eofOnRead(SimpleDataInput.java:151)
      	at org.jboss.marshalling.SimpleDataInput.readUnsignedByteDirect(SimpleDataInput.java:294)
      	at org.jboss.marshalling.SimpleDataInput.readUnsignedByte(SimpleDataInput.java:249)
      	at org.jboss.marshalling.river.BlockUnmarshaller.readUnsignedByte(BlockUnmarshaller.java:258)
      	at org.jboss.marshalling.river.BlockUnmarshaller.readInt(BlockUnmarshaller.java:296)
      	at org.jboss.marshalling.river.BlockUnmarshaller.readUTF(BlockUnmarshaller.java:326)
      	at org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory.readExternal(ActiveMQConnectionFactory.java:186)
      	at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1414)
      	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:272)
      	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:205)
      	at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)
      	at org.wildfly.naming.client.remote.RemoteClientTransport.lookup(RemoteClientTransport.java:243)
      	... 15 more
      Caused by: an exception which occurred:
      	in object of type org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory
      

      It fails on attempt to look up RemoteCF

      ConnectionFactory connectionFactory = (ConnectionFactory) namingContext.lookup(ClientDefaults.CONNECTION_FACTORY);
      

      Same scenario with connector works well.

        1. server-trace.log
          784 kB
          Martin Styk
        2. standalone-full-ha.xml
          31 kB
          Martin Styk

            ehugonne1@redhat.com Emmanuel Hugonnet
            mstyk_jira Martin Styk (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: