7 Replies Latest reply on Apr 17, 2002 8:47 AM by ionel

    can't find SerialContextProvider

    ionel Newbie

      Hi,

      When I launch a client to connect to a tiny CMP2.0 EJB, the client returns the following error :


      javax.naming.CommunicationException: Can't find SerialContextProvider
      at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:63)
      at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:120)
      at javax.naming.InitialContext.lookup(InitialContext.java:350)
      at clients.personneClient.main(personneClient.java:21)


      the client code is :

      package clients;

      import personne.*;

      import javax.ejb.*;
      import javax.naming.*;
      import java.rmi.*;
      import javax.rmi.PortableRemoteObject;
      import java.util.*;

      public class personneClient
      {
      public static void main(String[] args) throws Exception
      {
      personneHome home=null;

      try
      {
      InitialContext jndiContext = new InitialContext();

      Object ref = jndiContext.lookup("ejbcal/Personne");

      home = (personneHome) PortableRemoteObject.narrow (ref, personneHome.class);

      Iterator i=home.findByName("gardais").iterator();
      System.out.println("personne ayant le nom gardais :");
      while (i.hasNext())
      {
      personne pers = (personne) PortableRemoteObject.narrow(i.next(), personne.class);
      System.out.println(pers.getNom());
      System.out.println(pers.getPrenom());
      }
      }
      catch (Exception e)
      {
      e.printStackTrace();
      }
      finally
      {
      System.out.println("Done.");
      }
      }
      }


      I'm currently working with Jboss3.0 binary downloaded and a mySQL database, J2SDKEE 1.3.1.
      The ejbcal/Personne JNDI socket is created in the jboss.xml

      <?xml version="1.0"?>

      <enterprise-beans>

      <ejb-name>personneBean</ejb-name>
      <jndi-name>ejbcal/Personne</jndi-name>

      </enterprise-beans>



      thanks for your help,
      ionel