Open eballetbaz opened 7 months ago
can you provide a simple project to reproduce your issue?
I have also seen this and I have made a small project here: https://github.com/pedro-w/foptest/tree/main
If I run mvn clean package exec:java
I get
[WARNING]
javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found
at javax.xml.parsers.DocumentBuilderFactory.newInstance (Unknown Source)
at org.apache.fop.configuration.DefaultConfiguration.<clinit> (DefaultConfiguration.java:44)
at org.apache.fop.configuration.DefaultConfigurationBuilder.build (DefaultConfigurationBuilder.java:41)
at org.apache.fop.apps.FopConfParser.<init> (FopConfParser.java:154)
at org.apache.fop.apps.FopConfParser.<init> (FopConfParser.java:93)
at org.apache.fop.apps.FopConfParser.<init> (FopConfParser.java:146)
at org.apache.fop.apps.FopConfParser.<init> (FopConfParser.java:119)
at org.apache.fop.apps.FopFactory.newInstance (FopFactory.java:137)
at com.nowhere.fop.App.main (App.java:39)
at org.codehaus.mojo.exec.ExecJavaMojo.lambda$execute$0 (ExecJavaMojo.java:283)
at java.lang.Thread.run (Thread.java:840)
using exec:3.1.1:java
but no error if I change the plugin in the POM to 3.0.0.
I'm using:
> mvn --version
Apache Maven 3.9.5 (57804ffe001d7215b5e7bcb531cf83df38f93546)
Maven home: C:\Program Files\NetBeans-20\netbeans\java\maven
Java version: 17.0.9, vendor: Eclipse Adoptium, runtime: C:\Program Files\Eclipse Adoptium\jdk-17.0.9.9-hotspot
Default locale: en_GB, platform encoding: Cp1252
OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"
Hello,
We are seeing the same problem while using log4j, the system throws an exception on the line LogManager.getContext(false);
:
java.lang.NoSuchMethodError: 'void javax.xml.parsers.DocumentBuilderFactory.setFeature(java.lang.String, boolean)'
at org.apache.logging.log4j.core.config.xml.XmlConfiguration.setFeature(XmlConfiguration.java:204)
at org.apache.logging.log4j.core.config.xml.XmlConfiguration.disableDtdProcessing(XmlConfiguration.java:196)
at org.apache.logging.log4j.core.config.xml.XmlConfiguration.newDocumentBuilder(XmlConfiguration.java:185)
at org.apache.logging.log4j.core.config.xml.XmlConfiguration.<init>(XmlConfiguration.java:89)
at org.apache.logging.log4j.core.config.xml.XmlConfigurationFactory.getConfiguration(XmlConfigurationFactory.java:46)
at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:506)
at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:481)
at org.apache.logging.log4j.core.config.ConfigurationFactory$Factory.getConfiguration(ConfigurationFactory.java:402)
at org.apache.logging.log4j.core.config.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:321)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:705)
at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:735)
at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:260)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:154)
at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:46)
at org.apache.logging.log4j.LogManager.getContext(LogManager.java:197)
Tested with apache maven 3.9.6 and exec-maven-plugin 3.1.0, 3.1.1 and 3.2.0 on JDK21. We used log4j 2.23.0 and slf4j 2.0.12.
@ctabin is that the same problem actually? (I genuinely don't know)
@pedro-w It is also related to the DocumentBuilderFactory
so it probably is related somehow, it might just be another consequence of the disease :face_with_spiral_eyes:
After upgrading from 3.0.0 to 3.1.0, I have a blocking error:
javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found
When running with -Djaxp.debug=true we can see the difference :
Version 3.1.0:
Version 3.0.0:
Full error stack with version 3.1.0
Note: JDK is 1.8