Eclipse BIRT レポート用の拡張機能 (プラグイン) を作成しようとしています。これには、データベース エントリに従ってファイルから画像を抽出し、それらを表示することが含まれます。
Sun の JAI-ImageIO を使用して TIFF ファイル データにアクセスし、レポート内に表示するために PNG に変換しています。私のコードは準拠していますが、NoClassDefFound ランタイム例外をスローします。
SEVERE: Error happened while running the report.
java.lang.NoClassDefFoundError: javax/media/jai/PlanarImage
at org.eclipse.birt.sample.reportitem.rotatedlabel.util.GraphicsUtil.createDocImage
(GraphicsUtil.java:66)
at org.eclipse.birt.sample.reportitem.rotatedlabel.RotatedLabelPresentationImpl.onRowSets
(RotatedLabelPresentationImpl.java:136)
at org.eclipse.birt.report.engine.extension.ReportItemPresentationBase.onRowSets
(ReportItemPresentationBase.java:218)
at org.eclipse.birt.report.engine.presentation.LocalizedContentVisitor.
processExtendedContent(LocalizedContentVisitor.java:966)
...
PlanarImage.getAsBufferedImage() メソッドを使用しているため、より標準的なイメージ オブジェクトに変換する必要があります。JAI jar ファイルを JRE に配置し、同じ基本コードを Eclipse プラグイン環境の外でテストしました。これは正常に動作します。CLASSPATH の問題のようですが、システム上のすべての JRE の適切な場所に必要な jar ファイルと DLL ファイルが含まれていることを確認しました。
新しい JDBC ドライバーの場合、jar をプラグインの特別なサブディレクトリに配置する必要があります。BIRT がそれらを使用できるように、他のサードパーティの jar を配置する特別な場所はありますか?