当我们从Oracle JDK-8迁移到Open JDK-11时,Apache POI excel生成有问题 已尝试使用-Djava.awt.headless=true org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11FontManager
at org.springframework.web.serv
我试着用org.apache.poi读写excel文件。当我尝试使用XSSFWorkBook访问xlsx文件时,我得到了以下异常
Exception in thread "main" java.lang.IllegalAccessError: superclass access check failed: class org.apache.poi.openxml4j.util.ZipSecureFile (in module org.apache.poi.ooxml) cannot access class org.apache.commons.compress.archive
我在使用Apache POI时遇到以下问题
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_31\bin\java.exe'' finished with non
在将Apache从3.17更新到4.0.0之后,我将在线:
OPCPackage pck = OPCPackage.open(this.getTemplate());
例外情况:
java.lang.IllegalArgumentException: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.
at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.setAttribute(Do
当我尝试启动JAR文件im获取此异常时,我已经更改了poi版本4次来尝试不同的版本,但JAR仍然不想启动。这是一个测试程序,因为在其他情况下,我无法启动JAR,我不想在其中破坏任何东西。
我使用JDK 17,也用JDK 13对它进行了测试。
App:软件包com;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
public class Main {
public static void main(String[] args) {
int x = 7;
System.out.println(x)
首先,如果这个疑问这么容易,我很抱歉。我是爪哇的初学者。我正在尝试使用Microsoft Word文档的模板来创建动态报告。所以我有一个TemplateGQ.docx文件,我使用XWPFDocument doc = new XWPFDocument(OPCPackage.open("C:\\Lucas\\TemplateGQ.docx"));读取了它,在编写了一些操作来替换其中的特定值之后,我尝试将这个文档保存到一个新文件中。 要保存,请执行以下操作: FileOutputStream out = new FileOutputStream(new File("C:\\
下午好伙计们,
我对Xstream有异议。我正在编写独立的后台进程,它将把XML转换为对象。它在使用jdk1.6.0_35的eclipse中工作,我创建了jar文件,并在服务器上部署了jdk1.6.27,它不起作用。
错误是
java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer
at com.thoughtworks.xstream.converters.reflection.CGLIBEnhancedConverter.canConvert(CGLIBEnhance
我用openJDK 11在Linux上运行我的junit测试,得到了以下错误:
java.lang.ClassCastException: class sun.font.CompositeFont cannot be cast to class sun.font.PhysicalFont (sun.font.CompositeFont and sun.font.PhysicalFont are in module java.desktop of loader 'bootstrap')
at java.desktop/sun.font.SunFontManager.get
在移到POI5.0.0之后,我得到了以下错误:
java.lang.NoSuchMethodError: org.openxmlformats.schemas.wordprocessingml.x2006.main.CTPPrDefault.getPPr()Lorg/openxmlformats/schemas/wordprocessingml/x2006/main/CTPPrGeneral;
at org.apache.poi.xwpf.usermodel.XWPFStyles.setStyles(XWPFStyles.java:145)
at org.apache.poi.
我使用的是apache poi v3.9,下面的语句总是给出类定义poi异常
HWPFDocument document=new HWPFDocument(file);
java.lang.ClassNotFoundException: org.apache.poi.hwpf.HWPFDocument
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoa
我们在Domino9服务器上运行的几个Xpages应用程序中使用Apache POI库。现在,当将HCL Notes Designer升级到R11时,我们可以看到Apache POI在版本4.1.1的jvm\ext文件夹中可用(由Notes本身使用,请参阅https://nevermind.dk/nevermind/blog.nsf/subject/an-important-change-in-hcl-notes-v11)。这里有个问题..。我们的应用程序使用Apache POI 3.x,Apache POI libs区域附加到数据库设计中的‘jar’中,但由于某些原因,设计人员使用的是来自
我正在使用apache poi打开一个现有的excel文件。
public static int generateReport(Calendar csdate,Calendar cedate) throws Exception
{
FileInputStream fileIn =null;
FileOutputStream fileOut = null;
int sum=0;//For calculating the total number of tickets
final Workbook wb;
fileIn =new FileInputSt
我们使用Apache库生成Excel文件,并将创建的工作簿写入HttpServletResponse OutputStream下载该文件。
将Apache版本从3.17升级到5.0.0后,Excel(xlsx)文件内容将被破坏。
我在5.0.0版本的变更列表中看到了下面的声明。
升级到ECMA-376第5版(过渡版)模式-预期API中断时直接使用XmlBeans,一些较小的改变是必要的,当代码使用低层CT.类
是它引起了这个问题吗?如果是,在我的代码中需要做哪些更改?
代码:
final SXSSFWorkbook workbook = new SXSSFWorkbook(100);
fin