I am getting the following error in my project using Eclipse and maven.
The package org.xml.sax is accessible from more than one module: <unnamed>
I previously had the compiler version set to 1.8, but I want it to be at version 11. I found a bunch of questions related to this, but I was still not able to resolve the issue.
By commenting out different dependencies in my pom.xml, I was able to identify jtidy as the culprit. I tried adding some exclustions to that dependency as follows:
<dependency>
<groupId>jtidy</groupId>
<artifactId>jtidy</artifactId>
<version>4aug2000r7-dev</version>
<exclusions>
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
<exclusion>
<groupId>org.w3c</groupId>
<artifactId>dom</artifactId>
</exclusion>
</exclusions>
</dependency>
but that did not fix the issue. I was able to get the errors to go away by commenting out the entire jtidy dependency in maven, and adding the jtidy jar to the classpath in eclipse. This removed the errors, and I was able to run the code successfully within eclipse. But when I built the project using maven, I got a noclassdef error for jtidy. I tried adding the jtidy jar to the classpath on the command line when running the jar, but that still did not work.
I really need jtidy in this project, as it can fix a malformed html node and make it well formed. Is there a way to set up a module-info file that will get this to work? (I need to read up on modules in general)
thanks!