POI实例化一个字体时3.7 java.lang.IncompatibleClassChangeError [英] POI 3.7 java.lang.IncompatibleClassChangeError when instantiating a Font

查看:121
本文介绍了POI实例化一个字体时3.7 java.lang.IncompatibleClassChangeError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到一个java.lang.IncompatibleClassChangeError与下面的代码片段:

I am getting a java.lang.IncompatibleClassChangeError with the following snippet:

Workbook workbook = new HSSFWorkbook();
Font arial = workbook.createFont(); // java.lang.IncompatibleClassChangeError thrown here

我使用POI 3.7和WebSphere 7门户服务器。同样的code(而据我所知,同样的罐子)与Netbeans的控制台应用程序的工作。这也似乎3.7罐子在classpath中唯一的一个。该项目还使用了JasperReports的4.1.2。我能否提供更多信息?

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?

推荐答案

我几乎可以肯定,你有POI的旧版本在classpath

I'm almost certain that you have an older version of POI on your classpath

有一个部分 POI常见问题覆盖这个非常案例。您将要使用code从那里来标识POI的额外副本是从哪里来的,和ZAP老坛子

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

这篇关于POI实例化一个字体时3.7 java.lang.IncompatibleClassChangeError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆