There is regression and testing blocker in EAP 7.1.0.DR8. Remote client is not able lookup objects from JNDI. The client fails with:
Exception in thread "main" 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 JNDIContextTest.lookup(JNDIContextTest.java:19) at JNDIContextTest.main(JNDIContextTest.java:12) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144) 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) ... 11 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) ... 16 more
Client code:
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")); } }
Configuration of server attached.
- duplicates
-
JBEAP-7105 jboss-remote-naming doesn't work at all in 7.1.0.DR8
- Closed