[arquillian-issues] [JBoss JIRA] Commented: (ARQ-397) Support Descriptor deployment GlassFish containers

Richard Barabe (JIRA) jira-events at lists.jboss.org
Tue May 24 16:46:01 EDT 2011


    [ https://issues.jboss.org/browse/ARQ-397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12604067#comment-12604067 ] 

Richard Barabe commented on ARQ-397:
------------------------------------

I was interrested in testing it so I checkouted your branch and tryed to install it localy.  First I had the following error :
{quote}{color:red}'dependencies.dependency.version' for org.jboss.shrinkwrap:shrinkwrap-extension-glassfish:jar is missing. @ line 43, column 19{color}{quote}

I just added the version to pom.xml (1.0.0-alpha-12) and now I cannot install because the "IntegrationWarTestCase" fails on :
{quote}
Failed tests: 
  shouldBeAbleToInjectEJBAsInstanceVariable(org.jboss.arquillian.container.glassfish.embedded_3_1.app.IntegrationWarTestCase)
{quote}

It seems that the test case in error was not able to inject the referenced EJB : 
{code:java}
@EJB
private NoInterfaceEJB bean;
   
@Test
public void shouldBeAbleToInjectEJBAsInstanceVariable() throws Exception 
{
   Assert.assertNotNull(
         "Verify that the Bean has been injected",
         bean);
      
   Assert.assertEquals("Arquillian", bean.getName());
}
{code}

Having no clue why this could happend, I just installed it skipping the tests, and tried the installed snapshot on my project.  

The sun-resources.xml is deployed correctly : 
{quote}
INFO: command add-resources result: PlainTextActionReporterSUCCESSDescription: add-resources AdminCommandnull
    JDBC connection pool jdbc/wakwi-pool created successfully.
    JDBC resource jdbc/wakwi-ds created successfully.
{quote}

However ...  I have the problem that the ejb is not injected in my test.
My test code : 
{code:java}
@RunWith(Arquillian.class)
public class TestFileManagementServiceTest {

    @Deployment
    public static WebArchive createDeployment() {
        return ShrinkWrap.create(WebArchive.class, "testFileManagementService.war").addClasses(
            FileManagementService.class,
            File.class, 
            Category.class, 
            FileStore.class,
            CurrentFileStore.class,
            DefaultFileStore.class).
            addAsResource("test-persistence.xml", ArchivePaths.create("META-INF/persistence.xml")).
            addAsResource(EmptyAsset.INSTANCE, "WEB-INF/beans.xml");
    }
    @EJB
    private FileManagementService service;

    @Test
    public void testSaveFile() {
        assertNotNull("Service should have been injected.", service);
    }
}
{code}

Do you have the same problem injecting an EJB using the branch ARQ-397 ?
Is it related ?

> Support Descriptor deployment GlassFish containers
> --------------------------------------------------
>
>                 Key: ARQ-397
>                 URL: https://issues.jboss.org/browse/ARQ-397
>             Project: Arquillian
>          Issue Type: Feature Request
>          Components: GlassFish Containers
>    Affects Versions: 1.0.0.Alpha5
>            Reporter: Aslak Knutsen
>            Assignee: Aslak Knutsen
>             Fix For: glassfish_1.0.0.Beta1
>
>
> in the move from 3.1 to 3.0 the support for sunResourceXML was lost. 
> sunResourceXML support on Suite level should be added as well as Descriptor Deployment support (resourceXML pr testclass).

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the arquillian-issues mailing list