2 Replies Latest reply: Sep 19, 2010 7:56 AM by Ken Finnigan RSS

    Glassfish Embedded container settings in arquillian.xml error

    Ken Finnigan Master

      Hi,

       

      I'm experiencing a very strange problem when trying to use Arquillian Alpha4 SP1 with Glassfish Embedded.

       

      I've defined the following arquillian.xml file:

      <?xml version="1.0"?>
      <arquillian xmlns="http://jboss.com/arquillian"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:gf="urn:arq:org.jboss.arquillian.glassfish.embedded_3">
      
      
      
         <gf:container>
            <gf:sunResourcesXml>src/test/resources/sun-resources.xml</gf:sunResourcesXml>
         </gf:container>
      
      
      
      </arquillian>
      

       

      When running my test it didn't appear to be picking up the contents of the sun resources file so I stepped through the XMLConfigurationBuilder to see what was happening.

       

      Inside matchContainerConfiguration of XMLConfigurationBuilder it executes the following:

            // select the container configuration that matches the package
            for (ContainerConfiguration cc : containerConfigurations) 
            {
               if (cc.getClass().getName().startsWith(pkg)) 
               {
                  containerConfig = cc;                     
               }
            }

       

      There is only one container configuration present within the collection, Glassfish, and the if statement finds a match and enters the body but when it reaches the line trying to assign cc to containerConfig; cc is no longer a valid variable so null is assigned.

       

      I've never seen anything like this happen before, does anyone know what might be causing it?

       

      Thanks

      Ken