をロードするときに例外「に必要な登録工場」私は、次の例外を取得:リソース
java.lang.RuntimeException: Cannot create a resource for 'file:/home/my_conf.xml'; a registered resource factory is needed
「爆発」のコードは、このようなもので、で停止:resource = resourceSet.....
ResourceSet resourceSet = new ResourceSetImpl();
Resource resource = null;
File f = new File(filename);
URI uri = URI.createFileURI(f.getAbsolutePath());
if (!f.exists()) {
throw new Exception(filename + " does not exist");
} else {
resource = resourceSet.getResource(uri, true);
mapPrepConfiguration = (MapPrepConfiguration) resource.getContents().get(0);
}
を持っている人はあります手掛かり?
ありがとう、私はもう少しだが、次のエラーが発生しています:org.eclipse.emf.ecore.resource.impl.ResourceSetImpl $ 1DiagnosticWrappedException:org.eclipse.emf.ecore.xmi.PackageNotFoundException:uri 'http ://saabgroup.com/cms/chart/chartpreparation/mapprep/model 'が見つかりません。 (ファイル:/home/config/my.importedmapconfiguration、2,244) – paul
私の最初の回答で私が与えたFAQを読んでください。次の質問はあなたの問題の説明を与えます。 – greydet
最初の回答を編集しました。すべての問題はEMF FAQに記載されています。 – greydet