Book a Demo

Author Topic: COM Error 0x80080005  (Read 6212 times)

darkroastjava

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
COM Error 0x80080005
« on: October 13, 2009, 03:35:01 am »
Hello,

I have troubles using the COM interface of Enterprise Architect. After days of investigation, I seem to have found the criterion that causes the troubles to appear.

The problem is that in some uses cases, when trying to create a Repository object over the COM interface, I get a COM Error 0x80080005.

I tried with Java as well as C#. However, I found out that it only occurs when I try to run the COM client as a Windows Service, i.e. when the COM interface of EA is contacted from within a Windows Service.

I found that the error message disappears when I change the properties of the "EA.App" COM Server using DCOMCNFG such that EA is started by the "Interactive User" instead of the "Launching User". The "Interactive User" is the one currently logged on to Windows. This is not a viable solution, because I would like to execute my application as a service without having someone to be logged on.

I also tried to run the service and/or EA.App using my account. (Service: By changing the "logon" settings of the windows service. EA.App: By using DCOMCNFG and updating the properties of EA.App.) None of that helped.

Here my theory:

Enterprise Architect needs a windows shell to run. A service has no shell. Thus, providing my credentials does not help because it is not a question of which user runs EA, but whether the process running EA is provided a shell. If I set the EA.App's user to "Interactive User", then the shell of the currently logged on user is provided to EA.

Now my question:

Is there any way to circumvent or solve this, or might this even be regarded as a bug/issue which should be solved by Sparx?

Thx in advanced,
darkroastjava

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: COM Error 0x80080005
« Reply #1 on: October 14, 2009, 09:04:19 am »
I've come across this before.  And from (foggy) memory there was something like a permission for creating a COM object that was missing.

mrf

  • EA User
  • **
  • Posts: 311
  • Karma: +0/-0
    • View Profile
Re: COM Error 0x80080005
« Reply #2 on: October 15, 2009, 09:49:42 am »
Yes, I've come across this error before too, and as Simon mentioned it does have to do with COM not being able to create objects under the Local System account that services run under by default.

As far as I can remember, we were able to overcome the issue by setting the service to run as a user. Please note, services will only run as users who have passwords - so ensure the user you configure the service to run as has one set!
Best Regards,

Michael

[email protected]
"It is more complicated than you think." - RFC 1925, Section 2.8

darkroastjava

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: COM Error 0x80080005
« Reply #3 on: October 16, 2009, 11:31:27 pm »
Thank you guys. Unfortunately, as far as I can find, creating the COM object is not the problem. It is rather a timeout, and in the event log I find the following message:

Event Type:      Error
Event Source:      DCOM
Event Category:      None
Event ID:      10010
Date:            25.09.2009
Time:            08:53:56
User:            N/A
Computer: (xxxx)
Description:
The server {67F4E0FA-46A7-4255-B084-69A9433D08C3} did not register with DCOM within the required timeout.


But I guess I have managed to narrow down the problem:
    1. The service contacts the Win API to create the COM object.
    2. EA is started (I can confirm that in the task manager).
    3. EA probably tries to use the license key manager and seems to get stuck there (although I have a valid local single user key).
    4. Therefore EA never calls the corresponding Win API to register the new COM object.
    5. After a certain time, the COM client (the service) gives up.

I have now tried with "EA Lite", which has no license key manager, and behold, it worked!! This substantiates my suspicion.

Concerning your hints, I tried to grant the user every privilege I could imagine would help, but nothing changed the behavior.

Frank Horn

  • EA User
  • **
  • Posts: 535
  • Karma: +1/-0
    • View Profile
Re: COM Error 0x80080005
« Reply #4 on: October 17, 2009, 01:27:44 am »
Maybe EA can't find the license information for the user the service is running under, and tries to open the license dialog, which, being captured in the service host, it can't. Maybe it would be enough to once run EA as the service user in a desktop session and anwser the license dialog.

It may still happen, though, that some calls to the EA API will fail because they cannot run without a dialog, but I'm not sure.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: COM Error 0x80080005
« Reply #5 on: October 19, 2009, 09:01:41 am »
As I said, I'm sure I've seen exactly that error reported in the situations we have described.  It may be something different in your situation, but that error has come from not being able to create COM objects in the past.