osate/osate2-core — Issue #35: Develop branch relies on guava libraries which are not included
Author: sprocter
Created: 2012-01-24 22:57:06+00:00
State: open

### Summary

The develop branch seems to rely on Google's guava libraries, which are not included. I tried adding the current version of the library to the build path, which lets it compile but I still cannot open an editor for a .aadl file. Instead, I am given the following error:

> Could not open the editor: The editor class could not be instantiated. This usually indicates a missing no-arg constructor or > that the editor's class name was mistyped in plugin.xml.

The full stack trace is:

> org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle org.osate.xtext.aadl2.ui (510).
>	at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:122)
>	at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:462)
>	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
>	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
>	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:476)
>	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
>	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
>	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
>	at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
>	at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:345)
>	at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:229)
>	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1207)
>	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:174)
>	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
>	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
>	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
>	at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugin.java:268)
>	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
>	at org.eclipse.ui.internal.WorkbenchPlugin.createExtension(WorkbenchPlugin.java:264)
>	at org.eclipse.ui.internal.registry.EditorDescriptor.createEditor(EditorDescriptor.java:235)
>	at org.eclipse.ui.internal.EditorManager.createPart(EditorManager.java:875)
>	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:609)
>	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
>	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
>	at org.eclipse.ui.internal.EditorAreaHelper.setVisibleEditor(EditorAreaHelper.java:271)
>	at org.eclipse.ui.internal.EditorManager.setVisibleEditor(EditorManager.java:1459)
>	at org.eclipse.ui.internal.EditorManager$5.runWithException(EditorManager.java:972)
>	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
>	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
>	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
>	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3563)
>	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3212)
>	at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
>	at org.eclipse.ui.internal.Workbench$33.runWithException(Workbench.java:1595)
>	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
>	at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180)
>	at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150)
>	at org.eclipse.swt.widgets.Display.syncExec(Display.java:4330)
>	at org.eclipse.ui.internal.StartupThreading.runWithoutExceptions(StartupThreading.java:94)
>	at org.eclipse.ui.internal.Workbench.init(Workbench.java:1590)
>	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2623)
>	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
>	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
>	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
>	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
>	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
>	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
>	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
>	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
>	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
>	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
>	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
>	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>	at java.lang.reflect.Method.invoke(Method.java:616)
>	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
>	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
>	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
>	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
> Caused by: org.osgi.framework.BundleException: The activator org.osate.xtext.aadl2.ui.MyAadl2Activator for bundle org.osate.xtext.aadl2.ui is invalid
>	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:171)
>	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:679)
>	at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
>	at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:299)
>	at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
>	at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:268)
>	at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
>	... 59 more
> Caused by: java.lang.NoSuchMethodError: com.google.common.base.Objects.firstNonNull(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
>	at com.google.common.cache.CacheBuilder.getKeyStrength(CacheBuilder.java:472)
>	at com.google.common.cache.LocalCache.(LocalCache.java:236)
>	at com.google.common.cache.LocalCache$LocalManualCache.(LocalCache.java:4750)
>	at com.google.common.cache.LocalCache$LocalLoadingCache.(LocalCache.java:4858)
>	at com.google.common.cache.CacheBuilder.build(CacheBuilder.java:739)
>	at org.osate.xtext.aadl2.ui.internal.Aadl2Activator.(Aadl2Activator.java:32)
>	at org.osate.xtext.aadl2.ui.MyAadl2Activator.(MyAadl2Activator.java:14)
>	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
>	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>	at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
>	at java.lang.Class.newInstance0(Class.java:372)
>	at java.lang.Class.newInstance(Class.java:325)
>	at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:166)
>	... 65 more

### Reproduction steps:
1) Install OSATE from the development branch
2) Resolve compilation errors with guava-11.0.1.jar in org.osate.xtext.aadl2.properties.ui, org.osate.xtext.aadl2.propertyset.ui, and org.osate.xtext.aadl2.ui.
3) Launch OSATE, open an .aadl file for editing via the navigator.

### Expected result:
The .aadl file is opened for editing.

### Actual result:
The above error is generated.