1 Reply Latest reply: Oct 5, 2008 8:37 AM by 564397 RSS

    can't connect to more then one server in a java appl.

    564397
      Hi:

      I'm connecting to OCS via java as the administrator without problems. But, even if I close the first connection
      I can't open the second one without getting an user unknown error. If I connect only to one or the other everything works.

      Here's part of the code:


      // Get system properties
      Properties props = System.getProperties();
      props.setProperty("oracle.mail.sdk.esmail.encryption", "false");
      props.setProperty("oracle.mail.sdk.esmail.driver_type", "thin");
      props.setProperty("oracle.mail.ldap.connectssl","true");
      props.setProperty("oracle.mail.ldap.sslport","636");

      props.setProperty("oracle.mail.ldap.admin_dn","cn=xxxx");
      props.setProperty("oracle.mail.ldap.admin_password",xxxx);

      session = Session.getDefaultInstance(props, new OracleAuthenticator());

      // Connect to the mailstore (Oracle)
      OracleStore store = (OracleStore)session.getStore("esmail"); // esmail is the Oracle provider name
      store.connect(owserver, -1, owuser, null);
      store.close();
      owserver="anothermachine";
      owuser="anotheruser";
      store.connect(owserver, -1, owuser, null);
      System.exit(0);



      Please help.

      Regards,
      Jerry
        • 1. Re: can't connect to more then one server in a java appl.
          564397
          Almost forgot, here is the error I am getting.

          [


          ESDS error code - 10010] User Doesn't Exist
          at oracle.mail.ldap.ESDSContext.cacheUserAttrs(ESDSContext.java:690)
          at oracle.mail.ldap.ESDSContext.cacheCallerParams(ESDSContext.java:534)
          at oracle.mail.ldap.ESDSContext.<init>(ESDSContext.java:145)
          at oracle.mail.ldap.ESDSDirServerAccess.ESDSClientLogon(ESDSDirServerAccess.java:829)
          at oracle.mail.sdk.esmail.OracleStore.connect(OracleStore.java:921)
          at WriteOJMA.connect(WriteOJMA.java:52)
          at ReadOJMA.main(ReadOJMA.java:123)
          Exception in thread "main" javax.mail.MessagingException: [ESDS error code - 10010] User Doesn't Exist
          at oracle.mail.sdk.esmail.OracleStore.connect(OracleStore.java:1023)
          at WriteOJMA.connect(WriteOJMA.java:52)
          at ReadOJMA.main(ReadOJMA.java:123)