11 Replies Latest reply on Jun 15, 2003 9:00 AM by Tim

    EJB entity not BOUND

    pescouille Newbie

      Hello,

      I have got a big problem,

      when I launch my application Test, he said that my Engine is not bound.

      What is the problem ?

      my file TEST.java:

      import java.util.Properties;
      import javax.transaction.UserTransaction;
      import javax.naming.InitialContext;
      import javax.naming.Context;
      import javax.rmi.PortableRemoteObject;
      import engine.*;
      import java.util.Hashtable;
      import java.util.Properties;
      import java.util.Collection;
      import java.util.Iterator;
      import java.sql.*;
      import javax.servlet.*;
      import javax.servlet.http.*;
      import java.io.*;

      public class Test extends HttpServlet{
      /*public static void main(String args[]){*/
      public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException
      {
      res.setContentType("text/html");
      PrintWriter out=res.getWriter();
      try{
      /*Properties prop=new Properties();
      prop.setProperty("java.naming.factory.initial", "");
      prop.setProperty("java.naming.provider.url", "localhost:1099");*/
      /* Hashtable env = new Hashtable();
      env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      env.put(Context.PROVIDER_URL, "localhost:1099");
      env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces" );*/

      Context initialContext=new InitialContext();

      out.println("");
      out.println("");
      out.println("Bonjour");
      out.println("");
      out.println("");


      Object objref = initialContext.lookup("java:comp/env/Engine");