[jboss-jira] [JBoss JIRA] (WFLY-10432) JMS queue resource is not found

Stuart Douglas (JIRA) issues at jboss.org
Thu May 24 00:26:00 EDT 2018


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

Stuart Douglas commented on WFLY-10432:
---------------------------------------

So there are a few parts to this issue:

The first is that @BeforeClass is not guaranteed to run before @Deployment so there is no guarantee the queue is created before the deployment. This can be worked around by using ServerSetupTask which is guaranteed to run before the deployment.

The second is that this test should never have passed in the first place. It uses @Resource on a CDI bean without @Produces which should not have been supported. CDI uses resource produces to bridge the gap between name based and type safe injection, which is why producer fields are required.

The third is that it appears that CDI @Resource and EE @Resource are handled in subtly different ways. A mappedName or lookup of 'foo' on an EE resource translates to java:comp/env/foo, while for a CDI bean it translates to java:/foo. This is unspecified behaviour, so the spec gives no guidance here.

The easiest way to make this test pass is to change the lookup to be explicit (i.e. prefix with java:/), and change the setup to use @ServerSetup. 


> JMS queue resource is not found
> -------------------------------
>
>                 Key: WFLY-10432
>                 URL: https://issues.jboss.org/browse/WFLY-10432
>             Project: WildFly
>          Issue Type: Bug
>          Components: Naming
>    Affects Versions: 13.0.0.Beta1
>            Reporter: Erich Duda
>            Priority: Blocker
>
> Deploying of \[1\] fails with following exception.
> {code}
> org.jboss.arquillian.container.spi.client.container.DeploymentException: Cannot deploy InjectionTest.war: {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => {"WFLYCTL0412: Required services that are not installed:" => ["jboss.naming.context.java.module.InjectionTest.InjectionTest.env.jms.queue.test"],"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.InjectionTest.InjectionTest.env.\"org.jboss.resteasy.test.cdi.injection.resource.CDIInjectionResourceProducer\".bookQueue is missing [jboss.naming.context.java.module.InjectionTest.InjectionTest.env.jms.queue.test]"]}}}
> {code}
> The deployment is part of Resteasy test suite. The same test works with Wildfly 12.
> *Blocker priority* was chosen because this is regression against Wildfly 12.
> *User's impact:* Some deployments can stop working after upgrade to Wildfly 13.
> I found out that the regression is caused by the commit [WFLY-10358|https://github.com/wildfly/wildfly/commit/a9b7a64ac3f556f2f7a5d3a195676d814f54dee5]
> \[1\] https://github.com/resteasy/Resteasy/blob/master/testsuite/integration-tests/src/test/java/org/jboss/resteasy/test/cdi/injection/resource/CDIInjectionResourceProducer.java



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the jboss-jira mailing list