Book a Demo

Author Topic: EA Automation and Jenkins  (Read 6961 times)

David Schumacher

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
EA Automation and Jenkins
« on: December 16, 2016, 12:59:17 am »
Hi EA team,

  I have developped a C# solution base on EA API. I would like to run it with jenkins and I encounter a problem with InteropServices.COMException (error corde : 0x80080005).
  By googling the error code in EA context, I have discover following links :
http://blog.lieberlieber.com/2012/08/23/ea-app-is-not-visible-in-component-servicesdcom-x64/
http://community.sparxsystems.com/tutorials/556-28running-enterprise-architect-on-a-server

  Moreover, I have read this document : "Sparx Systems Enterprise Architect as an unattended Windows Service on Windows Server 2008R2 and higher".

  So, I think my problem is about the configuration of AP.App service via DCOMCNFG. Unfortunately, AP.App is not visible in the tool in spite of the following command line : mmc comexp.msc /32
  I try the solution to change registry key like this, with no more success :
Quote
    1.) Identify your COM object’s GUID with REGEDIT HKEY_CLASSES_ROOT\Wow6432Node\CLSID\[GUID]
    in our case: you can search for EA.App and you will find: {3A9E4F92-8D27-495B-8B22-1D702B3F0C83}
    2.) There you add a REG_SZ (string) Value. Name it AppID and data has to be the same COM object GUID
        in our case: {3A9E4F92-8D27-495B-8B22-1D702B3F0C83}
    3.) Add a new key HKEY_CLASSES_ROOT\Wow6432Node\AppID\ and name it GUID
        in our case again: {3A9E4F92-8D27-495B-8B22-1D702B3F0C83}
    4.) There you add a REG_SZ (string) Key called: DllSurrogate. Value is empty.
    5.) Create a new Key under HKEY_LOCAL_MACHINE\Software\Classes\AppID\ and name it GUID
        in our case again: {3A9E4F92-8D27-495B-8B22-1D702B3F0C83}


My EA 12 is running on Windows 7 Pro on laptop HP. Jenkins version is 2.36.

Anyone can help me ?
Thanks !

David

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: EA Automation and Jenkins
« Reply #1 on: December 16, 2016, 03:26:11 am »
Can you explain what you are trying to achieve with the jenkins stuff?
I've done a lot of add-ins and automation, but I've never used something like Jenkins.

Geert

PS. You do realize that you have misspelled "EA.App" twice in your post? I hope you didn't make the same typo in your code.

David Schumacher

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: EA Automation and Jenkins
« Reply #2 on: December 16, 2016, 09:04:14 pm »
Hi Geert,

  After checking, there is no error in source code : EA.App is well spelling.
  In fact, the purpose of my C# solution is especially to generate test cases from BPMN diagram & from scenarii of activities. It should be great if the solution can be integrate to our existing continuous integration platform (based on jenkins solution). For example, this should allow to generate tests each time a commit is made on the EA model.

  Do you have encountered some problems with AP.App permissions ? I have tried to execute solution with the Windows scheduler and there is no problem. So I think my problems is about user (jenkins ?) or AP.App permissions. Do you share my analysis ?

  For information, jenkins error logs are following (I can translate french part if necessary) :
Code: [Select]
Exception non g‚r‚eÿ: System.Runtime.InteropServices.COMException: La r‚cup‚ration de la fabrique de classes COM pour le composant avec le CLSID {67F4E0FA-46A7-4255-B084-69A9433D08C3} a ‚chou‚ en raison de l'erreur suivanteÿ: 80080005 ?chec de l'ex‚cution du serveur (Exception de HRESULT : 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).
   … System.Runtime.Remoting.RemotingServices.AllocateUninitializedObject(RuntimeType objectType)
   … System.Runtime.Remoting.Activation.ActivationServices.CreateInstance(RuntimeType serverType)
   … System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(RuntimeType serverType, Object[] props, Boolean bNewObj)
   … System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   … System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   … System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   … System.Activator.CreateInstance(Type type, Boolean nonPublic)
   … System.Activator.CreateInstance(Type type)
   … TestCaseGenerator.Program.Main(String[] args) dans D:\PROJETS\TestCaseGenerator\TestCaseGenerator\Program.cs:ligne 16
Build step 'Exécuter une ligne de commande batch Windows' marked build as failure
Finished: FAILURE

Best regards,

David

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: EA Automation and Jenkins
« Reply #3 on: December 16, 2016, 09:36:08 pm »
David, you once again use AP.App. Is that just some kind of Freudian mistake?

You should check https://www.virtualbox.org/ticket/12145 and similar Google results of CO_E_SERVER_EXEC_FAILURE for you VirtualBox error.

q.
« Last Edit: December 16, 2016, 09:40:04 pm by qwerty »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: EA Automation and Jenkins
« Reply #4 on: December 16, 2016, 09:43:26 pm »
I see.. and EA is installed on the machine that executes the Jenkins process I suppose?
So the the problem might be related to the (system) user that runs the jenkins process.

You might want to try to log on with that user and run EA under that user profile. That will make sure that the rights are OK, and that EA has a license registered in the user profile.

If that works there's a chance that it works with from the automated jenkins process as well.

Geert