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

JNDI view ClassNotFoundException with remote entry

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 14.0.0.Final
    • 10.0.0.CR5
    • JMS, Naming
    • None
    • Hide
      • Start WildFly in domain mode.
      • Create two server groups with different profiles cloned from the "full" profile.
      • On one profile, create a JMS Topic with an exported JNDI name.
      • On the other profile, create an External Context and a Lookup for the Topic.
      • Start the server that exports the Topic.
      • Start the server consuming the Topic.
      • Try to list the JNDI views: /host=master/server=${SERVER-NAME}/subsystem=naming:jndi-view()
      Show
      Start WildFly in domain mode. Create two server groups with different profiles cloned from the "full" profile. On one profile, create a JMS Topic with an exported JNDI name. On the other profile, create an External Context and a Lookup for the Topic. Start the server that exports the Topic. Start the server consuming the Topic. Try to list the JNDI views: /host=master/server=${SERVER-NAME}/subsystem=naming:jndi-view()

    Description

      When a binding to a remote Artemis Topic/ConnectionFactory is created, JNDI view fails with a ClassNotFoundException. Both servers are running the "full" profile.

      I attach my domain.xml for reference porpuses. No application needs to be deployed.

      Full operation result:
      [domain@localhost:9990 /] /host=master/server=app-ins01/subsystem=naming:jndi-view()
      {
      "outcome" => "failed",
      "result" => {"java: contexts" => {
      "java:" => {
      "ConnectionFactory" =>

      { "class-name" => "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory", "value" => "ActiveMQConnectionFactory [serverLocator=ServerLocatorImpl [initialConnectors=[TransportConfiguration(name=in-vm, factory=org-apache-activemq-artemis-core-remoting-impl-invm-InVMConnectorFactory) ?serverId=0], discoveryGroupConfiguration=null], clientID=null, consumerWindowSize = 1048576, dupsOKBatchSize=1048576, transactionBatchSize=1048576, readOnly=false]" }

      ,
      "JmsXA" =>

      { "class-name" => "java.lang.Object", "value" => "?" }

      ,
      "TransactionManager" =>

      { "class-name" => "com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate", "value" => "com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate@27b3c7" },
      "jms" => {
      "class-name" => "javax.naming.Context",
      "children" => {"queue" => {
      "class-name" => "javax.naming.Context",
      "children" => {
      "DLQ" => { "class-name" => "org.apache.activemq.artemis.jms.client.ActiveMQQueue", "value" => "ActiveMQQueue[DLQ]" },
      "ExpiryQueue" => { "class-name" => "org.apache.activemq.artemis.jms.client.ActiveMQQueue", "value" => "ActiveMQQueue[ExpiryQueue]" }
      }
      }}
      },
      "jboss" => { "class-name" => "javax.naming.Context", "value" => "org.jboss.as.naming.WritableServiceBasedNamingStore@d2c52f" },
      "global" => { "class-name" => "javax.naming.Context", "value" => "org.jboss.as.naming.WritableServiceBasedNamingStore@932e80" },
      "ejb" => {
      "class-name" => "javax.naming.Context",
      "children" => {"mgmt" => {
      "class-name" => "javax.naming.Context",
      "children" => {"MEJB" => {
      "class-name" => "javax.management.j2ee.ManagementHome",
      "value" => "Proxy for remote EJB EJBHomeLocator for \"jsr-77/jsr-77/EJB\", view is interface javax.management.j2ee.ManagementHome, affinity is None"
      }}
      }}
      }
      },
      "java:jboss" => {
      "ORB" => { "class-name" => "com.sun.corba.se.impl.orb.ORBImpl", "value" => "com.sun.corba.se.impl.orb.ORBImpl@1306d15" },
      "TransactionManager" => { "class-name" => "com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate", "value" => "com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate@27b3c7" }

      ,
      "TransactionSynchronizationRegistry" =>

      { "class-name" => "org.jboss.as.txn.service.internal.tsr.TransactionSynchronizationRegistryWrapper", "value" => "org.jboss.as.txn.service.internal.tsr.TransactionSynchronizationRegistryWrapper@206b4c" }

      ,
      "UserTransaction" =>

      { "class-name" => "javax.transaction.UserTransaction", "value" => "UserTransaction" }

      ,
      "corbanaming" =>

      { "class-name" => "org.omg.CosNaming._NamingContextExtStub", "value" => "IOR:000000000000002b49444c3a6f6d672e6f72672f436f734e616d696e672f4e616d696e67436f6e746578744578743a312e300000000000010000000000000110000102000000000a3132372e302e302e31000e3600000039afabcb00000000220000000100000001000000000000000200000008526f6f74504f4100000000074e616d696e67000000000004726f6f741400000000000005000000010000002000000000000100010000000205010001000100200001010900000001000101000000002600000002000200000000000300000014000000000000000a3132372e302e302e31000e3700000014000000080000001a00000e370000002100000050000000000000000100000000000000220000000000400000000000080606678102010101000000170401000806066781020101010000000744656661756c740000000000000000000000000000000000" }

      ,
      "irpoa" =>

      { "class-name" => "com.sun.corba.se.impl.oa.poa.POAImpl", "value" => "POA[ObjectAdapterID[RootPOA/IRPOA], uniquePOAId=2, state=RUN, invocationCount=0]" }

      ,
      "jaas" =>

      { "class-name" => "com.sun.proxy.$Proxy58", "value" => "java:jboss/jaas/ Context proxy" }

      ,
      "poa" =>

      { "class-name" => "com.sun.corba.se.impl.oa.poa.POAImpl", "value" => "POA[ObjectAdapterID[RootPOA], uniquePOAId=0, state=RUN, invocationCount=0]" }

      ,
      "ee" => {
      "class-name" => "javax.naming.Context",
      "children" => {"concurrency" => {
      "class-name" => "javax.naming.Context",
      "children" => {
      "scheduler" => {
      "class-name" => "javax.naming.Context",
      "children" => {"default" => {
      "class-name" => "java.lang.Object",
      "value" => "?"
      }}
      },
      "factory" => {
      "class-name" => "javax.naming.Context",
      "children" => {"default" => {
      "class-name" => "java.lang.Object",
      "value" => "?"
      }}
      },
      "executor" => {
      "class-name" => "javax.naming.Context",
      "children" => {"default" => {
      "class-name" => "java.lang.Object",
      "value" => "?"
      }}
      },
      "context" => {
      "class-name" => "javax.naming.Context",
      "children" => {"default" => {
      "class-name" => "java.lang.Object",
      "value" => "?"
      }}
      }
      }
      }}
      },
      "infinispan" => {
      "class-name" => "javax.naming.Context",
      "children" => {"container" => {
      "class-name" => "javax.naming.Context",
      "children" => {
      "ejb" =>

      { "class-name" => "org.jboss.as.clustering.infinispan.DefaultCacheContainer", "value" => "ejb" }

      ,
      "hibernate" =>

      { "class-name" => "org.jboss.as.clustering.infinispan.DefaultCacheContainer", "value" => "hibernate" }

      ,
      "server" =>

      { "class-name" => "org.jboss.as.clustering.infinispan.DefaultCacheContainer", "value" => "server" }

      ,
      "web" =>

      { "class-name" => "org.jboss.as.clustering.infinispan.DefaultCacheContainer", "value" => "web" }

      }
      }}
      },
      "datasources" => {
      "class-name" => "javax.naming.Context",
      "children" => {"ExampleDS" => {
      "class-name" => "org.jboss.as.connector.subsystems.datasources.WildFlyDataSource",
      "value" => "org.jboss.as.connector.subsystems.datasources.WildFlyDataSource@c79ae8"
      }}
      },
      "mail" => {
      "class-name" => "javax.naming.Context",
      "children" => {"Default" => {
      "class-name" => "javax.mail.Session",
      "value" => "javax.mail.Session@1e9f277"
      }}
      },
      "clustering" => {
      "class-name" => "javax.naming.Context",
      "children" => {"registry" => {
      "class-name" => "javax.naming.Context",
      "children" => {"ejb" => {
      "class-name" => "javax.naming.Context",
      "children" => {"client-mappings" => {
      "class-name" => "org.wildfly.clustering.server.registry.CacheRegistryFactory",
      "value" => "org.wildfly.clustering.server.registry.CacheRegistryFactory@12ac291"
      }}
      }}
      }}
      }
      },
      "java:jboss/exported" => {"jms" => {
      "class-name" => "javax.naming.Context",
      "children" => {"RemoteConnectionFactory" => {
      "class-name" => "org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory",
      "value" => "ActiveMQConnectionFactory [serverLocator=ServerLocatorImpl [initialConnectors=[TransportConfiguration(name=http-connector, factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyConnectorFactory) ?httpUpgradeEnabled=true&httpPpgradeEndpoint=http-acceptor&port=8190&host=127-0-0-1], discoveryGroupConfiguration=null], clientID=null, consumerWindowSize = 1048576, dupsOKBatchSize=1048576, transactionBatchSize=1048576, readOnly=false]"
      }}
      }},
      "java:global" => undefined
      }},
      "failure-description" => "WFLYCTL0158: Operation handler failed: java.lang.RuntimeException: org.jboss.naming.remote.protocol.NamingIOException: Failed to lookup [Root exception is java.io.IOException: java.lang.ClassNotFoundException: org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory from [Module \"org.jboss.as.naming:main\" from local module loader @130015a (finder: local module finder @9f0666 (roots: c:\\wildfly-10.0.0.CR5\\modules,c:\\wildfly-10.0.0.CR5\\modules\\system\\layers\\base))]]",
      "rolled-back" => true
      }

      Injection of the resources via @Resource in an application works as expected. I found this same problem where manually doing the remote lookup from application code, which I resolved adding a dependency to Artemis module in META-INF.

      Attachments

        1. domain.xml
          125 kB
        2. domain.zip
          114 kB
        3. standalone-full.xml
          24 kB

        Issue Links

          Activity

            People

              emartins@redhat.com Eduardo Martins
              ggam_jira Guillermo González de Agüero (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: