3 Replies Latest reply on Aug 13, 2002 11:54 AM by Ash

    accessing a deployed ejb

    Ash Newbie

      Hi all, I'm trying to access my deployed ejb on jboss from tomcat 4.. I'm running a jsp client to link to my ejb, and every time I call the jsp client, I get a server error:
      javax.servlet.ServletException: javax/net/SocketFactory

      I know that the jndi.jar should be kept at the WEB-INF\lib dir, however I couldn't find it under jboss\client! Is this normal? This is my first time to use jboss, am I missing something? I ran http://localhost:8082 and I can see my ejb deployed fine!
      Is there anything extra that I need to do for linking tomcat with jboss.. I downloaded the integrated version which have tomcat included.. the only thing I did was to change the tomcat port to 8020 because everytime I wanted to start tomcat after jboss it came with a used socket error! Is there a different way for linking jboss and tomcat!?


        • 1. Re: accessing a deployed ejb
          Kail Newbie

          did you specyfied data in jndi.properties?
          is this a tomcat provided with jboss?

          • 2. Re: accessing a deployed ejb
            Ash Newbie

            no I did not specify any jndi.properties, where would I do this from?
            Yes, this is a Tomcat install that was integrated with Jboss.

            Any idea where things r going wrong! Here's the code that I've used for the client:
            <%@ page import="javax.naming.InitialContext,
            long t1 = System.currentTimeMillis();
            Properties props = new Properties();
            props.put(Context.PROVIDER_URL, "localhost:1099");

            Context ctx = new InitialContext(props);
            FirstHome home = (FirstHome)ctx.lookup("ejb/First");
            First bean = home.create();
            String time = bean.getTime();
            long t2 = System.currentTimeMillis();

            • 3. Re: accessing a deployed ejb
              Ash Newbie

              I found the solution... jnet.jar was not available in the classpath! I added it to catalina\lib of tomcat and all worked fine!