2 Replies Latest reply on May 8, 2003 6:20 PM by Adrian Brock

    EJB Deploment in jboss-3.2.1

    vikaskansal Newbie

      I am a new to the whole java or j2ee environement.
      currently i am runnung jboss-3.2.1 and and sdk1.4.1 on my server. I created a session bean and then created a jar file which includes the class files for beans as well as the META-INF folder which contains ejb-jar.xml and jboss.xml file. I didn't find any deploment document but by just looking at the post on the internet,i got the idea that i have to put this jar file into a folder called "deploy". i found that deploy folder under %JBOSS_HOME%\server\default\ and i copy the jar file there. I saw the deploy kind of statement in the JBOSS console.
      Now I have to test this. I wrote this code.
      import java.sql.*;
      import javax.sql.*;
      import javax.naming.*;
      import javax.ejb.*;
      import javax.rmi.*;
      import com.a.b.c.d.*;

      class RoutinesClient {

      public static void main(String[] args) {

      try {
      Context ctx = new InitialContext();
      Object obj = ctx.lookup("QMC/CM4D/Utility/RoutinesHome");
      RoutinesHome rHome = (RoutinesHome)
      obj, RoutinesHome.class);
      Routines rout = rHome.create();

      RowSet rset = rout.getRoutines();

      catch (Exception e) {
      System.out.print(e.getClass().getName() + ":");
      where com.a.b.c.d was the package name which i used in my session bean. first when i compile it ,compiler didn't find the "com.a.b.c.d". I edit the classpath and append it to %JBOSS_HOME%\server\default\deploy\e.jar file where e.jar is the name of my jar file which contains the beans.
      ***** Does this step required ? *******
      after doing this now compiler is giving me an error "can not access RoutinesBean"
      on this line
      RoutinesHome rHome = (RoutinesHome)
      what's this mean ?
      is this mean that i didn't deploy the bean corrently or i have to do something else so that client can find out the home interface.
      Please help me...........