itext 5 的 HtmlPipelineContext 构造函数中的非法反射访问

问题描述 投票:0回答:0

上下文:jdk11、springboot、itextpdf 5.5.13.3、ubuntu、eclipse

期间:

new HtmlPipelineContext(null);
贯穿
new CssAppliersImpl(new XMLWorkerFontProvider());
和最后
CssAppliersImpl(){// map builder inside }
出现

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.itextpdf.text.io.ByteBufferRandomAccessSource$1 (file:/home/awieclawski/.m2/repository/com/itextpdf/itextpdf/5.5.13.3/itextpdf-5.5.13.3.jar) to method java.nio.DirectByteBuffer.cleaner()
WARNING: Please consider reporting this to the maintainers of com.itextpdf.text.io.ByteBufferRandomAccessSource$1

问题:如何避免?

附言。

HtmlPipelineContext
实例建立之前:

        CSSResolver cssResolver = new StyleAttrCSSResolver();
        cssResolver.addCss(cssFile);
 //     cssFile is returned from XMLWorkerHelper.getCSS(getCssStream(path));
    }

并在

new HtmlPipelineContext(null);
的调试中发出信号:
com.sun.jdi.ClassNotLoadedException: Type has not been loaded occurred invoking method.

java reflection itext pdf-generation
© www.soinside.com 2019 - 2024. All rights reserved.