0 Replies Latest reply on Apr 4, 2002 11:00 PM by plen

    Error : Can't find SerialContextProvider

    plen

      I am running JBoss 2.4.4 - Tomcat 4.0.1 on a Windows XP machine. I can start up JBoss fine with the 'run_with_catalina.bat' file. I was then trying to test some things out by workign with the 'interest' example. Using ANT I am able to compile, jar. and deploy the jar file to the JBOSS_DIST/deploy directory. When I try to run the client application however, I continue to get the following error:

      javax.naming.CommunicationException: Can't find SerialContextProvider when the client tries to do the lookup. The client code up until the error line looks like:

      package org.jboss.docs.interest;
      import javax.naming.InitialContext;
      import javax.rmi.PortableRemoteObject;
      import org.jboss.docs.interest.Interest;
      import org.jboss.docs.interest.InterestHome;

      class InterestClient
      {
      public static void main(String[] args)
      {
      try
      {
      // Get a naming context
      InitialContext jndiContext = new InitialContext();
      System.out.println("Got context");

      // Get a reference to the Interest Bean
      Object ref = jndiContext.lookup("interest/Interest");
      System.out.println("Got reference");
      ...........


      The target in the build.xml file for starting the app looks like:


















      I don't know whether the issue is the access to the jndi.properties file or its contents:

      java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
      java.naming.provider.url=localhost:1099
      java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

      Any thoughts as to whether the target in the ant is bad, an XP issue, or something else.

      Thanks - Peter