Thanks for your help but it doesn't work yet. anonymous wrote : All you have to do is, make sure that the standalone client has the appropriate JBoss jar file(s) in its classpath.
I found the HiLoKeyGeneratorFactory class in a uuid-key-generator.sar directory under the default deployment directory. I also had to add the jboss-server.jar. It looks like a JBoss standalone client cannot browse the JNDI binding because of a dependency of the client jars on a sar and jboss-server.jar, which in turns throws an exception complaining about "No 'jboss' MBeanServer found!". Any other ideas? Stack traces below: Error with jbossall-client.jar added to classpath: javax.naming.CommunicationException [Root exception is java.lang.ClassNotFoundException: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory (no security manager: RMI class loader disabled)] at org.jnp.interfaces.NamingContext.listBindings(NamingContext.java:966) at org.jnp.interfaces.NamingContext.listBindings(NamingContext.java:915) at javax.naming.InitialContext.listBindings(InitialContext.java:406) at test.ListJNDIBindingsWithClientJars.main(ListJNDIBindingsWithClientJars.java:22) Caused by: java.lang.ClassNotFoundException: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory (no security manager: RMI class loader disabled) at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:371) at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165) at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620) at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247) at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:197) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348) at java.rmi.MarshalledObject.get(MarshalledObject.java:135) at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72) at org.jnp.interfaces.NamingContext.listBindings(NamingContext.java:962) ... 3 more After adding the sar containing the missing HiLoKeyGeneratorFactory class we get the following error: Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/system/ServiceMBeanSupport at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:242) at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:154) at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620) at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247) at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:197) at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544) at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348) at java.rmi.MarshalledObject.get(MarshalledObject.java:135) at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72) at org.jnp.interfaces.NamingContext.listBindings(NamingContext.java:962) at org.jnp.interfaces.NamingContext.listBindings(NamingContext.java:915) at javax.naming.InitialContext.listBindings(InitialContext.java:406) at test.ListJNDIBindingsWithClientJars.main(ListJNDIBindingsWithClientJars.java:22) After adding the jboss-system.jar containing the ServiceMBeanSupport class we get the following error: Exception in thread "main" java.lang.IllegalStateException: No 'jboss' MBeanServer found! at org.jboss.mx.util.MBeanServerLocator.locateJBoss(MBeanServerLocator.java:122) at org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory.readObject(HiLoKeyGeneratorFactory.java:438) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348) at java.rmi.MarshalledObject.get(MarshalledObject.java:135) at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72) at org.jnp.interfaces.NamingContext.listBindings(NamingContext.java:962) at org.jnp.interfaces.NamingContext.listBindings(NamingContext.java:915) at javax.naming.InitialContext.listBindings(InitialContext.java:406) at test.ListJNDIBindingsWithClientJars.main(ListJNDIBindingsWithClientJars.java:22) | public class ListJNDIBindings { | | public static void main(String[] args) { | | Properties props = new Properties(); | props.put(Context.INITIAL_CONTEXT_FACTORY, org.jnp.interfaces.NamingContextFactory.class.getName()); | props.put(Context.PROVIDER_URL, "jnp://localhost:1099"); | props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces"); | | try { | Context context = new InitialContext(props); | NamingEnumeration<Binding> ne = context.listBindings(""); | while (ne.hasMore()) { | System.out.println(ne.nextElement()); | } | } catch (NamingException e) { | // TODO Auto-generated catch block | e.printStackTrace(); | } | } | } | View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4112347#4112347 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4112347 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user