SonarQube
  1. SonarQube
  2. SONAR-651

Findbugs plugin throws a StackOverflow exception (Infinite Recursion)

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: 1.9.1
    • Component/s: None
    • Labels:
      None
    • Environment:
      Maven 2.0.9, Sonar 1.6
    • Number of attachments :
      0

      Description

      If for any reasons some classes are missing in the target/classes directory, I get the following exception :

      [ERROR] Cannot execute the command org.codehaus.mojo:findbugs-maven-plugin::findbugs
      java.lang.StackOverflowError
              at java.lang.Exception.<init>(Exception.java:77)
              at java.lang.reflect.InvocationTargetException.<init>(InvocationTargetException.java:54)
              at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke(ReflectionMetaMethod.java:52)
              at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:714)
              at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:583)
              at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:476)
              at org.codehaus.groovy.runtime.Invoker.invokePojoMethod(Invoker.java:104)
              at org.codehaus.groovy.runtime.Invoker.invokeMethod(Invoker.java:77)
              at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:85)
              at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:158)
              at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod0(ScriptBytecodeAdapter.java:182)
              at org.codehaus.mojo.findbugs.XDocsReporter.reportMissingClass(XDocsReporter.groovy:255)
              at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke(ReflectionMetaMethod.java:52)
              at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:714)
              at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:583)
              at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:118)
              at org.codehaus.mojo.findbugs.XDocsReporter.reportMissingClass(XDocsReporter.groovy:256)
              at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke(ReflectionMetaMethod.java:52)
              at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:714)
              at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:583)
              at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:118)
              at org.codehaus.mojo.findbugs.XDocsReporter.reportMissingClass(XDocsReporter.groovy:256)
              at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:2
      

      This bug seems to be related to MFINDBUGS-56 which is fixed in Maven Findbugs plugin version 2.0 (not yet released).

      Here is a simple way to reproduce this bug :

      • Compile a project
      • Launch Sonar Maven plugin to check that all is ok
      • Delete the same package directory in the source and target/classes directories
      • Launch again Sonar Maven pluging and you should get the exception

        Issue Links

          Activity

          Hide
          Harald Gross added a comment -

          In my environment this bug is related to the listed Maven Findbugs Plugin. This plugin has already been released.

          The class FindbugsMavenPluginHandler would have to be ammended in two lines.

          1) getVersion has to return "2.0"

          2) The direct dependency to findbugs, added in configurePlugin has to be removed. If this dependency is in place, I got errors from findbugs about missing environment setting FINDBUGS_HOME. In my opinion this dependency should be removed in any case, as the findbugs plugin should name the dependency.

          I would be great to include this fix for release 1.8, as this bug prevents the usage of sonar on some of our projects in our live environment.

          Show
          Harald Gross added a comment - In my environment this bug is related to the listed Maven Findbugs Plugin. This plugin has already been released. The class FindbugsMavenPluginHandler would have to be ammended in two lines. 1) getVersion has to return "2.0" 2) The direct dependency to findbugs, added in configurePlugin has to be removed. If this dependency is in place, I got errors from findbugs about missing environment setting FINDBUGS_HOME. In my opinion this dependency should be removed in any case, as the findbugs plugin should name the dependency. I would be great to include this fix for release 1.8, as this bug prevents the usage of sonar on some of our projects in our live environment.
          Hide
          Patric Rufflar added a comment -

          I encountered the same issue.
          So for now, we cannot use Sonar in combination with findbugs in our company.

          Is there any estimation when this bug will be fixed?

          Show
          Patric Rufflar added a comment - I encountered the same issue. So for now, we cannot use Sonar in combination with findbugs in our company. Is there any estimation when this bug will be fixed?
          Hide
          Freddy Mallet added a comment - - edited

          We hope this bug to be fixed in Sonar 1.10 (begining of July)

          Show
          Freddy Mallet added a comment - - edited We hope this bug to be fixed in Sonar 1.10 (begining of July)
          Hide
          Patric Rufflar added a comment -

          Is there any possibility to make a kind of "Service Release", Hotfix or Workaround to Sonar 1.9 after this bug has been fixed?
          Otherwise I can't use Sonar in our company for now (till the release of 1.10).

          Show
          Patric Rufflar added a comment - Is there any possibility to make a kind of "Service Release", Hotfix or Workaround to Sonar 1.9 after this bug has been fixed? Otherwise I can't use Sonar in our company for now (till the release of 1.10).
          Hide
          Freddy Mallet added a comment -

          We do our best Patric.

          Show
          Freddy Mallet added a comment - We do our best Patric.

            People

            • Assignee:
              CÚdric Munger
              Reporter:
              Freddy Mallet
            • Votes:
              3 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: