Modelio icon indicating copy to clipboard operation
Modelio copied to clipboard

Modelio 4.1.0 fails to start on MacOS

Open retorquere opened this issue 4 years ago • 33 comments

I'm on big sur if that matters; I've just downloaded and during start it says "an error has occurred" pointing to a log, which says

eclipse.buildId=unknown
java.version=12.0.1
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_GB
Framework arguments:  -clearPersistedState -keyring /Users/emile/.eclipse_keyring
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -clearPersistedState -keyring /Users/emile/.eclipse_keyring

!ENTRY org.eclipse.core.net 1 0 2020-12-07 16:27:53.602
!MESSAGE System property http.nonProxyHosts has been set to local|*.local|169.254/16|*.169.254/16 by an external source. This value will be overwritten using the values from the preferences

!ENTRY org.eclipse.osgi 4 0 2020-12-07 16:27:54.164
!MESSAGE Application error
!STACK 1
java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
  at org.modelio.gproject.module.catalog.ModuleXmlExtractor.extractModuleXmlContent(ModuleXmlExtractor.java:167)
  at org.modelio.gproject.module.catalog.ModuleXmlExtractor.getModuleHandle(ModuleXmlExtractor.java:264)
  at org.modelio.gproject.module.catalog.FileModuleStore$FileModuleStoreEntry.getModuleHandle(FileModuleStore.java:523)
  at org.modelio.gproject.module.catalog.FileModuleStore.installModuleArchive(FileModuleStore.java:241)
  at org.modelio.app.ui.lifecycle.OsLifeCycleManager.deliverMdaStoreModules(OsLifeCycleManager.java:302)
  at org.modelio.app.ui.lifecycle.OsLifeCycleManager.initModulesCatalog(OsLifeCycleManager.java:329)
  at org.modelio.app.ui.lifecycle.OsLifeCycleManager.postContextCreate(OsLifeCycleManager.java:171)
  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.base/java.lang.reflect.Method.invoke(Method.java:567)
  at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
  at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:320)
  at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:248)
  at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:139)
  at org.eclipse.e4.ui.internal.workbench.swt.E4Application.lambda$0(E4Application.java:242)
  at java.base/java.util.Optional.ifPresent(Optional.java:183)
  at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:238)
  at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:152)
  at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:199)
  at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
  at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
  at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:391)
  at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:246)
  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.base/java.lang.reflect.Method.invoke(Method.java:567)
  at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
  at org.eclipse.equinox.launcher.Main.basicRun(Main.java:595)
  at org.eclipse.equinox.launcher.Main.run(Main.java:1501)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBException cannot be found by org.modelio.core.project.data_4.1.0.202009140500
  at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:511)
  at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
  at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:414)
  at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:153)
  at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
  ... 31 more

retorquere avatar Dec 07 '20 15:12 retorquere

Hello

UPDATE 2: Used https://www.modelio.org/forum/8-installation/3962-running-modelio-on-a-macos-x-workstation.html. It works. You just have to copy fixModelio40.sh to fixModelio41.sh (and update Modelio path inside), put it in /Applications and run it from there. UPDATE 1: just seen https://github.com/ModelioOpenSource/Modelio/issues/3. I will try using what is proposed there.

You may have a too recent Java version (JAXB not found). Going back to Java 8 (I was using Java 15) I could launch it. However, it then asked me to install Java 6 legacy runtime. I tried to install it but the installer told me I already have a more recent version on my computer (I have a lot of versions on my mac, 1.8, 12, 14 and 15 and I use jenv to switch from one another). So I am also stuck now.

pascalpoizat avatar Jan 04 '21 14:01 pascalpoizat

I tried the script as well as a manual update of the modelio.io file and it did not work for me. I also shared similar information on the modeliol.org forums via the following two links.

https://www.modelio.org/forum/8-installation/4797-after-run-modelio-i-get-alert-java-lang-nullpointerexception-java-lang-nullpoint.html#6290 https://www.modelio.org/forum/8-installation/4801-modelio-4-1-on-mac-os-big-sur.html#6291

I believe both the info.plist in the Eclipse folder and modelio.io in the MacOS folder are pointing to the java 1.8 jdk location /Library/Java/JavaVirtualMachines/jdk1.8.0_271.jdk/Contents/Home

In the modelio.ini it is right after -clearPersistedState as follows

-vm /Library/Java/JavaVirtualMachines/jdk1.8.0_271.jdk/Contents/Home/bin/java

In info.plist it is listed in the Eclipse section as follows

<key>Eclipse</key>
	<array>	<string>-vm</string> 
             <string>/Library/Java/JavaVirtualMachines/jdk1.8.0_271.jdk/Contents/Home/bin/java</string>			
                        <string>-keyring</string>
   <string>~/.eclipse_keyring</string>
	</array>

In the modelio log file it first starts producing a NullPointerException here:

2021-01-09 04:16:07,610 INFO LogService - Running batch: project=null create=false workspace=null 2021-01-09 04:16:46,971 ERROR LogService - Unhandled exception caught by SWT: java.lang.NullPointerException

It is not clear to me what to try next.

jimjohan avatar Jan 14 '21 17:01 jimjohan

Hello @jimjohan

what you experienced is interesting. I spent 30 min today with a student of mine, having him install things (JDK 8), set up JAVA_HOME in his .zshenv file, etc. In the end he got the same problem than you (a null pointer exception). He also installed JDK 1.8.0 271 on Big Sur (after upgrading his mac from Catalina to Big Sur he told me he experienced issues with several IDEs and a DB manager). When I look at mine I have still Catalina and JDK 1.8.0.201 setup in Modelio config but oracle64-15.0.1 as my machine level JDK.

pascalpoizat avatar Jan 14 '21 18:01 pascalpoizat

That procedure is certainly going to be beyond what most of the data modelers in our team could get done. Isn't it possible to download a modelio with the required jre bundled and set up for use? An extra jre isn't that much disc space.

retorquere avatar Jan 14 '21 19:01 retorquere

@retorquere - Your suggestion of having the Mac installer include its own embedded jre is an excellent suggestion and I hope that happens in the future. If there is something I can do to help out on that let me know. I think the embedded jre is what is done for the Windows installer, and I think it may also be the case for the Linux installer (at least the Debian version).

jimjohan avatar Jan 14 '21 19:01 jimjohan

@pascalpoizat - Thank you for the useful insights. Perhaps we are shaking the tree enough and slowly figuring out what is going on. The fact there seems to be a common issue for several IDEs and a DB manager, may suggest there is something going on with Big Sur. I am not sure how to troubleshoot within the OS or discern what the difference is between Catalina and Big Sur.

Doing a search for "big sur java 8 support" I found this post in an apple developer forum: https://developer.apple.com/forums/thread/655774 and I saw a few interesting comments:

@swpalmer "Note that Big Sur breaks the previous behaviour of the JAVA_HOME environment variable to pick the Java version used to run the command-line tools. If this matters to you, consider filing an bug report."

@Etresoft "What directory are you in? Java works fine here, but not in a restricted directory like Downloads. If I move to /tmp, then everything works as expected."

If Big Sur changes what JAVA_HOME does there may be a need to do some kind of patch in modelio. If multiple apps experience it there may be a short term fix to get it operational and maybe in a future Big Sur release Apple will provide some better resolution.

jimjohan avatar Jan 14 '21 20:01 jimjohan

My information quoted here is a bit stale. JAVA_HOME still works, but the /usr/libexec/java_home tool works differently. If JAVA_HOME is set to a valid JDK, the java_home tool just returns what it is set to, regardless of the -v option passed. If it is set to an invalid JDK folder, the java_home tool fails. For these reasons, code that uses the java_home tool to pick a value for the JAVA_HOME environment variable may fail on Big Sur when it worked on previous version of macOS. The work-around is to unset JAVA_HOME before using the java_home tool.

Regards, Scott

On Jan 14, 2021, at 3:07 PM, jimjohan [email protected] wrote:

 @pascalpoizat - Thank you for the useful insights. Perhaps we are shaking the tree enough and slowly figuring out what is going on. The fact there seems to be a common issue for several IDEs and a DB manager, may suggest there is something going on with Big Sur. I am not sure how to troubleshoot within the OS or discern what the difference is between Catalina and Big Sur.

Doing a search for "big sur java 8 support" I found this post in an apple developer forum: https://developer.apple.com/forums/thread/655774 and I saw a few interesting comments:

@swpalmer "Note that Big Sur breaks the previous behaviour of the JAVA_HOME environment variable to pick the Java version used to run the command-line tools. If this matters to you, consider filing an bug report."

@etresoft "What directory are you in? Java works fine here, but not in a restricted directory like Downloads. If I move to /tmp, then everything works as expected."

If Big Sur changes what JAVA_HOME does there may be a need to do some kind of patch in modelio. If multiple apps experience it there may be a short term fix to get it operational and maybe in a future Big Sur release Apple will provide some better resolution.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

swpalmer avatar Jan 14 '21 21:01 swpalmer

@swpalmer - Thank you for the helpful information. If you have enough insight into modelio, is there anyway to adapt the start up routine without rebuilding the whole program to address the java_home issue you flagged?

jimjohan avatar Jan 14 '21 22:01 jimjohan

In an attempt to try to answer my own question I downloaded the modelio source and looked for all the places jave_home occurred. The only place it comes up is in the Eclipse info.plist file. I deleted the specific location where I had the file and replaced it with

grep -lr java_home /Downloads/Modelio-master/* /Downloads/Modelio-master/dev-platform/rcp-target/rcp- eclipse/eclipse/features/org.eclipse.equinox.executable_3.8.100.v20180827-1352/bin/cocoa/macosx/x86_64/Eclipse.app/Contents/Info.plist

Looking at my log file more carefully and thinking on where java_home might be invoked and cause an error perhaps the issue still is within the use of eclipse. Here is an excerpt from my log file showing that it is running Main.java when it generates an error

at org.eclipse.equinox.launcher.Main.run(Main.java:1501) 2021-01-09 04:16:03,740 INFO l.w.PluginLogger - Changing log level from ERROR to INFO 2021-01-09 04:16:03,787 INFO LogService - Modelio by modelio.org 2021-01-09 04:16:03,799 INFO LogService - Modelio version : '4.1.00' 2021-01-09 04:16:03,799 INFO LogService - Modelio runtime data path : '/Users//.modelio/4.1' 2021-01-09 04:16:03,799 INFO LogService - Modelio module catalog path: '/Users//.modelio/4.1/modules' 2021-01-09 04:16:03,799 INFO LogService - Modelio macro catalog path: '/Users//.modelio/4.1/macros' 2021-01-09 04:16:03,800 INFO LogService - Instance location: file:/Users//.modelio/4.1/opensource-cache/data/ 2021-01-09 04:16:03,800 INFO LogService - Command line arguments = '-clearPersistedState -vm /Library/Java/JavaVirtualMachines/jdk1.8.0_271.jdk/Contents/Home/bin/ ' 2021-01-09 04:16:04,053 INFO LogService - Trusted server certificates store is '/Users//.modelio/4.1/servercerts.db' 2021-01-09 04:16:05,737 INFO LogService - SWAP is ENABLED 2021-01-09 04:16:06,270 INFO LogService - Changing workspace to: /Users//modelio/workspace 2021-01-09 04:16:07,610 INFO LogService - Running batch: project=null create=false workspace=null 2021-01-09 04:16:46,971 ERROR LogService - Unhandled exception caught by SWT: java.lang.NullPointerException

Trying to look around for this file I found this information on the Equinox Framework https://www.eclipse.org/equinox/framework/

Java Launcher (org.eclipse.equinox.launcher)This helps setup the framework classloader and launches the Framework etc. Note: this code used to be included in the startup.jar and has be moved from its old location in the org.eclipse.platform project. See bug 113069 for more details.

I will keep exploring, but also appreciate other folk's comments.

jimjohan avatar Jan 15 '21 00:01 jimjohan

@jimjohan Please don't go trolling the internet and tagging random people. That's not cool.

etresoft avatar Jan 15 '21 01:01 etresoft

My apologies if I referenced the wrong person, this was not my intent.

jimjohan avatar Jan 15 '21 02:01 jimjohan

After following the instructions at https://www.modelio.org/forum/8-installation/3962-running-modelio-on-a-macos-x-workstation.html it "launches" for me on Big Sur... but then quickly reports a NPE and most actions that I attempted fail with the same NPE message. But the main GUI is showing something, though things are clearly very broken... Screen Shot 2021-01-14 at 11 18 00 PM Screen Shot 2021-01-14 at 11 20 53 PM

swpalmer avatar Jan 15 '21 04:01 swpalmer

Regarding Big Sur, see my comment here https://github.com/ModelioOpenSource/Modelio/issues/10#issuecomment-760887923

Phillipus avatar Jan 15 '21 11:01 Phillipus

@Phillipus Thank you for your comments and wonderful suggestions. The fact this issue is coming up in multiple threads indicates to me it is coming up for a variety of individuals. Updating the Eclipse dependency and including a self contained jre seems like the way to got, and I believe will make it match the Windows and Linux installers.

Do you want to formally suggest the change to the modelio developers (which may include you, but I do not know)? I can help if you like.

jimjohan avatar Jan 15 '21 13:01 jimjohan

Do you want to formally suggest the change to the modelio developers (which may include you, but I do not know)? I can help if you like.

@jimjohan I am not affiliated in any way with Modelio. Perhaps it would be better if the Modelio devs responded to their users rather than me having to explain why their stuff doesn't work on Mac.

Phillipus avatar Jan 15 '21 13:01 Phillipus

Hello, I do not know if it may help but I forked and updated (modelio 4.1.0, no need to use UID/GID, no display issues I had with the original version) a docker version of Modelio. See : https://github.com/pascalpoizat/docker-modelio

pascalpoizat avatar Jan 26 '21 21:01 pascalpoizat

@pascalpoizat, thank you for your innovative workaround. I hope there could be a native fix in the near term, but COVID-19 is slowing things down. I just upgraded to Big Sur 11.2, hoping this might help, but nothing changed. Modelio and other things still do not work.

It looks like your optional build isolates modelio to work in a separate X window. This sounds interesting, and XQuartz reminds me of what was required to run a different legacy application in the past. This is something I will try to use, as long as it does not open any vulnerabilities. I will try it first on a test machine.

Thank you.

jimjohan avatar Feb 08 '21 17:02 jimjohan

@pascalpoizat, Over the weekend, I tried your solution you recommended at https://github.com/pascalpoizat/docker-modelio, and it worked perfectly in an X window with Big Sur. I will share this option with students in my class. Thank you.

jimjohan avatar Feb 15 '21 01:02 jimjohan

Hello @jimjohan , I am happy it works for you. Please note that one of my students told me it did not work on his configuration (I have not investigated more, but maybe the best is to ask your students to try at least 1 week before the beginning of your lectures). Also (for all readers) please note that I only made some updates to an existing docker file + following advices found on the net (references are in the README) so most of the thanks goes to them. Cheers, Pascal

pascalpoizat avatar Feb 15 '21 07:02 pascalpoizat

@pascalpoizat I, unfortunately, had the same thing happen. Modelio worked within the Docker environment, and then it stopped.

jimjohan avatar Mar 10 '21 13:03 jimjohan

Hello @jimjohan did it stopped working (ie one launches the container and it fails) or did it stopped while working (Modelio crashes)?

Pascal

pascalpoizat avatar Mar 11 '21 17:03 pascalpoizat

@pascalpoizat When I launched the container it failed to start. Initially, it worked but then it stopped. I am not sure if this is a Docker issue or XQuartz issue. Thank you for your help. As an aside, I also tried CodeWeavers and the Win10 install. It launches and has basic functionality but for complex models it fails.

jimjohan avatar Mar 11 '21 17:03 jimjohan

@pascalpoizat - Thanks for your help here, unfortunately I am getting an error when launching run.sh

An error has occurred. See the log file /home/developer/.modelio/4.1/opensource-cache/conf/1618687427289.log

This comes up in a pop-up with a "Modelio" header.

lalligagger avatar Apr 17 '21 19:04 lalligagger

Hi @lalligagger (I have also seen that @jimjohan found that it does not work anymore). Just tried again, it launches and I could create a basic model (I did not tried to generate jar + run it). The versions I have :

  • macOS 10.15.7
  • XQuartz 2.7.11
  • Docker Desktop 3.2.2 @lalligagger if it is not private, could you paste the log here?

pascalpoizat avatar Apr 17 '21 19:04 pascalpoizat

I will try running again the process from Setup / step 6 in https://github.com/pascalpoizat/docker-modelio/blob/master/README.md (it takes some time downloading Modelio on my poor Internet connection). update -> still works and I could run a jar file.

pascalpoizat avatar Apr 17 '21 19:04 pascalpoizat

@pascalpoizat thanks for the quick reply! This is actually my first time getting a Docker container built. If you let me know what to add to the Dockerfile (?) to print logs/ save locally I will attach here.

lalligagger avatar Apr 17 '21 20:04 lalligagger

I just got as far as the splash screen by rolling back to version 4.0.1 in the download path. I'll count that as progress for now!

lalligagger avatar Apr 17 '21 22:04 lalligagger

It is unfortunate that the BigSur install of both Modelio Open Source and Modelo SA do not work and there is no ETA when a fix will be made. On the other hand Apple created a new Big Sur MacOS that breaks many applications, and this is just one example.

On Sat, Apr 17, 2021 at 3:44 PM lalligagger @.***> wrote:

I just got as far as the splash screen by rolling back to version 4.0.1 in the download path. I'll count that as progress for now!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ModelioOpenSource/Modelio/issues/12#issuecomment-821897655, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF4YC4GBWRZXVQM7OLYGSTLTJIFNVANCNFSM4UQTZS4A .

jimjohan avatar Apr 18 '21 14:04 jimjohan

Hello @lalligagger the container should use your local file system to put model and log files. Is it there: /home/developer/.modelio/4.1/opensource-cache/conf/1618687427289.log ?

pascalpoizat avatar Apr 19 '21 11:04 pascalpoizat

@jimjohan Apple big upgrades are sometimes problematic. Indeed for this one (and Catalina before) our system engineers have warned us at the lab to wait before upgrading. Indeed when I finally moved to Catalina ... I lost my internal Webcam (just before an offline lecture session, very practical indeed). :-(

pascalpoizat avatar Apr 19 '21 11:04 pascalpoizat