【问题标题】:Parser problem with Seam TestSeam Test 的解析器问题
【发布时间】:2010-07-09 13:46:46
【问题描述】:

我在 Eclipse 中有一个 Maven 项目,一个使用 Seam 的网络项目。现在我想使用 Seam Test 进行单元测试。我没有使用 SeamGen 来创建项目。

我遵循了这个指南,但是当我运行我的测试时,我得到了这个错误。我感觉使用了错误的 sax 解析器。有人认识吗?

[解析器] 运行::\Documents and Settings\PEJA715\Local Settings\Temp\testng-eclipse\testng-customsuite.xml 配置失败:@BeforeSuite startSeam java.lang.RuntimeException:无法引导: 在 org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:147) 在 org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:183) 在 org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:195) 在 org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:11) 在 org.jboss.seam.mock.AbstractSeamT​​est.startJbossEmbeddedIfNecessary(AbstractSeamT​​est.java:1024) 在 org.jboss.seam.mock.AbstractSeamT​​est.startSeam(AbstractSeamT​​est.java:915) 在 org.jboss.seam.mock.SeamT​​est.startSeam(SeamT​​est.java:58) 原因:org.jboss.xb.binding.JBossXBRuntimeException:无法创建新的 SAX 解析器 在 org.jboss.xb.binding.UnmarshallerFactory$UnmarshallerFactoryImpl.newUnmarshaller(UnmarshallerFactory.java:100) 在 org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer.deploy(BeanXMLDeployer.java:85) 在 org.jboss.embedded.Bootstrap.deployBaseBootstrapUrl(Bootstrap.java:130) 在 org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:142) ... 21 更多 原因:org.jboss.xb.binding.JBossXBException:无法创建新的 SAX 解析器 在 org.jboss.xb.binding.parser.sax.SaxJBossXBParser.(SaxJBossXBParser.java:97) 在 org.jboss.xb.binding.UnmarshallerImpl.(UnmarshallerImpl.java:55) 在 org.jboss.xb.binding.UnmarshallerFactory$UnmarshallerFactoryImpl.newUnmarshaller(UnmarshallerFactory.java:96) ... 24 更多 原因:javax.xml.parsers.ParserConfigurationException:无法识别功能“http://apache.org/xml/features/xinclude”。 在 org.apache.xerces.jaxp.SAXParserFactoryImpl.newSAXParser(未知来源) 在 org.jboss.xb.binding.parser.sax.SaxJBossXBParser.(SaxJBossXBParser.java:92) ... 26 更多 ... 删除了 15 个堆栈帧 跳过配置:@BeforeClass setupClass 跳过配置:@BeforeMethod 开始 跳过配置:@AfterMethod 结束 跳过配置:@AfterClass cleanupClass 跳过:测试注册 ================================================ 测试测试 测试运行:1,失败:0,跳过:1 配置失败:1,跳过:4 ================================================ ================================================ 努力网 总测试运行:1,失败:0,跳过:1 配置失败:1,跳过:5 ================================================ [org.testng.internal.PoolService] 关闭 poolservice org.testng.internal.PoolService@1117a20 终止:false

【问题讨论】:

    标签: maven-2 seam testing saxparser


    【解决方案1】:

    很难从堆栈跟踪中说出来(显示您的依赖项可能会有所帮助),但请仔细检查您是否使用了 JBoss 5.0.1.GA 使用的 SAX 解析器(而不是您可能会传递的 xml-apis)。

    【讨论】:

      猜你喜欢
      • 2017-10-15
      • 1970-01-01
      • 1970-01-01
      • 2020-10-19
      • 2020-01-18
      • 2011-08-02
      • 2012-02-29
      • 2011-01-20
      • 1970-01-01
      相关资源
      最近更新 更多