1 Reply Latest reply on May 23, 2013 3:20 AM by Aslak Knutsen

    FAQ/Gotcha when using annotation that references another class

    Chris Wash Newbie

      I was trying to group my Arquillian tests in separate JUnit categories, dropping the @Category annotation on it.

       

      I noticed if I don't include the Category's class referenced in the annotation, e.g. ArquillianTests.class from @Category(ArquillianTests.class), I get a rather cryptic error when trying to execute Arquillian tests:

      Tests in error: 
        [com...Test]: Could not deploy to container: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"test.war\".WeldService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"test.war\".WeldService: com.google.common.collect.ComputationException: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy"}}
      

      Including ArquillianTests.class in my deployment fixes the error.  I suppose Arquillian needs it to fully deserialize the test case inside the container?

       

      Anyway just thought I would share incase anyone else runs into this problem.