POI 3.7 实例化 Font 时出现 java.lang.InknownClassChangeError
我收到了带有以下代码片段的 java.lang.IncompleteClassChangeError 错误:
Workbook workbook = new HSSFWorkbook();
Font arial = workbook.createFont(); // java.lang.IncompatibleClassChangeError thrown here
我正在将 POI 3.7 与 WebSphere 7 Portal Server 一起使用。相同的代码(据我所知,相同的 jar)适用于 Netbeans 控制台应用程序。似乎 3.7 jar 是类路径中唯一的一个。该项目还使用JasperReports 4.1.2。我可以提供更多信息吗?
I am getting a java.lang.IncompatibleClassChangeError with the following snippet:
Workbook workbook = new HSSFWorkbook();
Font arial = workbook.createFont(); // java.lang.IncompatibleClassChangeError thrown here
I am using POI 3.7 with WebSphere 7 Portal Server. The same code (and as far as I can tell, the same jars) worked with Netbeans console application. It also seems that the 3.7 jar is the only one in the classpath. The project also uses JasperReports 4.1.2. Can I provide more information?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我几乎可以肯定您的类路径上有旧版本的 POI
中有一个部分POI 常见问题解答 涵盖了这种情况。您需要使用那里的代码来识别 POI 的额外副本来自何处,并删除旧的 jar
I'm almost certain that you have an older version of POI on your classpath
There's a section in the POI FAQ that covers this very case. You'll want to use the code from there to identify where the extra copy of POI is coming from, and zap the old jar