問題
- Springを使用してJNDI接続を作成する際、Eclipse / Liferay IDEユーザーは以下のエラーに遭遇する可能性があります:
-
"Failed to read schema document 'http://www.liferay.com/schema/lrjee/liferay-jee.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>
-
環境
- Liferay DXP 7.4
解像度
- XSD ファイルが URL に対して実際に利用できないため、IDE は URL をそのまま解決できませんでした。
- このエラーは、IDEを次のように設定することで解決できます:
- Preferences > XML > XML Catalogに移動し、Addをクリックする。
- Location に、ワークスペースからの相対パスで liferay-jee.xsd ファイルへのパスを入力します。 XSDファイルはローカルファイルシステム上にある必要がある。
- キーの種類」で「スキーマの場所」を選択
- キー」に「http://www.liferay.com/schema/lrjee/liferay-jee.xsd」と入力する。
- これを保存すると、EclipseはXSDを正しく解決できるようになり、Eclipseでマークされたエラーは消えます。
追加情報