问题描述
我的项目是多模块的,其结构如下:
问题是插件部分使用与代理不同的类加载器。这样我就收到了
java.lang.classCastException: class com.github.lppedd.jmx.FeaturesMBean$Feature cannot be cast to class com.github.lppedd.jmx.FeaturesMBean$Feature
(com.github.lppedd.jmx.FeaturesMBean$Feature is in unnamed module of loader 'app';
com.github.lppedd.jmx.FeaturesMBean$Feature is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @35962a94)
隐含的MBean是
public interface FeaturesMBean {
List<Feature> availableFeatures();
class Feature implements Serializable {
private static final long serialVersionUID = 1L;
public final String name;
public final String description;
public Feature(final String name,final String description) {
this.name = name;
this.description = description;
}
}
}
我应该如何处理这个问题?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)