Home : Common J-Integra for Exchange Problems
Q129770 - ERRMSG: Common J-Integra for Exchange Problems

Common J-Integra for Exchange Problems

  1. Class not registered
  2. Illegal Argument Exception
  3. MAPI_E_LOGON_FAILED or Interface not registered
  4. AutomationException: 0x80010106 - Cannot change thread mode after it is set
  5. AutomationException: 0x5 - Access is denied. in 'Invoke'
  6. AutomationException: 0x800706ba - The RPC server is unavailable
  7. java.io.IOException: Unable to establish RPC Connection to DCOM SCM on (Bind returned Bind_NAK)

1. Class not registered

You will get this error when CDO is not installed on the CDO machine and/or CDO is installed but no surrogate process exists for CDO. To install CDO, refer to KB article 113792.

To create a surrogate process for CDO, refer to the Getting Started Guide in the J-Integra for Exchange documentation.

In rare circumstances, the "Class not registered" error may persist even after you have installed CDO and have created a surrogate process for it. In this scenario, it may be best to contact support. However, if you have enough experience working with Windows registry and is comfortable fixing the problem yourself, the problem is likely caused by more than one version of CDO being registered in the registry. To resolve this issue, search for the following items in the registry:

Mapi.Session under HKEY_CLASSES_ROOT
Mapi.Session.1 under HKEY_CLASSES_ROOT
"CDO Session Object" under HKEY_CLASSES_ROOT\CLSID

Delete the entire folder where these entries are stored. Re-install CDO as detailed above.

2. Illegal Argument Exception

Cause: The login parameter(s) you are using to authenticate and login to the Exchange server machine is/are incorrect, or the login user does not have enough rights to access the Exchange server.

Resolution: Make sure the login parameters are correct (double check the spelling) and the user has enough rights.

Note that in some installations of MS Exchange, the domain name is case-sensitive. Try passing the domain name parameter with all letters capitalized (e.g. MYDOMAIN instead of mydomain). Also, simply pass the name of the domain without including the suffix (e.g. INTRINSYC instead of INTRINSYC.COM).

3. MAPI_E_LOGON_FAILED or Interface not registered

You will get this error when the mailbox account you are trying to access does not have a profile stored in the CDO machine. There are 2 ways to fix this issue. First, login to the CDO machine as the user whose mailbox you want to access. This will create a profile for that user which the logon call can then use. Alternatively, you can call the logon method such that it creates a profile dynamically when none is found. To do this, modify your Java code to call the logon method as follows:

session.logon(null, null, new Boolean(false), new Boolean(true),
new Integer(0), new Boolean(true),
exchangeServer + "\n" + mailbox);

Note that where you make the change to the logon call depends on which API you are using. If you are using the Java API for CDO, you make the change directly in your Java client code. If you are using the Java-Exchange Bridge (JEB) API, look for the source code for com.intrinsyc.jeb.JebSession and change the logon call accordingly.

For more information on this issue, refer to Microsoft article PRB: MAPI_E_LOGON_FAILED When Calling Logon Method

4. AutomationException: 0x80010106 - Cannot change thread mode after it is set

You will get this error when running J-Integra for Exchange in native mode. Unless you are working with Rules, you should always run J-Integra in DCOM mode. If you do not know what Rules are, you probably won't need them, hence you must run J-Integra in DCOM mode. For more information on DCOM vs native mode, refer to our documentation.

If you must use J-Integra for Exchange in native mode, please read on.

The threading model of a COM object dictates how the objects will be accessed (either by a single thread at any one time or multiple (random) RPC threads at the same time) and "where they will live" (which apartment). In-process components (such as CDO.DLL accessed via J-Integra through native mode) tell their "surrogate" which apartment the component should live in. This is decided by the component's ThreadingModel value which is stored in the registry. The CDO Session class has a value of Both by default, but in the code, MAPI starts up with a call to Apartment-threaded instead. Thus, the registry entry must be manually changed. Open the registry and change the following registry key from Both to Apartment: HKEY_CLASSES_ROOT\CLSID\{3FA7DEB3-6438-101B-ACC1-00AA00423326}\InprocServer32\ThreadingModel

This quirk is documented in the MSDN article PRB: Problems with CoInitializeEx and CDO

5. AutomationException: 0x5 - Access is denied. in 'Invoke'

"Access denied" errors usually arise because CDO has not been configured properly. Follow this guide to configure CDO.

If you are certain that you have done the CDO configuration properly but still keep getting access denied errors, make sure that the user account you are using to access CDO has local administrative rights to the CDO machine. This is needed in order for the user account to have access the CDO machine's MAPI subsystem to connect to the Exchange Server.

Please also ensure that the parameters passed (domain, username, password) in the DCOM authentication call (AuthInfo.setDefault) are all correct.

6. AutomationException: 0x800706ba - The RPC server is unavailable

Make sure that network connections between the Java client machine, the CDO machine and the Exchange Server are up and running. This error also occurs under firewalled systems. Ensure that firewall is turned off in the CDO machine and in the Java client machine.

7. java.io.IOException: Unable to establish RPC Connection to DCOM SCM on (Bind returned Bind_NAK)

This error typically indicates that DCOM has not been enabled on the CDO machine. Ensure that DCOM has been enabled:

  • "Start" | "Run" | "dcomcnfg".
  • expand "Component Services" to "My Computer".
  • right-click "My Computer" | "Properties" | "Default Properties" tab.
  • ensure that "Enable Distributed COM on this computer" is checked.

Related Articles
Q113792 - HOWTO: How do I Install CDO (Collaboration Data Objects)?

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 6/23/2006.
Last Modified on 1/25/2011.
Last Modified by J-Integra KB Admin.
Article has been viewed 58789 times.
Rated 4 out of 10 based on 23 votes.
Print Article
Email Article