Menu

#1444 An internal error - loader constraint violation

3.x
closed-rejected
nobody
5
2017-10-22
2016-02-17
Oz Java
No

From Eclipse I attempt to run Find Bugs plugin and immediately get this error:

An internal error occurred during: "Finding bugs in <xxxx>...".
loader constraint violation: loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) previously initiated loading for a different type with name "org/apache/bcel/classfile/JavaClass"

Eclipse IDE: Version: Luna Service Release 2 (4.4.2) Build id: 20150219-0600
eclipse.ini: -vm C:/Program Files/Java/jre1.8.0_60/bin
Find Bugs: edu.umd.cs.findbugs.plugin.eclipse_3.0.1.20150306-5afe4d1

Discussion

  • Andrey Loskutov

    Andrey Loskutov - 2016-02-17

    Please attach the full stack trace and also please check the error log for previous errors. Is this reproducible? If yes, please provide steps.

     
  • Oz Java

    Oz Java - 2016-02-18

    The issue is reproducible every time.

    Steps to reproduce:
    1. Install Find Bugs: 3.0.2.20151221-25417ff (also reproducible with 3.0.1.20150306-5afe4d1)
    2. Start Eclipse
    2. Right click a java module in the Project Explorer
    3. Select Find Bugs \ Find Bugs

    Stack Trace:

    java.lang.LinkageError: loader constraint violation: loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) previously initiated loading for a different type with name "org/apache/bcel/classfile/JavaClass"
        at com.mebigfatguy.fbcontrib.collect.CollectStatistics.visitClassContext(CollectStatistics.java:57)
        at edu.umd.cs.findbugs.DetectorToDetector2Adapter.visitClass(DetectorToDetector2Adapter.java:76)
        at edu.umd.cs.findbugs.FindBugs2.analyzeApplication(FindBugs2.java:1089)
        at edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:283)
        at de.tobject.findbugs.builder.FindBugsWorker.runFindBugs(FindBugsWorker.java:321)
        at de.tobject.findbugs.builder.FindBugsWorker.work(FindBugsWorker.java:225)
        at de.tobject.findbugs.actions.FindBugsAction$StartedFromViewJob.runWithProgress(FindBugsAction.java:271)
        at de.tobject.findbugs.FindBugsJob.run(FindBugsJob.java:135)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
    

    Session Data:

    eclipse.buildId=4.4.2.M20150204-1700
    java.version=1.8.0_60
    java.vendor=Oracle Corporation
    BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
    Framework arguments: -product org.eclipse.epp.package.jee.product
    Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product

     

    Last edit: Oz Java 2016-02-18
  • Oz Java

    Oz Java - 2016-03-17

    Here is what I did to get it working

    • uninstalled findbugs
    • searched for fb-contrib file and removed all occurences and related folders
    • installed findbugs from the marketplace
    • dowloaded fb-contrib version 5.2.1 and 6.x into a folder outside Eclipse
    • started Eclipse and on FB config screen added both 5.2.1 and 6.x versions.
    • 5.2.1 was loaded but 6.x one failed with invalid entry.
    • Now 6.x can be removed from the FB config screen.

    The step to load 6.x is there to show that 6.x is somehow not compatible with my eclipse luna. The moral story is not to copy the fb-contib into the plugin folder but instead load it using the FB config screen.

     
  • Robert Prescott

    Robert Prescott - 2016-06-27

    fb-contrib 6.6.1 failed with the same error for Eclipse Mars. Placing the fb-contrib jar into the plugins directory caused projects to throw that error when Right Click --> Find Bugs --> Find bugs was performed. Adding this plugin through the configuration screen did allow the plugin to work successfully though.

    Our company is maintaining a redistributable Eclipse package so having fb-contrib in the plugins directory is preferred as developers won't have to reinstall the plugin for each workspace.

     
  • Andrey Loskutov

    Andrey Loskutov - 2017-10-22
    • Status: open --> closed-rejected
     

Log in to post a comment.