GZoltar / gzoltar

GZoltar - Java Library for Automatic Debugging http://www.gzoltar.com
Other
77 stars 34 forks source link

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

Open Fourseas54 opened 3 days ago

Fourseas54 commented 3 days ago

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!