Skip to content

Encode BPMN XSD URL so schema validation works on non-ASCII paths - #4262

Open
kalayciburak wants to merge 1 commit into
flowable:mainfrom
kalayciburak:fix-4214-non-ascii-schema-url
Open

Encode BPMN XSD URL so schema validation works on non-ASCII paths#4262
kalayciburak wants to merge 1 commit into
flowable:mainfrom
kalayciburak:fix-4214-non-ascii-schema-url

Conversation

@kalayciburak

Copy link
Copy Markdown

Check List:

  • Unit tests: YES
  • Documentation: NA

Fixes #4214

BpmnXMLConverter.createSchema passed ClassLoader.getResource URLs
straight to SchemaFactory.newSchema. When the Flowable jar lives on a
path with non-ASCII characters (for example an unpacked Spring Boot
classpath), Xerces fails to resolve xsd:include/xsd:import with
src-resolve: Cannot resolve the name 'extension'.

The schema URL is now ASCII-encoded via URI.toASCIIString() before
loading. Relative includes keep working.

Test Plan

  • NonAsciiClasspathSchemaValidationTest failed with the reported
    src-resolve error before the change, then passed
  • ChineseConverterTest 2/2
  • mvn -pl modules/flowable-bpmn-converter -am test 192/192 in
    flowable-bpmn-converter

Fixes flowable#4214

Xerces cannot resolve xsd:include/import when ClassLoader.getResource
returns a URL whose path contains non-ASCII characters. Encode the
schema URL with URI.toASCIIString() before SchemaFactory.newSchema.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BPMN schema validation fails when Flowable jar is loaded from a non-ASCII unpacked Spring Boot classpath

1 participant