This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
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 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:
subject: j2ee -ejb error
It's not a secret anymore!