Sonar

NoClassDefFoundError is not correctly handled by the Sonar Maven plugin

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.9.2
  • Fix Version/s: 1.12
  • Component/s: Maven Plugin
  • Labels:
    None
  • Number of attachments :
    1

Description

When a NoClassDefFoundError is thrown somewhere inside the Sonar Maven plugin, the following error message is logged and there is no way to know which class can't be found. This bug is due to PICO-363.

Caused by: java.lang.ClassCastException: java.lang.NoClassDefFoundError cannot b
e cast to java.lang.Exception
        at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(
ReflectionLifecycleStrategy.java:115)
        at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(Reflect
ionLifecycleStrategy.java:89)
        at org.picocontainer.adapters.InstanceAdapter.start(InstanceAdapter.java
:113)
        at org.picocontainer.adapters.InstanceAdapter.start(InstanceAdapter.java
:91)
        at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoConta
iner.java:882)
        at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.jav
a:630)
        at org.sonar.mojo.InternalMojo.createMainContainer(InternalMojo.java:192
)
        at org.sonar.mojo.InternalMojo.execute(InternalMojo.java:154)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:483)
        at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:82)
        ... 20 more

Issue Links

Activity

Hide
Freddy Mallet added a comment -

temporary workaround : in the sonar installation directory, replace war/sonar-web/WEB-INF/lib/picocontainer-2.8.2.jar by the attached file.

Show
Freddy Mallet added a comment - temporary workaround : in the sonar installation directory, replace war/sonar-web/WEB-INF/lib/picocontainer-2.8.2.jar by the attached file.
Hide
Freddy Mallet added a comment -

PICO-363 has been fixed in Picocontainer version 2.8.4

Show
Freddy Mallet added a comment - PICO-363 has been fixed in Picocontainer version 2.8.4
Hide
Simon Brandhof added a comment -

FYI Picocontainer 2.8.4 has been renamed 2.9.

Show
Simon Brandhof added a comment - FYI Picocontainer 2.8.4 has been renamed 2.9.

People

Vote (5)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: