[jbosstools-issues] [JBoss JIRA] (JBIDE-21199) AssertionFailedException invoking menu on a server.

Viacheslav Kabanovich (JIRA) issues at jboss.org
Tue Dec 8 10:35:01 EST 2015


    [ https://issues.jboss.org/browse/JBIDE-21199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13138500#comment-13138500 ] 

Viacheslav Kabanovich commented on JBIDE-21199:
-----------------------------------------------

Server  keeps runtime id, and has protected method resolve() that finds runtime object by id. There is a way to invoke it on all servers: 
{code}
ResourceManager.getInstance().resolveServers();
{code}
An IRuntimeLifecycleListener could just call it as a job on any change to runtimes. We have org.jboss.ide.eclipse.as.ui.actions.ServerManager that tracks changes to runtimes and servers. It might start such a job. 
The same problem takes place with project property 'Targeted Runtimes', which makes renaming Runtime in preferences a really messy thing.
I wonder why wtp servertools failed to do necessary updates in workspace at changes to runtimes.

> AssertionFailedException invoking menu on a server.
> ---------------------------------------------------
>
>                 Key: JBIDE-21199
>                 URL: https://issues.jboss.org/browse/JBIDE-21199
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 4.4.0.Alpha1
>            Reporter: Viacheslav Kabanovich
>            Assignee: Rob Stryker
>            Priority: Minor
>             Fix For: 4.3.1.Beta1, 4.4.0.Alpha1
>
>
> 1. Create a server with a JBoss runtime.
> 2. Make sure that context menu is invoked without exceptions.
> 3. Open Preferences/Server/Runtime Environments and rename the runtime environment bound to the server.
> 4. Invoke contex menu.
> Menu is opened, but there is logged exception:
> {code}
> !ENTRY org.eclipse.ui.navigator 4 2 2015-12-07 14:45:35.604
> !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.navigator".
> !STACK 0
> org.eclipse.core.runtime.AssertionFailedException: null argument:
> 	at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
> 	at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:73)
> 	at org.eclipse.core.runtime.Path.initialize(Path.java:641)
> 	at org.eclipse.core.runtime.Path.<init>(Path.java:238)
> 	at org.eclipse.core.runtime.Path.<init>(Path.java:186)
> 	at org.jboss.tools.as.core.server.controllable.subsystems.internal.LocalDeploymentOptionsController.makeRelative(LocalDeploymentOptionsController.java:44)
> 	at org.jboss.tools.as.core.server.controllable.subsystems.internal.LocalDeploymentOptionsController.getDeployFolder(LocalDeploymentOptionsController.java:68)
> 	at org.jboss.tools.as.core.server.controllable.systems.AbstractJBossDeploymentOptionsController.getDeploymentsRootFolder(AbstractJBossDeploymentOptionsController.java:78)
> 	at org.jboss.ide.eclipse.as.ui.subsystems.internal.LocalExploreBehavior.getPath(LocalExploreBehavior.java:105)
> 	at org.jboss.ide.eclipse.as.ui.subsystems.internal.LocalExploreBehavior.getDeployDirectory(LocalExploreBehavior.java:62)
> 	at org.jboss.ide.eclipse.as.ui.subsystems.internal.LocalExploreBehavior.canExploreServer(LocalExploreBehavior.java:81)
> 	at org.jboss.ide.eclipse.as.ui.subsystems.internal.LocalExploreBehavior.canExplore(LocalExploreBehavior.java:34)
> 	at org.jboss.tools.as.wst.server.ui.xpl.ExploreActionProvider.fillContextMenu(ExploreActionProvider.java:102)
> 	at org.eclipse.ui.navigator.NavigatorActionService$2.run(NavigatorActionService.java:225)
> 	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> 	at org.eclipse.ui.navigator.NavigatorActionService.addCommonActionProviderMenu(NavigatorActionService.java:219)
> 	at org.eclipse.ui.navigator.NavigatorActionService.fillContextMenu(NavigatorActionService.java:174)
> 	at org.eclipse.ui.navigator.CommonNavigatorManager.fillContextMenu(CommonNavigatorManager.java:267)
> 	at org.eclipse.ui.navigator.CommonNavigatorManager$3.menuAboutToShow(CommonNavigatorManager.java:283)
> 	at org.eclipse.jface.action.MenuManager.fireAboutToShow(MenuManager.java:333)
> 	at org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:466)
> 	at org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:461)
> 	at org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:493)
> 	at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:255)
> 	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
> 	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4481)
> 	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1327)
> 	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1351)
> 	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1332)
> 	at org.eclipse.swt.widgets.Menu._setVisible(Menu.java:198)
> 	at org.eclipse.swt.widgets.Display.runPopups(Display.java:3861)
> 	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3420)
> 	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
> 	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
> 	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
> 	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
> 	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
> 	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
> 	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
> 	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
> 	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139)
> 	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
> 	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
> 	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
> 	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
> 	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:497)
> 	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
> 	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
> 	at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
> 	at org.eclipse.equinox.launcher.Main.main(Main.java:1488)
> {code}
> I think we should prevent that exception.
> 5. Open the server in editor. Its 'Runtime Environment' is empty, which means that server lost connection to the renamed environment. Can we do something to prevent it, or is it an upstream issue, or is it an expected behavior?



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jbosstools-issues mailing list