【发布时间】:2015-01-08 14:06:22
【问题描述】:
我有一个打算在 Glassfish 4.1 上运行的 Java EE 项目。我想使用 Selenium 从某些网页收集信息,即我需要在部署中包含 Selenium(不仅仅是用于测试)。
我正在使用Eclipse IDE,并且之前使用过Eclipse 中的增量部署功能来自动将所有已保存的更改部署到项目中。但是当我包含(使用 Maven)时,Selenium 增量部署的依赖项停止工作。该项目仍然可以部署到 Glassfish,但我必须在每次更改之间重新启动 Glassfish。我在 Eclipse 中收到以下错误:
Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: com.sun.faces.config.ConfigurationException: Unable to parse document 'bundle://136.0:1/com/sun/faces/jsf-ri-runtime.xml': DTD factory class org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl does not extend from DTDDVFactory.. Please see server.log for more details.
org.apache.xerces.impl.dv.dtd.DTDDVFactoryImpl 包含在 Selenium 作为传递依赖项 (xerces:xercesImpl:2.11.0)。
这是我的 Maven 依赖项:
<dependency>
<groupId>org.jboss.arquillian.selenium</groupId>
<artifactId>selenium-bom</artifactId>
<version>2.44.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-htmlunit-driver</artifactId>
</dependency>
我希望有一个解决方案,但在阅读了 Jens Schauder 在Dealing with "Xerces hell" in Java/Maven? 的回复后,恐怕可能没有。有人吗?
【问题讨论】:
标签: maven jakarta-ee selenium glassfish xerces