Skip to content

java.lang.LinkageError caused by IoslatingClassLoader.java #79

@Fourseas54

Description

@Fourseas54

There is a project named GrowingBugRepository(https://github.com/liuhuigmail/GrowingBugRepository),which can be considered as same as Defects4j. And there is a newly mined bug which is mined from apache/commons-dbcp project. When I run gzoltar on this bug, there is an error:
java.lang.LinkageError: loader constraint violation: loader (instance of com/gzoltar/internal/core/util/IsolatingClassLoader) previously initiated loading for a different type with name "javax/management/MBeanServer"
I simply thought that was due to dependency violation. But I didn't find javax.management after running "mvn dependency:tree" on root directory of gzoltar.
Then I modified com/gzoltar/internal/core/util/IsolatingClassLoader and simply added an if statement:
if (name.contains(".management")){
return super.loadClass(name,resolve);
}
And gzoltar can running perfectly on that apache/commons-dbcp project.
But there may be more elegant way to fix it.
I hope you can help me solve this problom, thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions