开门见山
上报错
2020-03-05 16:30:08,219 WARN org.apache.hadoop.hdfs.DFSClient - DataStreamer Exception
javax.xml.parsers.FactoryConfigurationError: Provider for class javax.xml.parsers.DocumentBuilderFactory cannot be created
at javax.xml.parsers.FactoryFinder.findServiceProvider(FactoryFinder.java:311)
....
Caused by: java.lang.RuntimeException: Provider for class javax.xml.parsers.DocumentBuilderFactory cannot be created
at javax.xml.parsers.FactoryFinder.findServiceProvider(FactoryFinder.java:308)
... 12 more
Caused by: java.util.ServiceConfigurationError: javax.xml.parsers.DocumentBuilderFactory: Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not a subtype
at java.util.ServiceLoader.fail(ServiceLoader.java:239)
... 12 more
原因在FLink中引入了 hadoop-client,
解决xml-apis包与项目里dom4j包冲突。排除项目中所有xml-apis包。
FLink版本1.9.1 Hadoop2.7.3