Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5077432

Doesn't compile the previous working source with InitialContext

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P3 P3
    • None
    • 5.0
    • tools
    • None
    • x86
    • windows_xp

      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta3-b57)
      Java HotSpot(TM) Client VM (build 1.5.0-beta3-b57, mixed mode, sharing)

      It has been observed the appserver8.1 test source used to work with j2se1.4.2_04 and is not properly compiling with above 1.5 beta3 version. It doesn't take the InitialContext(Properties) contructor where Properties inherited from Hashtable. I am not sure whether it is a known issue or not.

      compilation snapshot from ant:
      ------------------------------
          [javac] Compiling 1 source file to C:\ws\latest\appserver-sqe\build\pe\x86_J
      DBABU_Windows_NT\sec-ssl\classes
          [javac] C:\ws\latest\appserver-sqe\pe\security\ssl\converter\client\Converte
      rClient.java:104: cannot find symbol
          [javac] symbol : constructor InitialContext(java.util.Properties)
          [javac] location: class javax.naming.InitialContext
          [javac] context = new InitialContext(env);
          [javac] ^
          [javac] 1 error
          [javac] Compile failed; see the compiler error output for details.

      ----------------------------------------------------
      The following code is having the trouble:

                     testId = "Sec::SSL_simple Standalone-Client";
                     Properties env = new Properties();
                     env.put("java.naming.provider.url", url);
                     env.put("java.naming.factory.initial", ctxFactory);
                     // Initialize the Context with JNDI specific properties
                     context = new InitialContext(env);
                     System.out.println("Context Initialized with " +
                                        "URL: " + url + ", Factory: " + ctxFactory);
                     // Create Home object
                     obj = context.lookup(jndiName);
                 }
      -----------------------------------------
      ###@###.### 2004-07-22

            ahe Peter Ahe
            jmunta Jagadesh Munta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: