Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-7282

Remoting dependency on jboss-modules must be optional

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 7.1.0.DR13
    • 7.1.0.DR10, 7.1.0.DR11
    • Remoting

      After https://github.com/jboss-remoting/jboss-remoting/commit/17e8ecf745686673eeaab46014c5f134c6d10324, JBoss Remoting depends on jboss-modules, but the scope specified is provided. However, that means when Remoting is used for standalone clients, eg. in the case of EJB client, this artifact needs to be added to the classpath explicitly, otherwise the client will fail with something like

      Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/modules/ModuleLoadException
      	at org.jboss.remoting3.EndpointBuilder.build(EndpointBuilder.java:117)
      	at org.jboss.remoting3.RemotingXmlParser.parseEndpoint(RemotingXmlParser.java:53)
      	at org.jboss.remoting3.ConfigurationEndpointSupplier.lambda$static$0(ConfigurationEndpointSupplier.java:44)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at org.jboss.remoting3.ConfigurationEndpointSupplier.<clinit>(ConfigurationEndpointSupplier.java:42)
      	at org.wildfly.common.context.ContextManager.setGlobalDefaultSupplierIfNotSet(ContextManager.java:108)
      	at org.jboss.remoting3.Endpoint.lambda$static$0(Endpoint.java:58)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at org.jboss.remoting3.Endpoint.<clinit>(Endpoint.java:56)
      	at org.jboss.ejb.client.remoting.EndpointPool.getEndpoint(EndpointPool.java:89)
      	at org.jboss.ejb.client.remoting.RemotingEndpointManager.getEndpoint(RemotingEndpointManager.java:49)
      	at org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.setupEJBReceivers(ConfigBasedEJBClientContextSelector.java:136)
      	at org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.getCurrent(ConfigBasedEJBClientContextSelector.java:118)
      	at org.jboss.ejb.client.naming.ejb.EjbNamingContext.createIdentifiableEjbClientContext(EjbNamingContext.java:258)
      	at org.jboss.ejb.client.naming.ejb.EjbNamingContext.setupScopedEjbClientContextIfNeeded(EjbNamingContext.java:123)
      	at org.jboss.ejb.client.naming.ejb.EjbNamingContext.<init>(EjbNamingContext.java:98)
      	at org.jboss.ejb.client.naming.ejb.ejbURLContextFactory.getObjectInstance(ejbURLContextFactory.java:38)
      	at javax.naming.spi.NamingManager.getURLObject(NamingManager.java:601)
      	at javax.naming.spi.NamingManager.getURLContext(NamingManager.java:550)
      	at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:345)
      	at javax.naming.InitialContext.lookup(InitialContext.java:417)
      	at client.Client.main(Client.java:19)
      Caused by: java.lang.ClassNotFoundException: org.jboss.modules.ModuleLoadException
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      	... 22 more
      

      The scope should be changed to compile I think so that client applications which used remoting 4 can be seamlessly migrated to remoting 5 without needing to change their pom.

              dlloyd@redhat.com David Lloyd
              jmartisk@redhat.com Jan Martiska
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: