角中的$ q.all()不能很好地解决

时间:2015-08-19 15:24:08

标签: javascript angularjs q

我正在工厂做3 $ http电话,我遇到了麻烦。

我宣布了4个承诺:

var promise = $q.defer(),
  PBdeferred = $q.defer(),
  Rdeferred = $q.defer(),
  Pdeferred = $q.defer();

之后我第一次调用API

$http.get('/pendingBills').then(function(response) {
  var PendingBills = ['id', 'path', 'reservas', 'importe', 'fecha'];
  PBdeferred.resolve(PendingBills);
});

现在用一个空数组解决最后两个promises(我还没有endopoint)

  Rdeferred.resolve([]);
  Pdeferred.resolve([]);

我在哪里使用$ q.all

$q.all([PBdeferred, Rdeferred, Pdeferred]).then(function (results){
    console.log('Results', results);
    promise.resolve({
      PendingBills: results[0],
      Remittances: results[1],
      Payed: results[2]
    });
  });

并返回高级承诺

return promise.promise;

控制台日志显示了承诺,但我认为承诺已经解决了。

有什么想法解决这个问题?

2 个答案:

答案 0 :(得分:4)

您未正确使用$q.all。它需要一个promises的数组(或对象),而不是一个延迟数组。

更改

$q.all([PBdeferred, Rdeferred, Pdeferred])

$q.all([PBdeferred.promise, Rdeferred.promise, Pdeferred.promise])

答案 1 :(得分:3)

你没有正确使用promises,因为你使用deferred这是一个打破promises链的反模式。不要使用延迟,只需获得每个操作的承诺,然后使用$ q组合它们:

$q.when({})

请注意,$q.resolve()仅在角度1.4之后可用。如果您使用的是先前版本,请使用Running org.arquillian.example.GreeterTest 3e7ee07e-9d99-45a7-a2f9-5d8c934f7c49.jar: /org/ /org/arquillian/ /org/arquillian/example/ /org/arquillian/example/Greeter.class /META-INF/ /META-INF/beans.xml CNTR9269W: The 3e7ee07e-9d99-45a7-a2f9-5d8c934f7c49.jar Enterprise JavaBeans (EJB) module does not have any enterprise beans configured. WSVR0040E: addEjbModule failed for 3e7ee07e-9d99-45a7-a2f9-5d8c934f7c49.jar com.ibm.ejs.container.EJBConfigurationException: The 3e7ee07e-9d99-45a7- a2f9-5d8c934f7c49.jar Enterprise JavaBeans (EJB) module does not have any enterprise beans configured. at com.ibm.ws.ejbcontainer.runtime.AbstractEJBRuntime.startModule(AbstractEJBRuntime.java:747) at com.ibm.websphere.ejbcontainer.EmbeddableContainer.startModules(EmbeddableContainer.java:965) at com.ibm.websphere.ejbcontainer.EmbeddableContainer.start(EmbeddableContainer.java:922) at com.ibm.websphere.ejbcontainer.EmbeddableContainer.open(EmbeddableContainer.java:429) at com.ibm.websphere.ejbcontainer.EmbeddableContainer.newContainer(EmbeddableContainer.java:382) at com.ibm.websphere.ejbcontainer.EmbeddableContainerProvider.createEJBContainer(EmbeddableContainerProvider.java:75) at javax.ejb.embeddable.EJBContainer.createEJBContainer(EJBContainer.java:56) at org.jboss.arquillian.container.was.embedded_8.WebSphereEmbeddedContainer.deploy(WebSphereEmbeddedContainer.java:126) at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:161) at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:128) at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:271) at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deploy(ContainerDeployController.java:127) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611) at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createDeploymentContext(ContainerDeploymentContextHandler.java:78) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611) at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:57) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611) at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) at org.jboss.arquillian.container.impl.client.container.DeploymentExceptionHandler.verifyExpectedExceptionDuringDeploy(DeploymentExceptionHandler.java:50) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611) at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145) at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116) at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67) at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:95) at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:80) at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachDeployment(ContainerDeployController.java:263) at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachManagedDeployment(ContainerDeployController.java:239) at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deployManaged(ContainerDeployController.java:79) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611) at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145) at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116) at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67) at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:101) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611) at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:92) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611) at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:73) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611) at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145) at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116) at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:87) at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:201) at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:422) at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:54) at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:218) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:166) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37) at java.lang.reflect.Method.invoke(Method.java:611) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75) 代替------------------------------------------------------- T E S T S ------------------------------------------------------- Running org.arquillian.example.GreeterTest 28.08.2015 08:50:45 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer setup FEINER: ENTRY 28.08.2015 08:50:45 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer setup FEINER: RETURN 28.08.2015 08:50:45 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer start FEINER: ENTRY 28.08.2015 08:50:45 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer findVirtualMachineIdByName FEINER: ENTRY 28.08.2015 08:50:45 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer findVirtualMachineIdByName FEINER: VMD displayName: 28.08.2015 08:50:45 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer findVirtualMachineIdByName FEINER: VMD id: 4232 28.08.2015 08:50:45 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer findVirtualMachineIdByName FEINER: VMD displayName: 28.08.2015 08:50:45 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer findVirtualMachineIdByName FEINER: VMD id: 6000 28.08.2015 08:50:45 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer findVirtualMachineIdByName FEINER: VMD displayName: org.codehaus.plexus.classworlds.launcher.Launcher - B test 28.08.2015 08:50:45 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer findVirtualMachineIdByName FEINER: VMD id: 3768 28.08.2015 08:50:45 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer findVirtualMachineIdByName FEINER: VMD displayName: C:\Users\UDVT0160\workspace-tests\arquillian- test\target\surefire\surefirebooter5761378801456940119.jar C:\Users\UDVT0160\workspace-tests\arquillian- test\target\surefire\surefire4408666051028541749tmp C:\Users\UDVT0160\workspace-tests\arquillian- test\target\surefire\surefire_05431784421594739159tmp 28.08.2015 08:50:45 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer findVirtualMachineIdByName FEINER: VMD id: 6608 28.08.2015 08:50:45 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer findVirtualMachineIdByName FEINER: VMD displayName: org.codehaus.plexus.classworlds.launcher.Launcher - B test 28.08.2015 08:50:45 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer findVirtualMachineIdByName FEINER: VMD id: 3304 28.08.2015 08:50:45 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer findVirtualMachineIdByName FEINER: RETURN 28.08.2015 08:50:45 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer start FEINER: Starting server with command: [C:\Program Files\Java\jdk1.6.0_33\jre/bin/java, -javaagent:lib/bootstrap-agent.jar, - jar, lib/ws-launch.jar, defaultServer] Start von defaultServer (WebSphere Application Server 8.5.5.6/wlp- 1.0.9.cl50620150610-1749) auf Java HotSpot(TM) 64-Bit Server VM, Version 1.6.0_33-b05 (de_AT) [AUDIT ] CWWKE0001I: Der Server defaultServer wurde gestartet. [AUDIT ] CWWKE0100I: Dieses Produkt ist für den Entwicklungseinsatz und einen beschränkten Produktionseinsatz lizenziert. Die vollständigen Lizenzbedingungen finden Sie unter https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/license/base_ilan/ilan/8.5.5.6/lafiles/de.html. 28.08.2015 08:50:45 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer findVirtualMachineIdByName FEINER: ENTRY 28.08.2015 08:50:45 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer findVirtualMachineIdByName FEINER: VMD displayName: 28.08.2015 08:50:45 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer findVirtualMachineIdByName FEINER: VMD id: 4232 28.08.2015 08:50:45 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer findVirtualMachineIdByName FEINER: VMD displayName: 28.08.2015 08:50:45 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer findVirtualMachineIdByName FEINER: VMD id: 6000 28.08.2015 08:50:45 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer findVirtualMachineIdByName FEINER: VMD displayName: lib/ws-launch.jar defaultServer 28.08.2015 08:50:45 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer findVirtualMachineIdByName FEINER: VMD id: 5028 28.08.2015 08:50:45 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer findVirtualMachineIdByName FEINER: RETURN 5028 28.08.2015 08:50:45 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer getVMLocalConnectorAddress FEINER: service url: null 28.08.2015 08:50:46 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer getVMLocalConnectorAddress FEINER: service url: null [AUDIT ] CWWKF0012I: Im Server wurden die folgenden Features installiert: [localConnector-1.0]. [AUDIT ] CWWKF0011I: Der Server defaultServer ist bereit. 28.08.2015 08:50:46 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer getVMLocalConnectorAddress FEINER: service url: service:jmx:rmi://127.0.0.1/stub/rO0ABXNyAC5qYXZheC5tYW5hZ2VtZW50LnJlbW90ZS5ybWkuUk1JU2VydmVySW1wbF9TdHViAAAAAAAAAAICAAB4cgAaamF2YS5ybWkuc2VydmVyLlJlbW90ZVN0dWLp/tzJi+FlGgIAAHhyABxqYXZhLnJtaS5zZXJ2ZXIuUmVtb3RlT2JqZWN002G0kQxhMx4DAAB4cHc0AAtVbmljYXN0UmVmMgAACTEyNy4wLjAuMQAAwtGrL8n4ssEkwqzPIBMAAAFPcxKol4ABAHg= 28.08.2015 08:50:46 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer start FEINER: vmid: 5028 28.08.2015 08:50:46 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer start FEINER: RETURN 58a96136-072f-49a0-91b2-a88e6246b725.jar: /META-INF/ /META-INF/beans.xml /org/ /org/arquillian/ /org/arquillian/example/ /org/arquillian/example/Greeter.class 28.08.2015 08:50:47 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer getDefaultProtocol FEINER: ENTRY 28.08.2015 08:50:47 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer getDefaultProtocol FEINER: RETURN Servlet 3.0 28.08.2015 08:50:47 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer deploy FEINER: ENTRY 28.08.2015 08:50:47 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer deploy FEINER: Archive provided to deploy method: test.war: /WEB-INF/ /WEB-INF/lib/ /WEB-INF/lib/58a96136-072f-49a0-91b2-a88e6246b725.jar /WEB-INF/lib/arquillian-testenricher-ejb.jar /WEB-INF/lib/arquillian-protocol.jar /WEB-INF/lib/arquillian-junit.jar /WEB-INF/lib/arquillian-testenricher-resource.jar /WEB-INF/lib/arquillian-testenricher-cdi.jar /WEB-INF/lib/arquillian-core.jar /WEB-INF/lib/arquillian-testenricher-initialcontext.jar /WEB-INF/beans.xml 28.08.2015 08:50:47 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer getDropInDirectory FEINER: dropInDir: C:/Users/UDVT0160/workspace- tests/wlp/usr/servers/defaultServer/dropins 28.08.2015 08:50:48 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer waitForMBeanTargetState FEINER: ENTRY 28.08.2015 08:51:08 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer undeploy FEINER: ENTRY 28.08.2015 08:51:08 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer getDropInDirectory FEINER: dropInDir: C:/Users/UDVT0160/workspace- tests/wlp/usr/servers/defaultServer/dropins 28.08.2015 08:51:08 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer waitForMBeanTargetState FEINER: ENTRY 28.08.2015 08:51:08 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer waitForMBeanTargetState FEINER: RETURN 28.08.2015 08:51:08 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer undeploy FEINER: RETURN Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 23.5 sec <<< FAILURE! org.arquillian.example.GreeterTest Time elapsed: 23.499 sec <<< ERROR! org.jboss.arquillian.container.spi.client.container.DeploymentException: Exception while deploying application. at org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer.deploy(WLPManagedContainer.java:315) at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:161) at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$3.call(ContainerDeployController.java:128) at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.executeOperation(ContainerDeployController.java:271) at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deploy(ContainerDeployController.java:127) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) at org.jboss.arquillian.container.impl.client.container.DeploymentExceptionHandler.verifyExpectedExceptionDuringDeploy(DeploymentExceptionHandler.java:50) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createDeploymentContext(ContainerDeploymentContextHandler.java:78) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:57) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145) at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116) at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67) at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:95) at org.jboss.arquillian.container.impl.client.container.ContainerDeployController$1.perform(ContainerDeployController.java:80) at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachDeployment(ContainerDeployController.java:263) at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.forEachManagedDeployment(ContainerDeployController.java:239) at org.jboss.arquillian.container.impl.client.container.ContainerDeployController.deployManaged(ContainerDeployController.java:79) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145) at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116) at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67) at org.jboss.arquillian.container.test.impl.client.ContainerEventController.execute(ContainerEventController.java:101) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:92) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:73) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94) at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:145) at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:116) at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:87) at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:201) at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:422) at org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:54) at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:218) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:166) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75) Caused by: org.jboss.arquillian.container.spi.client.container.DeploymentException: Exception while checking application state. at org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer.waitForApplicationTargetState(WLPManagedContainer.java:565) at org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer.deploy(WLPManagedContainer.java:301) ... 93 more Caused by: org.jboss.arquillian.container.spi.client.container.DeploymentException: Timeout while waiting for ApplicationMBean to reach targetState at org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer.waitForApplicationTargetState(WLPManagedContainer.java:548) ... 94 more 28.08.2015 08:51:08 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer stop FEINER: ENTRY 28.08.2015 08:51:08 org.jboss.arquillian.container.was.wlp_managed_8_5.WLPManagedContainer stop FEINER: RETURN