Install Archi on Ubuntu/Kubuntu 18.04

Started by ErikR, July 16, 2018, 07:06:10 AM

Previous topic - Next topic

ErikR

Just want to share how I managed to get out of the box Archi working properly on Kubuntu 18.04 which shall work for other *buntu's and most likely also Linux Mint 19 that uses Ubuntu 18.04 as base.

The core problem is that Archi won't run on default java environment (openJDK 1.11) but needs java 1.8 and openJDK 1.8. Luckily version 1.8 is also available to be installed along side 1.11


The HowTo
======

Step 1:
Install openjdk-8-jre alongside the default jdk (jdk 1.11.0)
Also install the package libwebkitgtk-1.0-0 to get help browser working.

Use the package manager or do it the hard core way in a shell:
$ sudo apt-get install openjdk-8-jre libwebkitgtk-1.0-0


Step 2:
Verify the installed JDKs and the paths to them:
$ update-java-alternatives -l
java-1.11.0-openjdk-amd64      1101       /usr/lib/jvm/java-1.11.0-openjdk-amd64
java-1.8.0-openjdk-amd64       1081       /usr/lib/jvm/java-1.8.0-openjdk-amd64

Step 3:
Edit the file Archi-Ubuntu.sh in the Archi installation. Add the following two lines after "export UBUNTU_MENUPROXY=0":

export PATH="/usr/lib/jvm/java-1.8.0-openjdk-amd64/bin/:${PATH}"
export JAVA_HOME="/usr/lib/jvm/java-1.8.0-openjdk-amd64"

Also verify that the paths corresponds to the output printed in step 2.

Start Archi:
Start Archi using Archi-Ubuntu.sh


Phil Beauvoir

Thanks for sharing Erik.

I think Archi might work on > Java 8 if you add the following line to the end of the Archi.ini file:

--add-modules=ALL-SYSTEM
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

ubibene

Hi,

adding --add-modules=ALL-SYSTEM to  Archi.ini makes it possible for Archi to run on Ubuntu 18.04 , with the following warnings  :

WARNING: Using incubator modules: jdk.incubator.httpclient
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.eclipse.emf.ecore.xmi.impl.XMLHandler (file:/home/xxx/Bureau/Archi4/plugins/org.eclipse.emf.ecore.xmi_2.12.0.v20160420-0247.jar) to method com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser$LocatorProxy.getEncoding()
WARNING: Please consider reporting this to the maintainers of org.eclipse.emf.ecore.xmi.impl.XMLHandler
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

without it, Archi fails to start and  shows a message box saying more information is in the  log file, which contains :

!ENTRY org.eclipse.e4.ui.workbench 4 0 2018-08-25 12:15:21.783
!MESSAGE FrameworkEvent ERROR
!STACK 0
java.lang.NoClassDefFoundError: javax/annotation/PreDestroy
        at org.eclipse.e4.core.internal.di.InjectorImpl.disposed(InjectorImpl.java:426)
        at org.eclipse.e4.core.internal.di.Requestor.disposed(Requestor.java:154)
        at org.eclipse.e4.core.internal.contexts.ContextObjectSupplier$ContextInjectionListener.update(ContextObjectSupplier.java:78)
        at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:111)
        at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.handleInvalid(TrackableComputationExt.java:74)
        at org.eclipse.e4.core.internal.contexts.EclipseContext.dispose(EclipseContext.java:176)
        at org.eclipse.e4.core.internal.contexts.osgi.EclipseContextOSGi.dispose(EclipseContextOSGi.java:106)
        at org.eclipse.e4.core.internal.contexts.osgi.EclipseContextOSGi.bundleChanged(EclipseContextOSGi.java:139)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:903)
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
        at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:213)
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:120)
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:112)
        at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:156)
        at org.eclipse.osgi.container.Module.publishEvent(Module.java:476)
        at org.eclipse.osgi.container.Module.doStop(Module.java:634)
        at org.eclipse.osgi.container.Module.stop(Module.java:498)
        at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:202)
        at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165)
        at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.lang.ClassNotFoundException: javax.annotation.PreDestroy cannot be found by org.eclipse.e4.core.di_1.6.1.v20160712-0927
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:410)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364)
        at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
        ... 21 more



Phil Beauvoir

I think the "Illegal reflective access by org.eclipse.emf.ecore.xmi.impl.XMLHandler" will be addressed:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=517054
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Phil Beauvoir

There are a few issues with running Archi 4.2 with Java 10. The Collaboration plugin will throw an error:

java.lang.NoClassDefFoundError: sun/misc/BASE64Decoder
   at org.archicontribs.modelrepository.authentication.SimpleCredentialsStorage.decrypt(SimpleCredentialsStorage.java:83)

I've put in a fix for this for the next version. But this next version depends on Archi 4.3 which is not released yet.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

ubibene

The jarchi plugin installation silently fails  too on Ubuntu 18.04

Phil Beauvoir

Quote from: ubibene on August 30, 2018, 19:52:39 PM
The jarchi plugin installation silently fails  too on Ubuntu 18.04

Is that because of other issues caused by Java 10?
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Phil Beauvoir

#7
Quote from: Phil Beauvoir on August 30, 2018, 19:53:58 PM
Quote from: ubibene on August 30, 2018, 19:52:39 PM
The jarchi plugin installation silently fails  too on Ubuntu 18.04

Is that because of other issues caused by Java 10?

I just tried on Linux Mint with Java 10 with --add-modules=ALL-SYSTEM set in Archi.ini. It worked. If you restart Archi is it installed?
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

ubibene

#8

>java -- version
openjdk 10.0.2 2018-07-17
OpenJDK Runtime Environment (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1)
OpenJDK 64-Bit Server VM (build 10.0.2+13-Ubuntu-1ubuntu0.18.04.1, mixed mode)

> cat ~/Archi4/Archi.ini
-clean
--launcher.defaultAction
openFile
--launcher.GTK_version
2
-vmargs
-Xms256m
-Xmx1024m
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area=@user.home/.archi4
-Dosgi.configuration.area=@user.home/.archi4/.config
--add-modules=ALL-SYSTEM

>cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"



steps
- Installed the plugin from Archi (Help / install plugin)
- Archi asks if it ok to restart , I say yes,
- but after restarting no jarchi menu nor windows.


> ls ~/Archi4/plugins/ | grep script
com.archimatetool.script_0.4.0.201808090947.jar
com.archimatetool.script.commandline_0.4.0.201808090947.jar
com.archimatetool.script.premium_0.4.0.201808090947.jar



Phil Beauvoir

I just did a clean install of Ubuntu 18.04 with Java 10.0.2.

I added --add-modules=ALL-SYSTEM to Archi.ini

I did "sudo apt-get install libwebkitgtk-1.0.0" so that Hints and Welcome window use internal browser.


Installed jArchi plugin in the usual way and it all worked OK.

Try:

Help -> Reset to Defaults menu option.

If anyone else on Linux would like to try that would be very helpful.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Phil Beauvoir

You have the plugins there:

com.archimatetool.script_0.4.0.201808090947.jar
com.archimatetool.script.commandline_0.4.0.201808090947.jar
com.archimatetool.script.premium_0.4.0.201808090947.jar

So the installation process worked. So these are not showing up.

So, try the "Help" -> "Reset to Defaults" menu option.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

ubibene

> So, try the "Help" -> "Reset to Defaults" menu option.

That did not work , I cannot see the scripts manager window, nor any jarchi scripts related menu entries.  I'll have a look on M$ windows to see where they actually show up.


Phil Beauvoir

#12
If you do "Help -> About Archi -> Installation Details" you should see the plugins listed:

If this is not the case, ensure you have Archi 4.2 and try a clean Archi install.

If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

ubibene

My bad, I was using Archi 4.0 . Having Installed Archi 4.2, added "--add-modules=ALL-SYSTEM" to Archi. ini and installed the script plugin, all is working  now. Thanks for tour help !