gpt4 book ai didi

java - 我们什么时候得到 java.lang.NoSuchMethodError 即使 jar/class 有特定的方法

转载 作者:搜寻专家 更新时间:2023-10-30 21:43:31 24 4
gpt4 key购买 nike

我正在使用 IText 库来促进小程序中的 pdf 导出。在导出调用期间失败并出现以下错误:

java.lang.NoSuchMethodError: com.lowagie.text.pdf.PdfPTable.completeRow()V

我在 JD Decompiler 中打开 Itext jar/PdfPtable.class 并确认该类具有 completeRow 作为公共(public)方法。

有人可以解释当 java.lang.NoSuchMethodError 被抛出时的可能情况,即使 jar/class 有它吗?

这是堆栈跟踪;可能不是很有帮助,因为大多数调用都是特定于我们的应用程序的。

Error while exporting to the CSV file - java.lang.NoSuchMethodError: com.lowagie.text.pdf.PdfPTable.completeRow()V
com.blox.table.action.ExportToCSVAction.actionPerformed(ExportToCSVAction.java:193)
javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
javax.swing.DefaultButtonModel.setPressed(Unknown Source)
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
java.awt.Component.processMouseEvent(Unknown Source)
javax.swing.JComponent.processMouseEvent(Unknown Source)
java.awt.Component.processEvent(Unknown Source)
java.awt.Container.processEvent(Unknown Source)
java.awt.Component.dispatchEventImpl(Unknown Source)
java.awt.Container.dispatchEventImpl(Unknown Source)
java.awt.Component.dispatchEvent(Unknown Source)
java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
java.awt.Container.dispatchEventImpl(Unknown Source)
java.awt.Window.dispatchEventImpl(Unknown Source)
java.awt.Component.dispatchEvent(Unknown Source)
java.awt.EventQueue.dispatchEvent(Unknown Source)
java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source)
java.awt.EventDispatchThread.pumpEvents(Unknown Source)
java.awt.EventDispatchThread.run(Unknown Source)
com.lowagie.text.pdf.PdfPTable.completeRow()V
com.blox.table.view.GridTableModel$PdfExportWriter.writeNewLine(GridTableModel.java:7259)
com.blox.table.view.GridTableModel.buildExportData(GridTableModel.java:3111)
com.blox.table.view.GridTableModel.export(GridTableModel.java:2541)
com.blox.table.view.GridTable.export(GridTable.java:1318)
com.blox.table.action.ExportToCSVAction.exportToFile(ExportToCSVAction.java:248)
com.blox.table.action.ExportToCSVAction.access$1(ExportToCSVAction.java:245)
com.blox.table.action.ExportToCSVAction$Worker.exportToCSVFile(ExportToCSVAction.java:111)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
spin.Invocation.evaluate(Invocation.java:175)
spin.off.SpinOffEvaluator$1.run(SpinOffEvaluator.java:108)
java.lang.Thread.run(Unknown Source)

最佳答案

可能是您的类路径中出现了不同的版本,或者自您编译您的类以来该特定方法的签名已更改

关于java - 我们什么时候得到 java.lang.NoSuchMethodError 即使 jar/class 有特定的方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1048779/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com