You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, currently I'm implementing this code to validate the invoices:
`private fun validateInvoice(textDocument: Path) {
// Load scenarios.xml from classpath
val scenarios = URLDecoder.decode(BASE_DIRECTORY.resolve("scenarios.xml").toString(), StandardCharsets.UTF_8)
//For debug purpose
//StreamSource(File(scenarios).readText())
// Load the rest of the specific Validator configuration from classpath
val config = Configuration.load(File(scenarios).toURI())
// Use the default validation procedure
val validator: Check = DefaultCheck(config.build(ProcessorProvider.getProcessor()))
// Validate a single document
val document: Input = InputFactory.read(textDocument.resolve("invoice.xml"))
// Get Result including information about the whole validation
val report = validator.checkInput(document)
System.out.println("Is processing succesful=" + report.isProcessingSuccessful())`
After debugging the app, I met this error at line val config = Configuration.load(File(scenarios).toURI()) : java.lang.ClassNotFoundException: javax.xml.bind.ValidationEventHandler
I'm using:
java correctto-21
validationtool version 1.5.0
jaxb-runtime version 4.0.5
Does anyone know how to resolve this?
Thanks
The text was updated successfully, but these errors were encountered:
khanhdx-dev
changed the title
Having issue with validator 1.5.0 library
Having 'java.lang.ClassNotFoundException: javax.xml.bind.ValidationEventHandler' issue with validator 1.5.0 library
Jan 15, 2025
Hi, currently I'm implementing this code to validate the invoices:
`private fun validateInvoice(textDocument: Path) {
After debugging the app, I met this error at line
val config = Configuration.load(File(scenarios).toURI())
:java.lang.ClassNotFoundException: javax.xml.bind.ValidationEventHandler
I'm using:
Does anyone know how to resolve this?
Thanks
The text was updated successfully, but these errors were encountered: