SonarQube Eclipse
  1. SonarQube Eclipse
  2. SONARIDE-290

NPE thrown by org.sonar.batch.components.RemoteProfileLoader.load during local analysis

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.4
    • Component/s: Local Mode
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Upon attempting to perform Sonar analysis "Locally" the Eclipse plug-in fails with an NPE. I have searched sonar-user and sonar-dev for other reports of such an error but there were none.

      • I'm using the Sonar plug-in version 2.3.0.20111209-1529.
      • I'm using Eclipse 3.7.1.
      • Stack trace...

      An internal error occurred during: "Sonar Analysis".
      java.lang.RuntimeException: java.lang.NullPointerException
      at org.sonar.batch.components.RemoteProfileLoader.load(RemoteProfileLoader.java:64)
      at org.sonar.batch.ProfileProvider.provide(ProfileProvider.java:36)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.picocontainer.injectors.MethodInjector.invokeMethod(MethodInjector.java:142)
      at org.picocontainer.injectors.MethodInjector.access$000(MethodInjector.java:38)
      at org.picocontainer.injectors.MethodInjector$2.run(MethodInjector.java:126)
      at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:274)
      at org.picocontainer.injectors.MethodInjector.decorateComponentInstance(MethodInjector.java:133)
      at org.picocontainer.injectors.CompositeInjector.decorateComponentInstance(CompositeInjector.java:58)
      at org.picocontainer.injectors.Reinjector.reinject(Reinjector.java:142)
      at org.picocontainer.injectors.ProviderAdapter.getComponentInstance(ProviderAdapter.java:96)
      at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:689)
      at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:638)
      at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:627)
      at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:105)
      at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)
      at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:76)
      at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:286)
      at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:312)
      at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:274)
      at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:341)
      at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
      at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
      at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
      at org.picocontainer.DefaultPicoContainer.instantiateComponentAsIsStartable(DefaultPicoContainer.java:1014)
      at org.picocontainer.DefaultPicoContainer.addAdapterIfStartable(DefaultPicoContainer.java:1006)
      at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:983)
      at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:746)
      at org.sonar.batch.Module.start(Module.java:88)
      at org.sonar.batch.ProjectModule.start(ProjectModule.java:107)
      at org.sonar.batch.SonarEclipseRuntime.analyse(SonarEclipseRuntime.java:41)
      at org.sonar.ide.eclipse.core.jobs.AnalyseProjectJob.run(AnalyseProjectJob.java:107)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
      Caused by: java.lang.NullPointerException
      at org.sonar.batch.components.RemoteProfileLoader.load(RemoteProfileLoader.java:53)
      ... 35 more

        Activity

        Hide
        David Gageot added a comment -

        Unable to reproduce

        Show
        David Gageot added a comment - Unable to reproduce
        Hide
        Freddy Mallet added a comment -

        Here are the steps to reproduce this issue :

        • Associate an eclipse project to a Sonar project
        • Delete the Sonar project from the Sonar server
        • Try to launch a local analysis of the eclipse project -> NullPointerException
        Show
        Freddy Mallet added a comment - Here are the steps to reproduce this issue : Associate an eclipse project to a Sonar project Delete the Sonar project from the Sonar server Try to launch a local analysis of the eclipse project -> NullPointerException
        Hide
        David Gageot added a comment -

        Now gives a proper error message.

        Show
        David Gageot added a comment - Now gives a proper error message.
        Hide
        Freddy Mallet added a comment -

        Manually tested !

        Show
        Freddy Mallet added a comment - Manually tested !

          People

          • Assignee:
            David Gageot
            Reporter:
            Simon Archer
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: