0 Replies Latest reply on Jan 22, 2003 4:08 AM by Baka Reddy

    Context and Lookup problem

    Baka Reddy Newbie

      Hi,

      I am getting the following exception when i ran my client.

      The code sample:
      ...ConextFactory...
      ...ProviderURL....
      //InitialContext ctx=new InitialContext(p)
      //Giving problem when i pass p to above

      //jndi.properties file set in class path
      InitialContext ctx=new InitialContext()
      //success...the above step is trough
      System.out.println("Context success....");
      Object ref=ctx.lookup("TestHome");
      //here the exception is coming:
      -----------------Exception--------------------------------
      Context success....
      Naming exception....Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
      -------------------------------------------------------

      The following is my classpath:

      c:\j2sdk1.4.0\lib;c:\j2sdk1.4.0\lib\classes12.jar;c:\j2sdk1.4.0\lib\jboss
      -j2ee.jar;c:\j2sdk1.4.0\jre\lib\rt.jar;c:\jboss-3.0.4_tomcat-4.1.12\client\jboss
      all-client.jar;c:\jboss-3.0.4_tomcat-4.1.12\server\all\conf\jndi.properties;c:\T
      estEJBoss;;c:\jboss-3.0.4_tomcat-4.1.12\client\jaas.jar;c:\jboss-3.0.4_tomcat-4.
      1.12\client\jbosssx-client.jar;c:\jboss-3.0.4_tomcat-4.1.12\client\jboss-client.
      jar;c:\jboss-3.0.4_tomcat-4.1.12\client\jnp-client.jar;
      I am new to JBoss. All my work stopped due this problem. Hoping a help from you.

      Thanks,