Hi All, I have created a Stateless Session Bean, which contains a function called info. Now when i am trying to call the same unction using my client, here is the code of the client class: package Samplemypackage1; import java.util.Hashtable; import javax.naming.Context; import javax.naming.InitialContext; import javax.rmi.PortableRemoteObject; import mypackage1.MySessionEJB; import mypackage1.MySessionEJBHome; import javax.naming.NamingException;
public class MySessionEJBClient { public static void main(String [] args) { MySessionEJBClient mySessionEJBClient = new MySessionEJBClient(); try { Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); env.put(Context.PROVIDER_URL, "jnp://localhost:1099"); env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces" ); Context ctx = new InitialContext(env); MySessionEJBHome mySessionEJBHome = (MySessionEJBHome)ctx.lookup("MySessionEJB"); MySessionEJB mySessionEJB = mySessionEJBHome.create( ); mySessionEJB.info(); } catch(Throwable ex) { ex.printStackTrace(); } } } I gets the follwoing error message: java.lang.NoClassDefFoundError: java.net.SocketAddress javax.naming.Context org.jnp.interfaces.NamingContextFactory.getInitialContext(java.util.Hashtable) NamingContextFactory.java:41 javax.naming.Context javax.naming.spi.NamingManager.getInitialContext(java.util.Hashtable) NamingManager.java:665 javax.naming.Context javax.naming.InitialContext.getDefaultInitCtx() InitialContext.java:246 void javax.naming.InitialContext.init(java.util.Hashtable) InitialContext.java:222 void javax.naming.InitialContext.(java.util.Hashtable) InitialContext.java:198 void Samplemypackage1.MySessionEJBClient.main(java.lang.String[]) MySessionEJBClient.java:23 I even tried with: env.put(Context.PROVIDER_URL, "localhost"); Its not working...can anyone please help...its very very urgent.... Thanks to All in Advance... View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3940041#3940041 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3940041 ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user