2

私は Eclipse 3.x 上に構築された WID 6.1 を使用しています。

フォルダーを右クリックしようとすると、[新規]、[クラス] の順にクリックし、クラスの名前を入力して [完了] をクリックすると、エラーが発生します。

「要素の作成に失敗しました。org.xml.sax.SAXParseException: ファイルの終わりが早すぎます。」

昨日、これが発生したときにワークスペースを再作成しましたが、現在は再び発生しています。WID の再インストールには 2 ~ 3 時間かかるため、実際の問題を解決したいと考えています。

提案?

編集: WID の 2 回目の再起動後、"Error initializing Java Tooling." が表示されるようになりました。これ、元のエラー メッセージよりも検索しやすいものです。

編集: WID/Eclipse ログを見ると、例外がありますが、どのプロジェクトまたはどのファイルかはわかりません。

Caused by: org.xml.sax.SAXParseException: Premature end of file.
    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
    at org.eclipse.wst.common.internal.emf.utilities.DOMUtilities.loadDocument(Unknown Source)
    ... 21 more
4

1 に答える 1

3

[ウィンドウ]、[ビューの表示]、[エラー ログ] の順にクリックします。

ワークスペースからすべてのプロジェクトを削除します。

エラー ログを確認しながら、プロジェクトを 1 つずつワークスペースに再読み込みします。

読み込み時にエラーが発生したプロジェクトについては、.settings フォルダーに移動し、そこにあるファイルが空または 0 バイトであることを確認しました。それらをすべて削除すると、再び機能しました。

于 2010-01-15T16:40:04.947 に答える