5 Replies Latest reply on Jun 10, 2013 9:49 AM by jacobmm

    arquillian test succeeds despite exceptions

    jacobmm Newbie

      I am using arquillian to test some Swichyard services (the container used is JBoss AS 7.1) and I just realized that a test was reported as successful during the maven build in spite of throwing some exceptions during its execution. The exceptions were caused because of a missing dependency entry in the manifest of the arquillian deployment where I should have added the Switchyard API. Therefor, the exceptions could be fixed easily. However, what worries me is the fact of the test being reported as successful when, in my opinion, it should have failed.

       

      Maybe my latest assumption is wrong or I am not using properly arquillian, so I would really thank any help about this question.

       

      I am not sure if it will really be useful, but I post here the output of my server.log:

       

      17:46:52,280 INFO  [org.jboss.as.repository] (management-handler-thread - 23) JBAS014900: Content added at location /home/user/jboss-installation/switchyard-as7/standalone/data/content/4e/c27e88d5ab7b1adddbfe68c37a50860d671a77/content
      17:46:52,285 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "com.jmm.main.driver.reservation.ear"
      17:46:52,501 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "driverIT.war"
      17:46:52,541 INFO  [org.jboss.weld.deployer] (MSC service thread 1-3) JBAS016002: Processing weld deployment com.jmm.main.driver.reservation.ear
      17:46:52,555 INFO  [org.jboss.weld.deployer] (MSC service thread 1-7) JBAS016002: Processing weld deployment driverIT.war
      17:46:52,560 INFO  [org.jboss.weld.deployer] (MSC service thread 1-5) JBAS016005: Starting Services for CDI deployment: com.jmm.main.driver.reservation.ear
      17:46:52,569 INFO  [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-2) trying to deploy queue jms.topic.Selecttopic
      17:46:52,569 INFO  [org.jboss.weld.deployer] (MSC service thread 1-8) JBAS016008: Starting weld service for deployment com.jmm.main.driver.reservation.ear
      17:46:52,570 INFO  [org.jboss.as.messaging] (MSC service thread 1-2) JBAS011601: Bound messaging object to jndi name java:jboss/exported/topic/Selecttopic
      17:46:52,572 INFO  [org.jboss.as.messaging] (MSC service thread 1-2) JBAS011601: Bound messaging object to jndi name java:/topic/Selecttopic
      17:46:52,635 WARN  [org.jboss.modules] (MSC service thread 1-8) Failed to define class com.jmm.main.common.validation.ValidationResultImpl in Module "deployment.com.jmm.main.driver.reservation.ear:main" from Service Module Loader: java.lang.LinkageError: Failed to link com/jmm/main/common/validation/ValidationResultImpl (Module "deployment.com.jmm.main.driver.reservation.ear:main" from Service Module Loader)
                at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:396)
                at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243)
                at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73)
                at org.jboss.modules.Module.loadModuleClass(Module.java:517)
                at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182)
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
                at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
                at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
                at org.jboss.as.weld.WeldModuleResourceLoader.classForName(WeldModuleResourceLoader.java:68) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]
                at org.jboss.weld.bootstrap.BeanDeployer.loadClass(BeanDeployer.java:98) [weld-core-1.1.6.Final.jar:2012-03-21 18:52]
                at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:77) [weld-core-1.1.6.Final.jar:2012-03-21 18:52]
                at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:123) [weld-core-1.1.6.Final.jar:2012-03-21 18:52]
                at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:184) [weld-core-1.1.6.Final.jar:2012-03-21 18:52]
                at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:349) [weld-core-1.1.6.Final.jar:2012-03-21 18:52]
                at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:82) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]
                at org.jboss.as.weld.services.WeldService.start(WeldService.java:76) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]
                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_21]
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_21]
                at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21]
      Caused by: java.lang.NoClassDefFoundError: org/switchyard/validate/ValidationResult
                at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_21]
                at java.lang.ClassLoader.defineClass(ClassLoader.java:787) [rt.jar:1.7.0_21]
                at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [rt.jar:1.7.0_21]
                at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327)
                at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391)
                ... 21 more
      Caused by: java.lang.ClassNotFoundException: org.switchyard.validate.ValidationResult from [Module "deployment.com.jmm.main.driver.reservation.ear:main" from Service Module Loader]
                at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
                at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
                at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
                ... 26 more
      
      
      17:46:52,642 INFO  [org.jboss.weld.ClassLoading] (MSC service thread 1-8) WELD-000119 Not generating any bean definitions from com.jmm.main.common.validation.ValidationResultImpl because of underlying class loading error
      17:46:52,643 INFO  [org.jboss.weld.ClassLoading] (MSC service thread 1-8) catching: org.jboss.weld.resources.spi.ResourceLoadingException: java.lang.ClassNotFoundException: com.jmm.main.common.validation.ValidationResultImpl from [Module "deployment.com.jmm.main.driver.reservation.ear:main" from Service Module Loader]
                at org.jboss.as.weld.WeldModuleResourceLoader.classForName(WeldModuleResourceLoader.java:74) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]
                at org.jboss.weld.bootstrap.BeanDeployer.loadClass(BeanDeployer.java:98) [weld-core-1.1.6.Final.jar:2012-03-21 18:52]
                at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:77) [weld-core-1.1.6.Final.jar:2012-03-21 18:52]
                at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:123) [weld-core-1.1.6.Final.jar:2012-03-21 18:52]
                at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:184) [weld-core-1.1.6.Final.jar:2012-03-21 18:52]
                at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:349) [weld-core-1.1.6.Final.jar:2012-03-21 18:52]
                at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:82) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]
                at org.jboss.as.weld.services.WeldService.start(WeldService.java:76) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]
                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_21]
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_21]
                at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21]
      Caused by: java.lang.ClassNotFoundException: com.jmm.main.common.validation.ValidationResultImpl from [Module "deployment.com.jmm.main.driver.reservation.ear:main" from Service Module Loader]
                at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
                at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
                at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
                at org.jboss.as.weld.WeldModuleResourceLoader.classForName(WeldModuleResourceLoader.java:68) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]
                ... 12 more
      
      
      17:46:52,648 INFO  [org.jboss.weld.ClassLoading] (MSC service thread 1-8) WELD-000119 Not generating any bean definitions from com.jmm.main.common.validation.BeanValidator because of underlying class loading error
      17:46:52,649 INFO  [org.jboss.weld.ClassLoading] (MSC service thread 1-8) catching: org.jboss.weld.resources.spi.ResourceLoadingException: Error loading class com.jmm.main.common.validation.BeanValidator
                at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:167) [weld-core-1.1.6.Final.jar:2012-03-21 18:52]
                at org.jboss.weld.bootstrap.BeanDeployer.loadWeldClass(BeanDeployer.java:108) [weld-core-1.1.6.Final.jar:2012-03-21 18:52]
                at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:79) [weld-core-1.1.6.Final.jar:2012-03-21 18:52]
                at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:123) [weld-core-1.1.6.Final.jar:2012-03-21 18:52]
                at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:184) [weld-core-1.1.6.Final.jar:2012-03-21 18:52]
                at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:349) [weld-core-1.1.6.Final.jar:2012-03-21 18:52]
                at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:82) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]
                at org.jboss.as.weld.services.WeldService.start(WeldService.java:76) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]
                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_21]
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_21]
                at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_21]
      Caused by: java.lang.NoClassDefFoundError: org/switchyard/validate/ValidationResult
                at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0_21]
                at java.lang.Class.privateGetDeclaredFields(Class.java:2317) [rt.jar:1.7.0_21]
                at java.lang.Class.getDeclaredFields(Class.java:1762) [rt.jar:1.7.0_21]
                at org.jboss.weld.util.reflection.SecureReflections$4.work(SecureReflections.java:105) [weld-core-1.1.6.Final.jar:2012-03-21 18:52]
                at org.jboss.weld.util.reflection.SecureReflections$4.work(SecureReflections.java:102) [weld-core-1.1.6.Final.jar:2012-03-21 18:52]
                at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52) [weld-core-1.1.6.Final.jar:2012-03-21 18:52]
                at org.jboss.weld.util.reflection.SecureReflectionAccess.runAndWrap(SecureReflectionAccess.java:63) [weld-core-1.1.6.Final.jar:2012-03-21 18:52]
                at org.jboss.weld.util.reflection.SecureReflections.getDeclaredFields(SecureReflections.java:102) [weld-core-1.1.6.Final.jar:2012-03-21 18:52]
                at org.jboss.weld.introspector.jlr.WeldClassImpl.<init>(WeldClassImpl.java:154) [weld-core-1.1.6.Final.jar:2012-03-21 18:52]
                at org.jboss.weld.introspector.jlr.WeldClassImpl.of(WeldClassImpl.java:119) [weld-core-1.1.6.Final.jar:2012-03-21 18:52]
                at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:59) [weld-core-1.1.6.Final.jar:2012-03-21 18:52]
                at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:50) [weld-core-1.1.6.Final.jar:2012-03-21 18:52]
                at com.google.common.collect.ComputingConcurrentHashMap$ComputingValueReference.compute(ComputingConcurrentHashMap.java:355) [guava-14.0.1.jar:]
                at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.compute(ComputingConcurrentHashMap.java:184) [guava-14.0.1.jar:]
                at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.getOrCompute(ComputingConcurrentHashMap.java:153) [guava-14.0.1.jar:]
                at com.google.common.collect.ComputingConcurrentHashMap.getOrCompute(ComputingConcurrentHashMap.java:69) [guava-14.0.1.jar:]
                at com.google.common.collect.ComputingConcurrentHashMap$ComputingMapAdapter.get(ComputingConcurrentHashMap.java:393)
                at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:163) [weld-core-1.1.6.Final.jar:2012-03-21 18:52]
                ... 12 more
      Caused by: java.lang.ClassNotFoundException: org.switchyard.validate.ValidationResult from [Module "deployment.com.jmm.main.driver.reservation.ear:main" from Service Module Loader]
                at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
                at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
                at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
                ... 30 more
      
      
      17:46:52,685 INFO  [org.jboss.web] (MSC service thread 1-4) JBAS018210: Registering web context: /driverIT
      17:46:52,812 INFO  [org.jboss.as.server] (management-handler-thread - 23) JBAS018559: Deployed "com.jmm.main.driver.reservation.ear"
      17:46:53,193 INFO  [com.jmm.main.driver.reservation.impl.ReservationdriverBean] (http--127.0.0.1-8080-2) Message sent
      17:46:53,248 INFO  [org.jboss.as.messaging] (MSC service thread 1-7) JBAS011605: Unbound messaging object to jndi name java:jboss/exported/topic/Selecttopic
      17:46:53,249 INFO  [org.jboss.as.messaging] (MSC service thread 1-7) JBAS011605: Unbound messaging object to jndi name java:/topic/Selecttopic
      17:46:53,257 INFO  [org.jboss.weld.deployer] (MSC service thread 1-7) JBAS016009: Stopping weld service for deployment com.jmm.main.driver.reservation.ear
      17:46:53,275 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment driverIT.war in 28ms
      17:46:53,281 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment com.jmm.main.driver.reservation.ear in 35ms
      17:46:53,412 INFO  [org.jboss.as.repository] (management-handler-thread - 24) JBAS014901: Content removed from location /home/user/jboss-installation/switchyard-as7/standalone/data/content/4e/c27e88d5ab7b1adddbfe68c37a50860d671a77/content
      17:46:53,414 INFO  [org.jboss.as.server] (management-handler-thread - 24) JBAS018558: Undeployed "com.jmm.main.driver.reservation.ear"