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

jboss-remote-naming doesn't work at all in 7.1.0.DR8

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • 7.1.0.DR12
    • 7.1.0.DR8, 7.1.0.DR9
    • EJB, Naming
    • None
    • Regression, Blocks Testing
    • Hide

      To reproduce the issue - run following code with jboss-client.jar from DR8 and attached standalone-full-ha.xml:

      import javax.naming.Context;
      import javax.naming.InitialContext;
      import java.util.Properties;
      
      /**
       * Created by mnovak on 11/14/16.
       */
      public class JNDIContextTest {
      
          public static void main(String[] args) throws Exception {
              JNDIContextTest jndiContextTest = new JNDIContextTest();
              jndiContextTest.lookup();
          }
      
          private void lookup() throws Exception {
              final Properties env = new Properties();
              env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
              env.put(Context.PROVIDER_URL, "http-remoting://127.0.0.1:8080");
              Context context = new InitialContext(env);
              System.out.println(context.lookup("jms/RemoteConnectionFactory"));
          }
      }
      
      Show
      To reproduce the issue - run following code with jboss-client.jar from DR8 and attached standalone-full-ha.xml: import javax.naming.Context; import javax.naming.InitialContext; import java.util.Properties; /** * Created by mnovak on 11/14/16. */ public class JNDIContextTest { public static void main( String [] args) throws Exception { JNDIContextTest jndiContextTest = new JNDIContextTest(); jndiContextTest.lookup(); } private void lookup() throws Exception { final Properties env = new Properties(); env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory" ); env.put(Context.PROVIDER_URL, "http-remoting: //127.0.0.1:8080" ); Context context = new InitialContext(env); System .out.println(context.lookup( "jms/RemoteConnectionFactory" )); } }

      When trying to use jboss-remote-naming with dependencies taken from EAP 7.1.0.DR8, that means with Remoting 5, everything fails with:

      javax.naming.NamingException: Failed to create remoting connection [Root exception is java.lang.NoClassDefFoundError: org/jboss/remoting3/Remoting]
              at org.jboss.naming.remote.client.ClientUtil.namingException(ClientUtil.java:51)
              at org.jboss.naming.remote.client.InitialContextFactory.getInitialContext(InitialContextFactory.java:152)
              at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684)
              at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
              at javax.naming.InitialContext.init(InitialContext.java:244)
              at javax.naming.InitialContext.<init>(InitialContext.java:216)
              at org.jboss.qa.ejbclient.jndi.InitialContextDirectoryRemoteNaming.<init>(InitialContextDirectoryRemoteNaming.java:40)
              at org.jboss.qa.ejbclient.jndi.InitialContextDirectory$Supplier.get(InitialContextDirectory.java:50)
              ... 124 more
      Caused by: java.lang.NoClassDefFoundError: org/jboss/remoting3/Remoting
              at org.jboss.naming.remote.client.EndpointCache.get(EndpointCache.java:47)
              at org.jboss.naming.remote.client.InitialContextFactory.createEndpoint(InitialContextFactory.java:226)
              at org.jboss.naming.remote.client.InitialContextFactory.getOrCreateEndpoint(InitialContextFactory.java:207)
              at org.jboss.naming.remote.client.InitialContextFactory.getOrCreateNamingStore(InitialContextFactory.java:170)
              at org.jboss.naming.remote.client.InitialContextFactory.getInitialContext(InitialContextFactory.java:146)
              ... 130 more
      Caused by: java.lang.ClassNotFoundException: org.jboss.remoting3.Remoting
              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)
              ... 135 more
      

      Note that jboss-remote-naming is deprecated and will possibly be removed altogether, that discussion is still ongoing.

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

                Created:
                Updated:
                Resolved: