Author Topic: Failed to open EA in Jenkins build: error 80080005  (Read 8935 times)

koenemann

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Failed to open EA in Jenkins build: error 80080005
« on: February 24, 2014, 09:58:49 pm »
We would like to call the EA from a Jenkins build job, but that fails when creating an instance of Repository.

Stacktrace when running from DLL (unfortunately only in German):
Quote
Die COM-Klassenfactory für die Komponente mit CLSID {67F4E0FA-46A7-4255-B084-69A9433D08C3} konnte aufgrund des folgenden Fehlers nicht abgerufen werden: 80080005 Starten des Servers fehlgeschlagen (Ausnahme von HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).    bei System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   bei System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)
   bei System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)
   bei System.Activator.CreateInstance(Type type, Boolean nonPublic)

Stacktrace when running from Java:
Quote
java.lang.Exception: Failed to construct object. Error code: 0x80080005
      at org.sparx.Repository.comConstructor(Native Method)
      at org.sparx.Repository.<init>(Repository.java:170)

The EA is installed and can be started manually with the same user the build job is running with.

Any idea what could be missing?
« Last Edit: February 24, 2014, 11:04:50 pm by koenemann »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Failed to open EA in Jenkins build: error 8008
« Reply #1 on: February 24, 2014, 11:05:39 pm »
I don't have much ideas about Java, but there were some threads about creating an EA instance via Java. Try the Search button top left.

q.

koenemann

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Failed to open EA in Jenkins build: error 8008
« Reply #2 on: February 24, 2014, 11:13:49 pm »
Thanks for the quick reply.

Quote
I don't have much ideas about Java, but there were some threads about creating an EA instance via Java. Try the Search button top left.

It does work to create the Repository object when running the application manually (both via DLL and via Java). So I assume our code is fine. But it does not work inside a Jenkins build job, apparently because a COM class a CLSID that is probably from the EA interop dll is not registered. But why is that different from running it manually?

Any idea?

OpenIT Solutions

  • EA User
  • **
  • Posts: 555
  • Karma: +9/-1
    • View Profile
Re: Failed to open EA in Jenkins build: error 8008
« Reply #3 on: February 25, 2014, 05:04:14 am »
Its probably a PATH or CLASSPATH issue. Is Jenkins using the same JRE/Java instance ? Assume you have added eaapi.jar onto the classpath used by Jenkins and that SSJavaCOM.dll is on the PATH ? I typically just add the SSJavaCOM.dll to the bin folder of my JRE/Java runtime....

koenemann

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Failed to open EA in Jenkins build: error 8008
« Reply #4 on: February 25, 2014, 05:11:40 am »
Thanks for the reply, unfortunately the classpath and library path are ok:
  • eaapi.jar is on the classpath (otherwise we would not reach the constructor of the Repository class).
  • SSJavaCOM.dll is on the library path, otherwise we get a java.lang.UnsatisfiedLinkError: no SSJavaCOM in java.library.path

Quote
Its probably a PATH or CLASSPATH issue. Is Jenkins using the same JRE/Java instance ? Assume you have added eaapi.jar onto the classpath used by Jenkins and that SSJavaCOM.dll is on the PATH ? I typically just add the SSJavaCOM.dll to the bin folder of my JRE/Java runtime....

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Failed to open EA in Jenkins build: error 8008
« Reply #5 on: February 25, 2014, 08:12:42 am »
You should in parallel contact Sparx support.  Maybe they can help.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: Failed to open EA in Jenkins build: error 8008
« Reply #6 on: February 25, 2014, 08:56:20 am »
Problems I remember for EA in a batch job.

1. No EA key - Launch EA from that user account with GUI to add a key.
2. User has no permissions to create COM objects.

koenemann

  • EA Novice
  • *
  • Posts: 18
  • Karma: +0/-0
    • View Profile
Re: Failed to open EA in Jenkins build [solved]
« Reply #7 on: February 27, 2014, 07:54:23 pm »
Thanks for the reply! The user permissions were indeed wrong. More precisely, the jenkins build ran with a different user than expected which did not have the permissions.

Quote
Problems I remember for EA in a batch job.

1. No EA key - Launch EA from that user account with GUI to add a key.
2. User has no permissions to create COM objects.

Boron

  • EA User
  • **
  • Posts: 111
  • Karma: +6/-0
    • View Profile
Re: Failed to open EA in Jenkins build: error 80080005
« Reply #8 on: November 28, 2019, 01:35:20 am »
Sorry for warming up this really old topic, but I run now into are quite similar problem.

If I refer to the last two post right before this one.
1. No EA key - Launch EA from that user account with GUI to add a key.
2. User has no permissions to create COM objects.

1. This is a "Passed". Our "Jenkins user account" has an EA license. Being logged in as that user and starting the EA GUI works without any problems.
2. This is probably a "Failed". How can I find out if the user has the right to create COM objects?

Many thanks.