Nalini Reddy
Greenhorn
Joined: Jul 01, 2004
Posts: 18
|
|
Hi All, I have deployed HelloWorld EJB on jboss successfully.But when i am trying to run it it gives me the following error. javax.naming.CommunicationException:RootException is java.rmi.Marshall Exception also returns Exception:null Could any of u please help me out.I need to develop a project on jboss,so trying to learn doing a sample example (HelloWorld example)first. My HelloWorldClient program is as follows: import javax.naming.Context; import javax.naming.InitialContext; import java.util.Hashtable; import javax.ejb.CreateException; import javax.rmi.PortableRemoteObject; import javax.naming.NamingException; import javax.ejb.RemoveException; public class HelloWorldClient { public static void main( String [] args ) { Hashtable h = new Hashtable(); h.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); h.put(Context.PROVIDER_URL, "localhost:1099"); h.put("java.naming.factory.url.pkgs", "org.jboss.naming rg.jnp.interfaces"); try { Context ctx = new InitialContext(h); Object obj = ctx.lookup( "HelloWorld" ); HelloWorldHome home = (HelloWorldHome)javax.rmi.PortableRemoteObject.narrow( obj, HelloWorldHome.class ); HelloWorld helloWorld = home.create(); System.out.println( helloWorld.hello()); helloWorld.remove(); } catch ( Exception e ) { e.printStackTrace(); System.out.println( "Exception: " + e.getMessage() ); } } } I would b very grateful if anyone could help me out soon,please........ Thanks,in advance Nalini.
|
|
subject: lookup problem in jboss-3.0.8
|