SonarLint - Null Pointer Exception - Unable to open Rule Description Web View

411 views
Skip to first unread message

pons...@gmail.com

unread,
Mar 30, 2017, 1:57:24 AM3/30/17
to SonarLint
Hi,

Im using Eclipse Oxygen and JDK 1.8 in Windows OS.
I have build SonarLint from "sonarlint-eclipse-master" (3.0.0-Snapshot) Github branch.

SonarLint Analysis is successful and issues are listed in "SonarLint On-the-Fly" view.
But when I right-click on Issue and open "Rule Description" I got the below NullPointerException with error message "Unable to open Rule Description Web View".


NPE occurred in Line #71 of org.sonarlint.eclipse.ui.internal.views.RuleDescriptionWebView.open() method. 'issuable' object is null.

     ISonarLintIssuable issuable = element.getResource().getAdapter(ISonarLintIssuable.class);
     
ISonarLintProject p = issuable.getProject();


Can you let me know what could be causing this error?

Unable to open Rule Description Web View
java.lang.NullPointerException
at org.sonarlint.eclipse.ui.internal.views.RuleDescriptionWebView.open(RuleDescriptionWebView.java:71)
at org.sonarlint.eclipse.ui.internal.views.RuleDescriptionWebView.open(RuleDescriptionWebView.java:1)
at org.sonarlint.eclipse.ui.internal.views.AbstractLinkedSonarWebView.setInput(AbstractLinkedSonarWebView.java:198)
at org.sonarlint.eclipse.ui.internal.command.ShowRuleDescriptionCommand.execute(ShowRuleDescriptionCommand.java:33)
at org.sonarlint.eclipse.ui.internal.command.AbstractIssueCommand.execute(AbstractIssueCommand.java:67)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:291)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:92)
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:498)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:305)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:239)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:494)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:431)
at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.handleWidgetSelection(AbstractContributionItem.java:446)
at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.lambda$2(AbstractContributionItem.java:472)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4431)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4241)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3820)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1145)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1034)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
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:388)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
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:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
at org.eclipse.equinox.launcher.Main.main(Main.java:1472)
Enter code here...


Julien HENRY

unread,
Mar 30, 2017, 3:30:25 AM3/30/17
to Suresh P, SonarLint
Hi Suresh,

This issue was already fixed by this commit:

Please check you are using up to date master.

++

Julien

--
You received this message because you are subscribed to the Google Groups "SonarLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/9a2912f5-2000-4a68-b4a1-b7fc4ac21235%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

pons...@gmail.com

unread,
Mar 30, 2017, 6:24:56 AM3/30/17
to SonarLint, pons...@gmail.com
Thanks Julien.

With the latest 'master' code, this issue is resolved now.

Regards
Suresh
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages