I am using Eclipse IDE 4.16 and migrating the project from JDK 8 to JDK 11. I am getting the following error while building the project with ANT Script.
The type javax.xml.namespace.QName cannot be resolved. It is indirectly referenced from required .class files.
I have tried to remove the dependent JARs by clicking Ctrl + Shift + T and searching for the required package. I have kept only the packages present in JDK 11 and removed the other JARs which were referencing the javax.xml.namespace package as we can see from the following screenshot:
I tried to follow this link as it was quite similar to my issue but the error was not resolved.
JDK 10 cannot import javax.xml.namespace in Eclipse
How to resolve this error?