I'm trying to generate a PDF file from XML using Apache FOP, but there is a list of errors that appears when I import the needed packages.
- The package javax.xml.transform.stream is accessible from more than one module: java.xml,
xml.apis
- The package javax.xml.transform is accessible from more than one module: java.xml, xml.
apis
- The package javax.xml.transform is accessible from more than one module: java.xml, xml.
apis
- The package javax.xml.transform is accessible from more than one module: java.xml, xml.
apis
- The package javax.xml.transform.sax is accessible from more than one module: java.xml, xml.
apis
- The package javax.xml.transform is accessible from more than one module: java.xml, xml.
apis
I have tried excluding the xml-apis, but it has no effect. Here are thr dependencies:
<dependencies>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>fop</artifactId>
<version>2.6</version>
<exclusions>
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
I also read that this problem appears after Java 8. Is there any other solution to this problem that does not include using Java 8?