简体   繁体   English

导入javax.xml.parsers.ParserConfigurationException无法解决

[英]The import javax.xml.parsers.ParserConfigurationException cannot be resolved

I just migrated a java project from JDK8 to JDK11. 我刚刚将Java项目从JDK8迁移到JDK11。

The project implements Maven dependecy management. 该项目实现了Maven依赖管理。 The IDE I'm using is Eclipse jee-2018-12. 我正在使用的IDE是Eclipse jee-2018-12。 Java version: Dcevm-11 on Trava OpenJDK. Java版本:Trava OpenJDK上的Dcevm-11。

I can't find how to resolve this dependencies: 我找不到如何解决此依赖性的方法:

import javax.xml.parsers.ParserConfigurationException; 导入javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.TransformerException; 导入javax.xml.transform.TransformerException;

I think I should add a dependency in my pom.xml but I have no clue. 我想我应该在我的pom.xml中添加一个依赖项,但是我不知道。

Has anyone fronted this same problem? 有人面对过同样的问题吗?

Thank you, Giacomo 谢谢贾科莫

I'm posting the solution because I hope it'll be useful for someone with my same problem. 我发布解决方案是因为我希望它对遇到同样问题的人有用。

I have to say this project agglomerates a lot of small projects with a resulting long list of dependencies. 我不得不说这个项目聚集了许多小型项目,因此产生了很长的依赖关系列表。

Investigating maven dependencies, I've found out that a library needed for some print reports (batik) had old xml-apis dependencies. 在研究Maven依赖性时,我发现某些打印报告(蜡染)所需的库具有旧的xml-apis依赖性。

By excluding these dependencies from Dependency Hierarchy view on my pom.xml within Eclipse, I fixed the problem. 通过从Eclipse的pom.xml的“依赖关系层次结构”视图中排除这些依赖关系,我解决了这个问题。

So: pom.xml -> Maven editor -> Dependency Hierarchy -> watch for conflicts -> exclude them 因此:pom.xml-> Maven编辑器->依赖层次结构->注意冲突->排除冲突

Giacomo. 贾科莫。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM