FasterXML / woodstox

The gold standard Stax XML API implementation. Now at Github.
Apache License 2.0
225 stars 81 forks source link

Module `com.ctc.wstx` does not read a module that exports `com.ctc.wstx.shaded.msv.org_isorelax.verifier` #193

Closed agavrilov76 closed 7 months ago

agavrilov76 commented 8 months ago

I'm getting the following error when running under JPMS (Java Modules) after upgrading 6.6.0

Error occurred during initialization of boot layer
java.lang.module.ResolutionException: Module com.ctc.wstx does not read a module that exports com.ctc.wstx.shaded.msv.org_isorelax.verifier
cowtowncoder commented 8 months ago

Hmmh. relaxngDatatype is included as shaded artifact, not as dependency. So I don't think there should be any module dependency. But I don't know what needs to change in module definition, generated using Modirect from

src/moditect/module-info.java

This shouldn't have changed since 6.5.x; the only change that seems at all relevant is #182 (dependency update for msv-core).

So, I am not sure how to proceed here. All help would be appreciated!

pjfanning commented 7 months ago

This error occurred in Apache POI too. I had to revert the upgrade of woodstox.

cowtowncoder commented 7 months ago

It'd be good to resolve this, but I really do not know what change is needed: possibly the 4th and/or 5th provides clause from end of src/moditect/module-info.java that refers to shaded Factory/Factory loader. But it'd be good to have someone who could test it with a local build.

@pjfanning Do you think you could try this by just removing 2 entries after "//Include shaded in provisions", doing local build and trying resulting snapshot version? If that works, I could release 6.6.1 with just that change.

EDIT: Created #198 as possible solution as per ^^^

pjfanning commented 7 months ago

@cowtowncoder the POI build worked ok with the 6.6.1 release - thanks

cowtowncoder commented 7 months ago

@pjfanning Thank you for confirming!

cowtowncoder commented 6 months ago

Would #200 be related here?