title: Not Able to Connect Prod OIM
body: <p>I have a code that actually able to connect to Lab OIM but same code i am not able to connect to Prod OIM. Below is the code i am using. Did i miss anything? I have all those Jars also in my Project build path. Help and any suggestion will be appreciated. Below are the code and error i am getting after debugging the class.</p>
  
  <pre><code> public class ConnectionTest {
           UserManager userManager;
  
            public ConnectionTest() {
                    super();
                  }
     public static void main(String[] arg) throws IOException, Exception {
  
      ConnectionTest oim=new ConnectionTest();
      oim.OIMConnection();
  }
   public void OIMConnection(){             
      Hashtable&lt;Object, Object&gt; env = new Hashtable&lt;Object, Object&gt;();
      env.put(OIMClient.JAVA_NAMING_FACTORY_INITIAL, "weblogic.jndi.WLInitialContextFactory");
      env.put(OIMClient.JAVA_NAMING_PROVIDER_URL, "t3://hostname:port");
      System.setProperty("java.security.auth.login.config", "C:\\Documents\\authwl.conf");
      System.setProperty("OIM.AppServerType", "wls");  
      System.setProperty("APPSERVER_TYPE", "wls");
      oracle.iam.platform.OIMClient oimClient = new oracle.iam.platform.OIMClient(env);
  
      try {                        
          oimClient.login("username", "password".toCharArray());         
          logger.info("Successfully Connected with OIM!\n");
      } catch (LoginException e) {
          CharArrayWriter cw = new CharArrayWriter();
          PrintWriter w = new PrintWriter(cw);
          e.printStackTrace(w);
          logger.error("Login Exception: "+ cw.toString());
      }            
      userManager = oimClient.getService(UserManager.class);
  }}
  </code></pre>
  
  <p>Error I am getting is here.....</p>
  
  <p>Login Exception: javax.security.auth.login.LoginException: weblogic.socket.UnrecoverableConnectException: [Login failed for an unknown reason:  P] at weblogic.security.auth.login.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:194)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at javax.security.auth.login.LoginContext.invoke(LoginContext.java:762)
      at javax.security.auth.login.LoginContext.access$000(LoginContext.java:203)
      at javax.security.auth.login.LoginContext$4.run(LoginContext.java:690)
      at javax.security.auth.login.LoginContext$4.run(LoginContext.java:688)
      at java.security.AccessController.doPrivileged(Native Method)
      at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:687)
      at javax.security.auth.login.LoginContext.login(LoginContext.java:595)
      at Thor.API.Security.LoginHandler.weblogicLoginHandler.login(weblogicLoginHandler.java:61)
      at oracle.iam.platform.OIMClient.login(OIMClient.java:212)
      at oracle.iam.platform.OIMClient.login(OIMClient.java:196)
      at org.com.dis.exa.ConnectionTest.OIMConnection(ConnectionTest.java:73)
      at org.com.dis.exa.ConnectionTest.main(ConnectionTest.java:53)</p>