Probably a jboss/j2ee incompatibility. Ensure that the classpath
includes jboss-j2ee.jar rather than j2ee.jar.

Fred Loney
Spirited Software, Inc.
www.spiritedsw.com

----- Original Message -----
From: mglass
To: JBOSS-USERS LIST
Sent: Saturday, November 17, 2001 7:31 AM
Subject: [JBoss-user] CommunicationException - need help please


I receive the following error when I attempt to execute a client on a
bean server by JBOSS.

Error here Can't find SerialContextProvider
javax.naming.CommunicationException: Can't find SerialContextProvider
 at
com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:6
5)
 at
com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:133)
 at javax.naming.InitialContext.lookup(InitialContext.java:350)
 at org.mhtd.db.members.client.MembersTest.main(MembersTest.java:47)

Can anyone suggest what is wrong? My client is as follows:

   public static void main(String[] args)
   {
      // Enclosing the whole process in a single "try" block is not an
ideal way
      // to do exception handling, but I don't want to clutter the
program up
      // with catch blocks

      try
      {
         Properties jndiProps = new Properties();
         jndiProps.setProperty("java.naming.factory.imitial",
"org.jnp.interfaces.NamingContextFactory");
         jndiProps.setProperty("java.naming.provider.url", "127.0.0.1");

jndiProps.setProperty("java.naming.factory.url.pkgs","org.jboss.naming:o
rg.jnp.interfaces");
         // Get a naming context
         InitialContext jndiContext = new InitialContext(jndiProps);

         // Get a reference to a CD Bean
         Object ref  = jndiContext.lookup("members/Member");

         // Get a reference from this to the Bean's Home interface
         MemberHome home = (MemberHome)
            PortableRemoteObject.narrow (ref, MemberHome.class);

..........

Thanks
Mark


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to