1
votes

I have a microservice in JavaEE using JMS protocol for messaging. I'm trying to create an UberJar with WildFly Swarm using a remote connection (in this case I have a docker container with an ActiveMq instance running).

In the documentation (https://wildfly-swarm.gitbooks.io/wildfly-swarm-users-guide/content/common/messaging.html), there is no configuration for the username and password. Did you guys know where to put this info ?

Executing the uberJar generated, I have the following error:

2017-06-28 10:49:26,630 ERROR [org.jboss.as.controller.management-operation] (main) WFLYCTL0013: Operation ("add") failed - address: (("deployment" => "srcrr-batcher.war")) - failure description: {
    "WFLYCTL0412: Required services that are not installed:" => ["jboss.naming.context.java.module.srcrr-batcher.srcrr-batcher.env.jms.\"error.inbox\""],
    "WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.srcrr-batcher.srcrr-batcher.env.\"com.magento.mcom.sorcerer.jms.AbstractReceiverBean\".errorQueue is missing [jboss.naming.context.java.module.srcrr-batcher.srcrr-batcher.env.jms.\"error.inbox\"]"]
}
2017-06-28 10:49:26,631 ERROR [org.jboss.as.server] (main) WFLYSRV0021: Deploy of deployment "srcrr-batcher.war" was rolled back with the following failure message:
{
    "WFLYCTL0412: Required services that are not installed:" => ["jboss.naming.context.java.module.srcrr-batcher.srcrr-batcher.env.jms.\"error.inbox\""],
    "WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.srcrr-batcher.srcrr-batcher.env.\"com.magento.mcom.sorcerer.jms.AbstractReceiverBean\".errorQueue is missing [jboss.naming.context.java.module.srcrr-batcher.srcrr-batcher.env.jms.\"error.inbox\"]"]
}

I don't quite understand what dependency is missing, any help would be appreciated.

Thank you!

3

3 Answers

2
votes

These services roughly mechanically translate to JNDI names:

jboss.naming.context.java.module.srcrr-batcher.srcrr/batcher.env.jms.\"error.inbox\"":

java:module/srcrr-batcher/srccrr-batcher/env/jms/error.inbox

The duplicated "srcrr-batcher" is curious.

If you could post a gist of the full server log, possibly with -Dswarm.logging=DEBUG, that could help us determine what's up.

Additionally, the reference guide provides a lot of configuration options for your YAML configuration:

https://reference.wildfly-swarm.io/fractions/messaging.html

2
votes

Finally I found the problem, I had the annotation wrong in the connection factory:

Instead of

@Resource(lookup = "jms/error.inbox")

I use

@Resource(name = "jms/error.inbox")

Thanks for your help!

0
votes

Sorry I have arrived late :) Nice you found it and thanks for using Wildfly Swarm.