简体   繁体   English

针对远程Wildfly-8.0.0运行Arquillian时的NPE

[英]NPE when running arquillian against remote Wildfly-8.0.0

Yesterday, when trying to move my integration tests from embedded GF 4 to the remote Wildfly 8 I was getting strange NullPointerException for every arquillian test run against remote Wildfly 8 instance. 昨天,当我尝试将集成测试从嵌入式GF 4迁移到远程Wildfly 8时,针对远程Wildfly 8实例进行的每次Arquillian测试都遇到了奇怪的NullPointerException The same integration test worked just fine on embedded Glassfish 4.0. 相同的集成测试在嵌入式Glassfish 4.0上效果很好。

org.jboss.arquillian.container.spi.client.container.DeploymentException: Cannot deploy: test.war
    at org.jboss.as.arquillian.container.ArchiveDeployer.deployInternal(ArchiveDeployer.java:83)
    at org.jboss.as.arquillian.container.ArchiveDeployer.deployInternal(ArchiveDeployer.java:64)
    at org.jboss.as.arquillian.container.ArchiveDeployer.deploy(ArchiveDeployer.java:46)
    ...
Caused by: java.lang.Exception: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"test.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"test.war\".POST_MODULE: JBAS018733: Failed to process phase POST_MODULE of deployment \"test.war\"
    Caused by: java.lang.NullPointerException"}}
    at org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.getActionResult(ServerDeploymentPlanResultFuture.java:134)
    at org.jboss.as.controller.client.helpers.standalone.impl.ServerDeploymentPlanResultFuture.getResultFromNode(ServerDeploymentPlanResultFuture.java:123)

My test case was extremely easy (deployment with single class), not need to post here. 我的测试用例非常简单(部署单个类),无需在此处发布。
Components used: 使用的组件:

  • Arquillian 1.1.5.Final Arquillian 1.1.5。决赛
  • Wildfly 8.0.0.Final Wildfly 8.0.0。最终版
  • Eclipse Luna 蚀月神

No matter what was the way to launch my test case (from Eclipse IDE and with mvn integration-test ) result was the same. 不管以什么方式启动测试用例(从Eclipse IDE和mvn integration-test )启动,结果都是相同的。

I've lost whole day but managed to find a solution. 我整日迷失了方向,但设法找到了解决方案。

Finally I've managed to fix above error by starting the same server from the command line (not from Eclipse IDE): 最终,我通过从命令行(而不是从Eclipse IDE)启动同一服务器来设法解决了上述错误:

wildfly-8.0.0.Final\bin\standalone.bat

Suddenly problem was gone. 突然问题消失了。 Now my integration tests works fine against remote Wildfly. 现在,我的集成测试可以很好地针对远程Wildfly。
Also I've noticed that original problem doesn't occur anymore on wildfly 8.1.0 . 我也注意到在wildfly 8.1.0上不再出现原始问题。

Hope it will help somebody. 希望它能帮助到别人。

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

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