HotswapProjects / HotswapAgent

Java unlimited redefinition of classes at runtime.
GNU General Public License v2.0
2.32k stars 491 forks source link

Whether jdk21 version is supported #540

Closed dazer007 closed 6 months ago

dazer007 commented 6 months ago

There is no problem using JDK jbr17. An error is reported when using JDK jbr21 to start。

# jvm options
-XX:+AllowEnhancedClassRedefinition -XX:HotswapAgent=fatjar --add-opens=java.base/sun.nio.ch=ALL-UNNAMED
Caused by: java.lang.IllegalAccessError: failed to access class sun.nio.ch.ChannelInputStream from class org.hotswap.agent.util.IOUtils (sun.nio.ch.ChannelInputStream is in module java.base of loader 'bootstrap'; org.hotswap.agent.util.IOUtils is in unnamed module of loader 'app')
    at org.hotswap.agent.util.IOUtils.extractFileNameFromInputStream(IOUtils.java:176)
    at org.hotswap.agent.util.IOUtils.extractFileNameFromInputSource(IOUtils.java:221)
    at org.apache.ibatis.parsing.XPathParser.createDocument(XPathParser.java)
    at org.apache.ibatis.parsing.XPathParser.<init>(XPathParser.java:127)
    at com.baomidou.mybatisplus.core.MybatisXMLConfigBuilder.<init>(MybatisXMLConfigBuilder.java:82)
    at com.baomidou.mybatisplus.extension.spring.MybatisSqlSessionFactoryBean.buildSqlSessionFactory(MybatisSqlSessionFactoryBean.java:473)
skybber commented 6 months ago

Thanks for report, should be fixed in new 1.4.2-SNAPSHOT release