나는 다음과 같은 예외를 얻을 때 :"필요한 공장 등록"예외로드 자원
는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