Details
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
- depends upon
-
MFINDBUGS-56
Plugin 2.0-SNAPSHOT throws an StackOverflow exception (Infinite Recursion?)
-
- is duplicated by
-
SONAR-836
java.lang.StackOverflowError
-
- relates to
-
SONAR-749
Upgrade to Findbugs maven plugin 2.0
-
Activity
Freddy Mallet
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Link |
This issue depends upon |
Freddy Mallet
made changes -
Freddy Mallet
made changes -
| Fix Version/s | 1.10 [ 15233 ] |
Freddy Mallet
made changes -
| Assignee | Cédric Munger [ cedric.munger ] |
Simon Brandhof
made changes -
| Fix Version/s | 1.9.1 [ 15338 ] | |
| Fix Version/s | 1.10 [ 15233 ] |
Simon Brandhof
made changes -
| Resolution | Fixed [ 1 ] | |
| Status | Open [ 1 ] | Resolved [ 5 ] |
Simon Brandhof
made changes -
Freddy Mallet
made changes -
| Status | Resolved [ 5 ] | Closed [ 6 ] |
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.