Closed bisc closed 6 years ago
Tried the same build of Oxygen on an older commit (409dc092480eec6ce3c685d8bcaa3496d6c23071, Sep 12), got same erroneous behavior.
I also know that OSATE commit 274b1ced2 (Jul 31) does NOT have this behavior with Eclipse Neon 4.6.3.
What do you mean by "The only seemingly relevant system package is Google Guice version 4.0."? Also, did you use the eclipse installer to install oxygen as described on osate.org?
Re Guice, I noticed that my system has 4.0 installed, and the latest version is 4.1. If you all are using 4.1, it is plausible that these issues might be because of 4.0. (It's not trivial for me to update it now, so I didn't experiment.)
I was downloading the modeling tools version directly from here and doing import->oomph->projects into workspace (then I put the oomph file URL from osate.org). Let me try the installer (didn't realize they had one for linux too) and report on that.
I'm concerned about the system package part. Xtext uses guice 3.0. You need to make sure that guice 4.0 is not visible to osate, e.g., it shouldn't be installed in jre/lib/ext.
Thanks for pointing this out. Looks like my system's guice is sitting in /usr/share/java and is not visible to eclipse's version of java (which sits in /usr/lib/jvm). Furthermore, if I dig into e.g. org.osate.xtext.aadl2 in the package explorer, I can see com.google.inject_3.0.0.v201312141243.jar under the Plugin Dependencies -- and no guice under JRE System Library. So things seem in order here. Had Eclipse been linking to a wrong Guice, it would've been an issue on Neon as well.
I did the installer procedure exactly as described on osate.org. Getting exactly the same behavior and errors on this version too :(
The NPE should go away as soon as you close all open editors and create an AADL project.
Indeed! Whenever the previous session ended without editors, all the behavior is normal. But should I leave any editor open while closing Eclipse, the injector exceptions come up in the next launch.
Thanks for looking into this. The issue is more isolated than I thought, but I'll still wait to update till this is resolved.
As soon as you have an AADL project in the workspace it is no longer necessary to close the editors. The error only occurs when you open a contributed file in an empty workspace.
That's not the behavior I'm seeing.
I see a NoClassDefFoundError, so this looks like a different issue. Does this also happen on a fresh workspace if you create an AADL project before trying to open a contributed aadl file?
That may or may not be a different issue, but those NoClassDefFounds occurred all the way along the various setups that I've tried. There is a bunch of them in stacktrace3.txt that I've posted in the original issue text. I am pretty used to seeing that with ContributedAadlStorage by now.
Just tried fresh workspace->create project->create file->open file->close eclipse->open eclipse. Same errors with long exception logs; here's the new tracefile (looks pretty much the same to me) issue-injectors-in-oxygen-stacktrace4.txt
I have a fix for one NPE that causes the text editor to crash when there is no project in the workspace. That's the only issue I could reproduce. I suspect that your development setup is somehow messed up. You could try to start from scratch: Delete eclipse, workspaces, and maybe also cloned git repos. Delete directories named *.oomph.* in $HOME/.eclipse/ to get rid of any cached information. Delete the bundle pool $HOME/.p2; or create a new bundle pool in the installer if you have other eclipse installation that use the existing bundle pool. Then run the installation steps again.
These are good steps, didn't know where cached bundles were. Unfortunately, even with a fresh bundle pool, deleted .eclipse, and a new installer, I'm having the same errors.
I'm going to try it on a different system and report back. Thanks for your help so far!
Surprisingly, I managed to reproduce this bug in a completely new OS (Ubuntu 17.04 x64) & hardware setup. Here's how it goes:
I wonder if this procedure would reproduce the errors -- and if there is more external state to the eclipse/osate installation that I'm failing to delete.
You cause the issue by closing too many projects. Open at least org.osate.ge and org.osate.ge.diagram.
Wow, you're right! Opened most GE projects and the errors went away, on both platforms.
It is quite surprising though that there is some implicit dependency from core to GE. Perhaps it could be called out in the docs...
Thanks so much for your help! Feel free to close.
Summary: I am trying to update my OSATE2 dev build to Eclipse Oxygen, but the standard setup of OSATE2 crashes when I try to open AADL files or use the Navigator. (None of that took place in Eclipse Neon 4.6.3 with OSATE 2.2.2.)
Setup:
(Actually I tried manually installing a minimal set of packages, like xtext 2.12, on a different copy Eclipse Oxygen, and the same errors as below showed up, so I wouldn't blame the oomph script -- this version or in general.)
Steps to reproduce issues:
Error in custom provider, java.lang.NullPointerException [...] com.google.inject.CreationException: Guice creation errors: [...] java.lang.RuntimeException: Failed to create injector fororg.osate.xtext.aadl2.properties.Properties [...] Failed to create injector for org.osate.xtext.aadl2.properties.Properties [...] Failed to create injector for org.osate.xtext.aadl2.Aadl2
I wonder if I missed a necessary manual change in terms of injection when updating to OSATE2.3.0 or Eclipse Oxygen.