jQuery in Action, 3rd edition
The moose likes EJB and other Java EE Technologies and the fly likes j2ee -ejb error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "j2ee -ejb error" Watch "j2ee -ejb error" New topic

j2ee -ejb error

s prasanna

Joined: Oct 04, 2001
Posts: 2
hai everybody
when i am try to run the following servlet-ejb in j2ee server i got some errors. Anybody give me a solution for this?

thanks in advance
import javax.servlet.*;
import java.io.*;
import javax.rmi.*;
import javax.naming.*;
public class HelloServlet extends GenericServlet
public void service(ServletRequest req,ServletResponse res) throws
PrintWriter out = res.getWriter();
Context c = new InitialContext();
Object ob = c.lookup("Hello");
HelloHome home = (HelloHome)PortableRemoteObject.narrow(ob,HelloHome.class);
HelloInter s = home.create();
out.println("Message : " + s.hello());
catch(Exception e1)

error Message :
Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial

I agree. Here's the link: http://aspose.com/file-tools
subject: j2ee -ejb error
It's not a secret anymore!