Uploaded image for project: 'JBoss Remoting (3+)'
  1. JBoss Remoting (3+)
  2. REM3-244

Remoting depends on jboss-modules using wrong scope

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 5.0.0.Beta15
    • 5.0.0.Beta14
    • None

      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.

              jmesnil1@redhat.com Jeff Mesnil
              jmartisk@redhat.com Jan Martiska
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: