0
이상한 문제가 있습니다. 파일 유효성을 검사하기 위해 XML 스키마를 만들려고합니다. 내 함수에서 다음과 같은 일을 해요 :젠킨스에서 SAXException이 발생했습니다.
String schemaFilename = ApplicationConfiguration.xsdConfiguration.getTypeMappings().get(fileType);
ClassLoader classLoader = getClass().getClassLoader();
File schemaFile = new File(classLoader.getResource(ApplicationConfiguration.xsdConfiguration.getXsdSchemasLocation()+schemaFilename).getFile());
final SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
Schema schema = null;
try
{
schema = schemaFactory.newSchema(schemaFile);
}
catch (SAXException e) {
logger.error("Could not instantiate XSD schema from file: {}", schemaFile.getName());
e.printStackTrace();
validXML = false;
}
내가 IntelliJ를 통해 또는 모든 것이 잘 작동 메이븐을 통해 중 Windows에서 내 테스트를 실행합니다. 나는를 CentOS에서 실행, 젠킨스 구축하기 위해 노력하고있어 언제 (편집 스택 추적)
org.xml.sax.SAXParseException; systemId: file:/...myfile.xsd; lineNumber: 48; columnNumber: 39; src-resolve: Cannot resolve the name 'AnElement' to a(n) 'type definition' component.
잘못 갈 수 있습니다 무엇에 어떤 아이디어 SAXExceptions 받고 있어요?