DITA-OT 4.1.x throw "Error: java.lang.NoSuchMethodError: 'void net.sf.saxon.Configuration.setResourceResolver(net.sf.saxon.lib.ResourceResolver)'"
- Dominant language
- Java
- Stars
- 453
- Forks
- 211
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 3
Description
## Expected Behavior
Transform the dita file to specified format.
## Actual Behavior
I downloaded **DITA-OT 4.1.2**, set the environment variable according to the Doc of DITA-OT. It can output `DITA-OT version 4.1.2` to the console with `dita --version` command.
But when I try to transform a dita topic to html5 format, it throws the error below:
```
Error: java.lang.NoSuchMethodError: 'void net.sf.saxon.Configuration.setResourceResolver(net.sf.saxon.lib.ResourceResolver)'
```
I downloaded **DITA-OT 4.1.1** and try again. it throws the same error.
However, **DITA-OT 4.0.0** works correctly, before and after I download DITA-OT 4.1.x.
## Possible Solution
I have no idea. I am not a developer.
## Steps to Reproduce
The DITA file I transformed is downloaded from GIthub repo: [DITA-Mini-Manual](https://github.com/flicstar/DITA-Mini-Manual).
```
PS E:\TutorialAndNotes\TC-Standards-and-Tutorials\StructuredAuthoring\DITA\DITA-Mini-Manual> dita --version
DITA-OT version 4.1.2
PS E:\TutorialAndNotes\TC-Standards-and-Tutorials\StructuredAuthoring\DITA\DITA-Mini-Manual> dita --input=concept/oilpressurelight.dita --format=html5 --output=out/html5
Error: java.lang.NoSuchMethodError: 'void net.sf.saxon.Configuration.setResourceResolver(net.sf.saxon.lib.ResourceResolver)'
PS E:\TutorialAndNotes\TC-Standards-and-Tutorials\StructuredAuthoring\DITA\DITA-Mini-Manual>
```
## Copy of the error message, log file or stack trace
```
Error: java.lang.NoSuchMethodError: 'void net.sf.saxon.Configuration.setResourceResolver(net.sf.saxon.lib.ResourceResolver)'
```
## Environment
* DITA-OT version: 4.1.x
* Operating system and version: Windows 10
* How did you run DITA-OT? `dita` command
* Transformation type: HTML5 (but I think other formats will throw the same error)
Contributor guide
Research direction
Reproduce the failure with the `dita --input=concept/oilpressurelight.dita --format=html5` command on Windows, then compare DITA-OT 4.1.x with the working 4.0.0 release. Trace the Saxon dependency used during the CLI transformation and investigate the `Configuration.setResourceResolver` NoSuchMethodError. Done means a 4.1.x HTML5 transformation completes successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100