2010-12-28 4 views
1

は、ペットケア春のサンプルプログラムを実行しようとしていますが、私は、サーブレット・コンテキスト内で次のエラーを取得するスキーマのURLエラー - 春3.0

- schema_reference.4: Failed to read schema document 'http://www.springframework.org/schema/petcare/spring-petcare-3.0.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>. 
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'petcare:resources'. 

春・ペットケア-3.0.xsdはorg.springframeworkに位置しています.samples.petcare.util.configパッケージsrc/main/resources。ここでポイントするようにURLスキーマを変更するにはどうすればよいですか?

答えて

1

サンプルは私のために働いています。

正しく構築して展開しましたか?具体的にあなたがそれをWEB-INFの下では、WebアプリケーションへのXSDファイル

+0

の位置を示しており、これをある

http\://www.springframework.org/schema/petcare/spring-petcare-3.0.xsd=org/springframework/samples/petcare/util/config/spring-petcare-3.0.xsd 

行が含まれている展開Webアプリケーション内のファイルWEB-INF/classes/META-INF/spring.schemasの存在を確認することができます/クラス/ META-INFは存在しません。これはWebフォルダ 'src/main/webapp/WEB-INF'の下にあります。編集:いいえ、spring.schemasはsrc/main/resourcesの下にあります。私はspringsource Tool Suiteを使用していますので、セットアップはEclipse/EDITと少し異なります。 – sonx

+0

は問題の原因です – sonx

+0

@sonx - このタグはxsdファイルで定義されています。おそらく、IDEの外でビルドして実行する必要があります。これは私がやったことです – Raghuram