StorageException when opening files and a lack of sonarqube issues

2,973 views
Skip to first unread message

Mary Ellen Tie

unread,
Apr 6, 2016, 4:38:13 PM4/6/16
to SonarLint
Every time I open a file after setting up a sonarqube server, I'm getting the following exception in the console:

Error during analysis
org.sonarsource.sonarlint.core.client.api.connected.StorageException: Missing module data. Please update module 'sonarQubeProjectNameRemoved'.
    at org.sonarsource.sonarlint.core.container.storage.StorageGlobalContainer.analyze(StorageGlobalContainer.java:115)
    at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.analyze(ConnectedSonarLintEngineImpl.java:143)
    at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.analyze(ConnectedSonarLintEngineImpl.java:132)
    at org.sonarlint.eclipse.core.internal.server.Server.startAnalysis(Server.java:185)
    at org.sonarlint.eclipse.core.internal.jobs.AnalyzeProjectJob$1.run(AnalyzeProjectJob.java:397)

Then I try updating the project again and I get the error again the next time I open a file. No sonarqube issues are showing up in the SonarLint Issues tab.

In the log I'm getting "Unhandled event loop exception"

java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
    at org.sonarlint.eclipse.ui.internal.bind.BindProjectsPage.updateSelectedServer(BindProjectsPage.java:323)
    at org.sonarlint.eclipse.ui.internal.bind.BindProjectsPage.access$6(BindProjectsPage.java:302)
    at org.sonarlint.eclipse.ui.internal.bind.BindProjectsPage$6.widgetSelected(BindProjectsPage.java:282)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
    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:1329)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1353)
    at org.eclipse.swt.widgets.Widget.sendSelectionEvent(Widget.java:1467)
    at org.eclipse.swt.widgets.Link.gtk_button_release_event(Link.java:372)
    at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1960)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:5590)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4717)
    at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
    at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:9279)
    at org.eclipse.swt.widgets.Display.eventProc(Display.java:1225)
    at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
    at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2425)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3428)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:827)

Julien HENRY

unread,
Apr 7, 2016, 2:53:03 AM4/7/16
to SonarLint
Hi Mary,

Could you please check Eclipse error logs and provide the full stack trace if possible? Also could you have a look at the SonarLint console and report any error during the update process:

Thanks,

Julien
Message has been deleted

Mary Ellen Tie

unread,
Apr 7, 2016, 8:42:51 AM4/7/16
to SonarLint
No errors show up in the Console while updating the project.

However, it turns out the "Unhandled event loop exception" does show up during the error log during the update. The stacktrace is below


java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
    at org.sonarlint.eclipse.ui.internal.bind.BindProjectsPage.updateSelectedServer(BindProjectsPage.java:323)
    at org.sonarlint.eclipse.ui.internal.bind.BindProjectsPage.access$6(BindProjectsPage.java:302)
    at org.sonarlint.eclipse.ui.internal.bind.BindProjectsPage$6.widgetSelected(BindProjectsPage.java:282)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
    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:1329)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1353)
    at org.eclipse.swt.widgets.Widget.sendSelectionEvent(Widget.java:1467)
    at org.eclipse.swt.widgets.Link.gtk_button_release_event(Link.java:372)
    at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1960)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:5685)

    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4717)
    at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
    at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:9326)

    at org.eclipse.swt.widgets.Display.eventProc(Display.java:1225)
    at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
    at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2435)

    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3428)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:827)
    at org.eclipse.jface.window.Window.open(Window.java:803)
    at org.sonarlint.eclipse.ui.internal.command.BindProjectsCommand$1.run(BindProjectsCommand.java:73)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.sonarlint.eclipse.ui.internal.command.BindProjectsCommand.execute(BindProjectsCommand.java:70)
    at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:295)
    at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:90)
    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:56)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:252)
    at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:234)
    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:493)
    at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:486)
    at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:799)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.handleWidgetSelection(HandledContributionItem.java:675)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.access$7(HandledContributionItem.java:659)
    at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem$4.handleEvent(HandledContributionItem.java:592)

    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:1329)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3819)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3430)
    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:694)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:606)
    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:498)
    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)
Caused by: java.lang.reflect.InvocationTargetException
    at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:420)
    at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:1002)
    at org.sonarlint.eclipse.ui.internal.bind.BindProjectsPage.updateSelectedServer(BindProjectsPage.java:306)
    ... 68 more
Caused by: java.lang.IllegalStateException: Module sonarQubeProjectNameRemoved is associated to quality profile js-sonar-way-76988 that is not in storage. Server storage is probably outdated. Please update server.
    at org.sonarsource.sonarlint.core.container.connected.update.ModuleConfigUpdateExecutor.fetchProjectQualityProfiles(ModuleConfigUpdateExecutor.java:88)
    at org.sonarsource.sonarlint.core.container.connected.update.ModuleConfigUpdateExecutor.update(ModuleConfigUpdateExecutor.java:63)
    at org.sonarsource.sonarlint.core.container.connected.ConnectedContainer.updateModule(ConnectedContainer.java:88)
    at org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl.updateModule(ConnectedSonarLintEngineImpl.java:242)
    at org.sonarlint.eclipse.core.internal.server.Server.update(Server.java:208)
    at org.sonarlint.eclipse.ui.internal.bind.BindProjectsPage$8.run(BindProjectsPage.java:311)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)

Julien HENRY

unread,
Apr 7, 2016, 8:47:25 AM4/7/16
to SonarLint
OK, that's interesting. Could you please trigger a complete update in SonarQube Servers view:


This should fix your issue.


I'll try to understand how you come to this situation.


++


Julien

Mary Ellen Tie

unread,
Apr 7, 2016, 9:59:13 AM4/7/16
to SonarLint
When I tried that, I got this error:

Unable to update data from server 'sonarqube'

Module sonarQubeProjectNameRemoved is associated to quality profile js-sonar-way-76988 that is not in storage. Server storage is probably outdated. Please update server.

Julien HENRY

unread,
Apr 7, 2016, 10:09:16 AM4/7/16
to Mary Ellen Tie, SonarLint
OK, so could you:
  - give me the version of your SonarQube server
  - try to execute the following query on your server (you can type it in your web browser) and see if you get some results:
https://<your_sonarqube_server>/api/rules/search?f=repo,name,severity,lang,internalKey,isTemplate,templateKey,htmlDesc,mdDesc,actives&statuses=BETA,DEPRECATED,READY&activation=true&qprofile=js-sonar-way-76988



--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/fd7c0c98-81f7-472c-ad5f-26c445c4da6c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Mary Ellen Tie

unread,
Apr 7, 2016, 10:13:10 AM4/7/16
to SonarLint, mef...@gmail.com
The sonarqube version is 5.4 and then I pasted the URL to my browser changing the sonarqube server and got:

{"total":0,"p":1,"ps":100,"rules":[],"actives":{},"qProfiles":{}}

Julien HENRY

unread,
Apr 7, 2016, 10:35:16 AM4/7/16
to SonarLint, Mary Ellen Tie
I reproduced the issue. This is because your JavaScript quality profile is empty (no rules are enabled). The Sonar Way quality profile is not supposed to be empty so I guess this is a result of a broken migration.
You can fix that by restoring built-in quality profiles in SonarQube server:
Images intégrées 1

Then you should be able to update data in SonarLint without error.

I don't expect empty quality profiles to be a real life use case, but FYI I have created a ticket:

Many thanks for the feedback!

Reply all
Reply to author
Forward
0 new messages