2011-08-01 17 views
0

WebSphereにデプロイされ、1つのJavaライブラリを使用してExcel形式でファイルを生成するWebアプリケーションがありますが、WebSphereで次のエラーが発生しますが、TOMCATサーバーで正常に動作します。アプリケーションでJavaライブラリエラーが発生する

何が問題なのですか?

エラーは、次のとおりです。 - あなたは二回CLASSPATHでアンディ・カーンのJExcelライブラリを持っているよう

Error 500: java.lang.LinkageError: LinkageError while defining class:

jxl.format.CellFormat Could not be defined due to: (jxl/format/CellFormat) bad major version at offset=6 This is often caused by having a class defined at multiple locations within the classloader hierarchy. Other potential causes include compiling against an older or newer version of the class that has an incompatible method signature. Dumping the current context classloader hierarchy: ==> indicates defining classloader ==>[0] [email protected] Local ClassPath: C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\classes;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\activation-1.1.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\axis.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\cglib-nodep-2.2.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\commons-discovery-0.2.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\commons-logging.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\commons-net-2.0.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\commons-net-ftp-2.0.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\dom4j-1.6.1.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\iText-5.0.6.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\jaxrpc.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\jdom-1.1.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\jettison-1.0.1.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\joda-time-1.6.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\json-rpc-1.0.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\jxl.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\mail-1.4.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\ojdbc14.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\quartz-all-1.5.2.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\saaj.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\scheduler-plugin-example.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\scheduler-plugin.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\servlet-api.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\sqljdbc.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\stax-1.2.0.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\stax-api-1.0.1.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\wsdl4j.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\wstx-asl-3.2.7.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\xml-writer-0.2.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\xom-1.1.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\xpp3_min-1.1.4c.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\xstream-1.3.1.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war\WEB-INF\lib\xstream-benchmark-1.3.1.jar;C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\installedApps\yagneshNode01Cell\apptoolv2.ear\apptoolv2.war Delegation Mode: PARENT_FIRST [1] [email protected] Local Classpath: Delegation mode: PARENT_FIRST [2] [email protected] [3] [email protected] [4] [email protected]24e02 [5] [email protected] [6] [email protected] ---Original exception--- java.lang.UnsupportedClassVersionError: (jxl/format/CellFormat) bad major version at offset=6 at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:222) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148) at com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:526) at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java:477) at .............

+2

あなたが最初の数を読みましたエラーメッセージの行? *これは、多くの場合、クラスローダー階層内の複数の場所にクラスを定義することによって発生します。 * – aioobe

答えて

2

これは問題です:

Could not be defined due to: (jxl/format/CellFormat) bad major version at offset=6 

あなたはあなたのアプリケーションサーバーがサポートしていないのJavaのバージョン用にコンパイルJExcelライブラリを使用しています。ライブラリーを再コンパイルするか、新しいバージョンのWebSphere Application Serverに移動する必要があります。

(製品が同じに関係なく、そのテキストが周り6.1.0.21までは、実際には関連性があるかどうかの、全てのLinkageErrorのクラスローダダンプとエラー「複数の場所で定義された」印刷。)

0

が見えます。 WebSphereが同梱されているかどうかそうであれば、アプリケーションWEB-INF/libからあなたのものを削除し、それが役立つかどうか確認してください。

+0

あなたは正しく、andy khanのjxl.jarを使用しています。しかし、この問題の解決策は.... –

+0

WebSphereはdoesn ' jxl.jarで出荷します。 – dbreaux

+0

しかし、複数の場所にjxl.jarがある可能性があります。おそらくあなたはあなたのWEB-INF/libに加えてjxl.jarをどこかにコピーしましたか?どのjarが特定のクラスを提供しているかを調べるには、[this blog post](https://www.ibm.com/developerworks/mydeveloperworks/blogs/Dougclectica/entry/revive_finding_a_java_class_in_your_servlet_container2)のJSPを参照してください。 – dbreaux

関連する問題