Skip to content

Instantly share code, notes, and snippets.

@MrMikeFloyd
Last active January 8, 2020 12:10
Show Gist options
  • Save MrMikeFloyd/5ceee8f9f2d0f636a4649ceda8a29a6f to your computer and use it in GitHub Desktop.
Save MrMikeFloyd/5ceee8f9f2d0f636a4649ceda8a29a6f to your computer and use it in GitHub Desktop.
Sample setup/WebSphere Liberty logs during application startup when deploying KoSIT Validator as an EAR.
C:.
| kositvalidator-api.war
|
+---lib
| kositvalidator-logic-0.0.1.0.jar
| validationtool-1.1.0.jar
| ...other jars omitted for brevity
|
\---META-INF
application.xml
MANIFEST.MF
C:.
+---de
| \---de
| \---xxxxx
| \---xxxxx
| \---xxxxx
| \---logic
| +---common
| | ...classes here
|
+---META-INF
| | MANIFEST.MF
| |
| \---maven
| \---xxxx.xxxxx.xxxx.kositvalidator
| \---kositvalidator-logic
| pom.properties
| pom.xml
|
\---xRechnung_v120
| EN16931-CII-validation.xslt
| EN16931-UBL-model.xslt
| scenarios.xml
|
+---resources
| | default-report.xsl
| | xrechnung-report.xsl
| |
| +---cii
| | \---16b
| | +---xsd
| | | CrossIndustryInvoice_100pD16B.xsd
| | | CrossIndustryInvoice_QualifiedDataType_100pD16B.xsd
| | | CrossIndustryInvoice_ReusableAggregateBusinessInformationEntity_100pD16B.xsd
| | | CrossIndustryInvoice_UnqualifiedDataType_100pD16B.xsd
| | |
| | \---xsl
| | EN16931-CII-validation.xsl
| |
| +---ubl
| | \---2.1
| | +---xsd
| | | +---common
| | | | CCTS_CCT_SchemaModule-2.1.xsd
| | | | UBL-CommonAggregateComponents-2.1.xsd
| | | | UBL-CommonBasicComponents-2.1.xsd
| | | | UBL-CommonExtensionComponents-2.1.xsd
| | | | UBL-CommonSignatureComponents-2.1.xsd
| | | | UBL-CoreComponentParameters-2.1.xsd
| | | | UBL-ExtensionContentDataType-2.1.xsd
| | | | UBL-QualifiedDataTypes-2.1.xsd
| | | | UBL-SignatureAggregateComponents-2.1.xsd
| | | | UBL-SignatureBasicComponents-2.1.xsd
| | | | UBL-UnqualifiedDataTypes-2.1.xsd
| | | | UBL-XAdESv132-2.1.xsd
| | | | UBL-XAdESv141-2.1.xsd
| | | | UBL-xmldsig-core-schema-2.1.xsd
| | | |
| | | \---maindoc
| | | UBL-ApplicationResponse-2.1.xsd
| | | UBL-AttachedDocument-2.1.xsd
| | | UBL-AwardedNotification-2.1.xsd
| | | UBL-BillOfLading-2.1.xsd
| | | UBL-CallForTenders-2.1.xsd
| | | UBL-Catalogue-2.1.xsd
| | | UBL-CatalogueDeletion-2.1.xsd
| | | UBL-CatalogueItemSpecificationUpdate-2.1.xsd
| | | UBL-CataloguePricingUpdate-2.1.xsd
| | | UBL-CatalogueRequest-2.1.xsd
| | | UBL-CertificateOfOrigin-2.1.xsd
| | | UBL-ContractAwardNotice-2.1.xsd
| | | UBL-ContractNotice-2.1.xsd
| | | UBL-CreditNote-2.1.xsd
| | | UBL-DebitNote-2.1.xsd
| | | UBL-DespatchAdvice-2.1.xsd
| | | UBL-DocumentStatus-2.1.xsd
| | | UBL-DocumentStatusRequest-2.1.xsd
| | | UBL-ExceptionCriteria-2.1.xsd
| | | UBL-ExceptionNotification-2.1.xsd
| | | UBL-Forecast-2.1.xsd
| | | UBL-ForecastRevision-2.1.xsd
| | | UBL-ForwardingInstructions-2.1.xsd
| | | UBL-FreightInvoice-2.1.xsd
| | | UBL-FulfilmentCancellation-2.1.xsd
| | | UBL-GoodsItemItinerary-2.1.xsd
| | | UBL-GuaranteeCertificate-2.1.xsd
| | | UBL-InstructionForReturns-2.1.xsd
| | | UBL-InventoryReport-2.1.xsd
| | | UBL-Invoice-2.1.xsd
| | | UBL-ItemInformationRequest-2.1.xsd
| | | UBL-Order-2.1.xsd
| | | UBL-OrderCancellation-2.1.xsd
| | | UBL-OrderChange-2.1.xsd
| | | UBL-OrderResponse-2.1.xsd
| | | UBL-OrderResponseSimple-2.1.xsd
| | | UBL-PackingList-2.1.xsd
| | | UBL-PriorInformationNotice-2.1.xsd
| | | UBL-ProductActivity-2.1.xsd
| | | UBL-Quotation-2.1.xsd
| | | UBL-ReceiptAdvice-2.1.xsd
| | | UBL-Reminder-2.1.xsd
| | | UBL-RemittanceAdvice-2.1.xsd
| | | UBL-RequestForQuotation-2.1.xsd
| | | UBL-RetailEvent-2.1.xsd
| | | UBL-SelfBilledCreditNote-2.1.xsd
| | | UBL-SelfBilledInvoice-2.1.xsd
| | | UBL-Statement-2.1.xsd
| | | UBL-StockAvailabilityReport-2.1.xsd
| | | UBL-Tender-2.1.xsd
| | | UBL-TendererQualification-2.1.xsd
| | | UBL-TendererQualificationResponse-2.1.xsd
| | | UBL-TenderReceipt-2.1.xsd
| | | UBL-TradeItemLocationProfile-2.1.xsd
| | | UBL-TransportationStatus-2.1.xsd
| | | UBL-TransportationStatusRequest-2.1.xsd
| | | UBL-TransportExecutionPlan-2.1.xsd
| | | UBL-TransportExecutionPlanRequest-2.1.xsd
| | | UBL-TransportProgressStatus-2.1.xsd
| | | UBL-TransportProgressStatusRequest-2.1.xsd
| | | UBL-TransportServiceDescription-2.1.xsd
| | | UBL-TransportServiceDescriptionRequest-2.1.xsd
| | | UBL-UnawardedNotification-2.1.xsd
| | | UBL-UtilityStatement-2.1.xsd
| | | UBL-Waybill-2.1.xsd
| | |
| | \---xsl
| | EN16931-UBL-validation.xsl
| |
| +---xrechnung
| | \---1.2.0
| | \---xsl
| | XRechnung-CII-validation.xsl
| | XRechnung-UBL-validation-CreditNote.xsl
| | XRechnung-UBL-validation-Invoice.xsl
| |
| \---xsd
| report.xsd
| scenarios.xsd
|
\---schematron
EN16931-CII-validation-expanded.sch
EN16931-CII-validation-unabstract.sch
EN16931-UBL-model-expanded.sch
EN16931-UBL-model-unabstract.sch
iso_abstract_expand.xsl
iso_dsdl_include.xsl
iso_schematron_skeleton_for_saxon.xsl
iso_svrl_for_xslt2.xsl
public class KositValidator {
// this class resides in kositvalidator-logic-0.0.1.0.jar
private static final String SCENARIO_FILE = "xRechnung_v120/scenarios.xml";
public void initialize() {
loadConfiguration();
}
private void loadConfiguration() {
try {
URI scenariosUri = this.getClass().getClassLoader().getResource(SCENARIO_FILE).toURI();
CheckConfiguration config = new CheckConfiguration(scenariosUri);
validator = new DefaultCheck(config);
} catch (URISyntaxException | NullPointerException e) {
throw new InitializationException(e);
}
}
// other code omitted for brevity
}
Caused by: org.xml.sax.SAXParseException; schema_reference.4: Schemadokument 'resources/ubl/2.1/xsd/maindoc/UBL-Invoice-2.1.xsd' konnte nicht gelesen werden, da 1) das Dokument nicht gefunden werden konnte; 2) das Dokument nicht gelesen werden konnte; 3) das Root-Element des Dokuments nicht <xsd:schema> ist.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:306)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaErr(XSDHandler.java:4160)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaError(XSDHandler.java:4143)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument1(XSDHandler.java:2482)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:2191)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:576)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:613)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:572)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:538)
at com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:255)
at de.kosit.validationtool.impl.ContentRepository.createSchema(ContentRepository.java:77)
... 66 more
Caused by: java.io.FileNotFoundException: E:\xxxxxxxxxxxxxxx\resources\ubl\2.1\xsd\maindoc\UBL-Invoice-2.1.xsd (Das System kann den angegebenen Pfad nicht finden)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:93)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:623)
at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:148)
at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:582)
at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.parse(SchemaParsingConfig.java:685)
at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaDOMParser.parse(SchemaDOMParser.java:530)
at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getSchemaDocument(XSDHandler.java:2179)
... 72 more
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment