• FAQ Catalog

    This space is host to the Frequently Asked Questions (FAQ) for Arquillian.   A catalog of the FAQs for Arquillian is displayed below, organized by topic area. Each question is answered in a separate document. Yo...
    Profile Photo
    last modified by dan.j.allen
  • Why do I get "No active contexts for scope type" when testing on JBoss AS 7

    A protocol is how Arquillian communicates with the container to execute the tests remotely (i.e., in-container). For ease of development and configuration, a container defines a default protocol that will be used if n...
    Profile Photo
    last modified by dan.j.allen
  • When I run an Arquillian test that uses ShrinkWrap descriptors, I get a nonsensical SAXParseException "content is not allowed in prolog"

    When I run an Arquillian test that uses ShrinkWrap descriptors, I get a nonsensical SAXParseException saying that "content is not allowed in prolog". Why?   Most likely you've passed a file name where the descri...
    Profile Photo
    last modified by ringerc
  • When I run my Arquillian test, I get a ClassNotFoundException for the unit test class its self! How is that possible?

    When I run my Arquillian test, I get a ClassNotFoundException for the unit test class its self! How is that possible?   Arquillian automatically adds the test class to the ShrinkWrap archive, so it must be prese...
    Profile Photo
    last modified by ringerc
  • How do I create or copy and modify persistence.xml, beans.xml, etc?

    I need to create a unit test with a non-empty beans.xml or persistence.xml using Arquillian. How do I do that?   The simplest way is to have a test version of your persistence.xml or beans.xml stored as a separa...
    Profile Photo
    last modified by ringerc
  • What version of Surefire should I use to run my Arquillian tests in a Maven build?

    Sometimes, using the right version of Surefire in your Maven project is important. Version 2.9 of Surefire contains a bug fix for SUREFIRE-743, which prevents a container from cleaning up after an Arquillian test run;...
    Profile Photo
    last modified by vineet.reynolds
  • Where is the Embedded GlassFish 3.1.2 jar?

    The glassfish-embedded-all artifact is required for running tests with the Embedded GlassFish container adapter. When GlassFish 3.1.2 was released, the groupId of this artifact was changed from org.glassfish.extras to...
    Profile Photo
    last modified by dan.j.allen
  • Why do I get a socket connection error when using remote JBoss AS?

    If you are running Ubuntu 10.10, read this FAQ!   Problem  If you're running your tests with the remote JBoss AS container adapter, you may encounter the following socket connection error (assume here your ...
    Profile Photo
    last modified by dan.j.allen
  • Why do I get IllegalStateException ... Kept on getting 404s?

    You may have encountered the situation where Arquillian fails to run the test case when using a web container (Java EE 6 or Servlet), reporting this exception as the reason:   Caused by: java.lang.IllegalStateExc...
    Profile Photo
    last modified by dan.j.allen
  • How does Arquillian know where JBoss AS is installed?

    Arquillian only needs to know where JBoss AS is installed when using the managed container (e.g., jbossas-managed-6). In this case, Arquillian manages the lifecycle of the container and therefore must have access to t...
    Profile Photo
    last modified by dan.j.allen
  • How does a managed container differ from a remote container?

    A managed container is simply a remote container that also includes lifecycle management (start and stop). Unlike an embedded container, however, the container process is not started in the same JVM as the test runner...
    Profile Photo
    last modified by dan.j.allen
  • How do I setup a DataSource in Embedded GlassFish when using Arquillian?

    Glassfish embedded/full will refer to a domain.xml file where can specify datasources, connection pools etc. that you can use for your tests.   1) Configure the test container by placing arquillian.xml in the ro...
    Profile Photo
    last modified by aslak
  • Why are the injection points in my test null?

    If the injection points in your tests (e.g., fields annotated with @Inject) are null, make sure you're running against a CDI capable container. And remember you have to include a /META-INF/beans.xml file in your deplo...
    Profile Photo
    last modified by dan.j.allen
  • Why do I get ClassNotFoundException: WeldException?

    When you run your test, you may encounter an exception that ends in:   Caused by: java.lang.ClassNotFoundException: org.jboss.weld.exceptions.WeldException     at java.net.URLClassLoader$1.run(URLC...
    Profile Photo
    last modified by dan.j.allen
  • How do I manage transactions in my test?

    The developers of Arquillian are strong proponents of integration testing, where you test your real components as they will be used. For this reason, we recommend managing the transaction from inside your EJBs or Mana...
    Profile Photo
    last modified by dan.j.allen
  • How do I install the TestNG 5.11 Eclipse plugin?

    The Arquillian documentation (as of version 1.0.0.Alpha2) contains the following note about the Eclipse TestNG plugin:   You must use the 5.11 version of the TestNG Eclipse plugin, which can be downloaded from te...
    Profile Photo
    last modified by dan.j.allen
  • Why aren't assert statements working?

    You may be finding that assertions that use the assert keyword don't execute.   For the Java keyword "assert" to work you have to enable Assertions in the running Java VM (-ea). If your running against a Remote ...
    Profile Photo
    last modified by dan.j.allen
  • How is Arquillian pronounced?

    Arquillian is pronounced as ˈär-ki-lē-ən, similar sounding to reptilian.
    Profile Photo
    last modified by dan.j.allen
  • Why does Eclipse fail to build Arquillian?

    If you've tried to import an Arquillian module into Eclipse using the m2eclipse plugin, it likely fails to auto-build because the Maven enforcer plugin throws a rule violation. The problem is that when m2eclipse tries...
    Profile Photo
    last modified by dan.j.allen
  • Why don't I see System.out or log messages?

    When you run your Arquillian tests using a remote container, you may be confused why you are not seeing your System.out or log statements in the test output. The reason is, your test is not running in the same Java VM...
    Profile Photo
    last modified by dan.j.allen