This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

j2ee -ejb error  RSS feed

s prasanna
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!