Home : AutomationException: 0x800a03ec - An unexpected error occurred with the method
Q149261 - ERRMSG: AutomationException: 0x800a03ec - An unexpected error occurred with the method

AutomationException: 0x800a03ec - An unexpected error occurred with the method

 

Contents

  1. SYMPTOMS
  2. CAUSE
  3. RESOLUTION

SYMPTOMS

When accessing Microsoft Office Project Professional 2003 (11.0.2003.0816.15) from a Java client which invokes the getValue() method of TimeScaleValue object for several times, you may get AutomationException: 0x800a03ec - An unexpected error occurred with the method.

CAUSE

This is a bug in Microsoft Project which prevents holding references to a certain number of TimeScaleValue objects, and you will get the same 0x800a03ec error in C# or VB.NET client when retrieving the Value property of TimeScaleValue object in a loop which iterates more than 10 times. The garbage collector of .NET or Java is not clearing up the references fast enough.

RESOLUTION

To workaround this problem, wrap your code using trackObjectsInCurrentThread/releaseAllInCurrentThread and place a call to release(...) at the end of the loop to force garbage collection. For example:

  for (int iSlice = 1; iSlice <= nSlices; iSlice++) {
    com.linar.jintegra.Cleaner.trackObjectsInCurrentThread();
    TimeScaleValue tsv = new TimeScaleValueProxy(tim.getItem(iSlice));

    // your code:
    ... 

    com.linar.jintegra.Cleaner.release(...);
    com.linar.jintegra.Cleaner.releaseAllInCurrentThread();
  }

Related Articles
No Related Articles Available.

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 7/11/2006.
Last Modified by No Author Name Available!.
Article has been viewed 7409 times.
Rated 4 out of 10 based on 4 votes.
Print Article
Email Article