Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modelio 4.1.0 fails to start on MacOS #12

Open
retorquere opened this issue Dec 7, 2020 · 33 comments
Open

Modelio 4.1.0 fails to start on MacOS #12

retorquere opened this issue Dec 7, 2020 · 33 comments

Comments

@retorquere
Copy link

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
@pascalpoizat
Copy link

pascalpoizat commented Jan 4, 2021

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 #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.

@jimjohan
Copy link

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.

@pascalpoizat
Copy link

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.

@retorquere
Copy link
Author

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.

@jimjohan
Copy link

@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
Copy link

@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.

@swpalmer
Copy link

swpalmer commented Jan 14, 2021 via email

@jimjohan
Copy link

@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
Copy link

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.

@etresoft
Copy link

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

@jimjohan
Copy link

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

@swpalmer
Copy link

swpalmer commented Jan 15, 2021

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

@Phillipus
Copy link

Regarding Big Sur, see my comment here #10 (comment)

@jimjohan
Copy link

@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.

@Phillipus
Copy link

Phillipus commented Jan 15, 2021

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.

@pascalpoizat
Copy link

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

@jimjohan
Copy link

jimjohan commented Feb 8, 2021

@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
Copy link

jimjohan commented Feb 15, 2021

@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.

@pascalpoizat
Copy link

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

@jimjohan
Copy link

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

@pascalpoizat
Copy link

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

Pascal

@jimjohan
Copy link

@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.

@lalligagger
Copy link

lalligagger commented Apr 17, 2021

@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.

@pascalpoizat
Copy link

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
Copy link

pascalpoizat commented Apr 17, 2021

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.

@lalligagger
Copy link

@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
Copy link

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!

@jimjohan
Copy link

jimjohan commented Apr 18, 2021 via email

@pascalpoizat
Copy link

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
Copy link

@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). :-(

@gryz
Copy link

gryz commented Jul 30, 2021

Could someone at Modelio comment as to where they are with their Mac efforts and where it fits on their roadmap? (Seeing as last update was April and now it's just about August).

@aosenkidu
Copy link

aosenkidu commented Jul 21, 2023

I'm pretty sure this has nothing to do with Apple and Big Sur. The error message is pretty clear, it can not load a class: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException

I mean: seriously? No one realised it is a "CLASS NOT FOUND!" Error? Obviously the class is not on the CLASSPATH.

How can that be? Well, you are running the application under Java > Version 8!! With Version 9, Java introduced the "Module System". The XML modules need to be "imported" to be on the CLASSPATH. There are some -XX (or similar) command line options to the JVM to make it include/import those modules.

That is absolutely not Mac specific, it is a problem of the JVM version and the transition to modules.

If I figure the option, I update here. I myself want to start Modelio from inside of the IDE: and I can not even figure what the main class is. It seems to be started in a super odd way.

If anyone has a hint for that, this would be appreciated.

@nickeverest99
Copy link

Hi, I need to have a version of modelio for my macbook for my thesis project, where can I find an older version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants