JDK-5077432 : Doesn't compile the previous working source with InitialContext
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2004-07-22
  • Updated: 2004-07-23
  • Resolved: 2004-07-23
Related Reports
Relates :  
Description
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

Comments
EVALUATION This issue is solved in b59. ###@###.### 2004-07-22
22-07-2004