Bootable WF21 with an EJB Ear having an MDB

141 views
Skip to first unread message

Fred Welland

unread,
Oct 20, 2020, 3:19:18 PM10/20/20
to WildFly
This works:   Bootable WF21 + RAR + Simple MDB.jar 

This doesn't work:   Bootable WF 21 + RAR + EAR (having simple MDB.jar -- yep same exact jar from working example above) 

Any way to 'activate' the EAR or the guts of the EAR so it will hook up the contained MDB? 

Brian Stansberry

unread,
Oct 20, 2020, 4:28:00 PM10/20/20
to WildFly
What layers are you using? legacy-security,resource-adapters,ejb? Then the resource adapter config you mentioned in another thread I just replied to, plus the deployment?

Brian Stansberry

unread,
Oct 20, 2020, 4:29:11 PM10/20/20
to WildFly
Also, how does it fail?

Fred Welland

unread,
Oct 21, 2020, 8:16:35 AM10/21/20
to Brian Stansberry, WildFly
Thanks for all you help on this!     A few notes: 
  • I didn't fail, with something like an error in stdout or something; it just didn't 'start' the RAR AMQ connection like it would with the MDB.jar case.    There is a message in the log that is suspicious  (more on that below) 
  • Layers are:   legacy-security, resource-adapters, ejb.   And yeah exactly like in my other email thread.   Can provide lots more details as needed. 
  • Took the ear and dropped it into full WF21 install; worked as expected.   EAR is very simple; has only the MDB.jar in it. 
  • JDK 11
  • I am doing something that might be strange:   in the pom, I specify <hollow-jar>true</hollow-jar>;  but I have a cli session where I literally deploy the rar and then the EAR (or MDB.jar).   I did this because when I did a deploy of rar -- and tried to boot via java -jar hollow.jar --deployment=myjar.jar ; it would complain saying something is already deployed.   On whim, I tried to deploy my artifact via cli session and that actually worked.   The only difference between two tests is 'deploy --name=SilvertipMDB  build/Silvertip.ear'   vs 'deploy --name=SilvertipMDB  build/Silvertip.jar' 
log/stdout snippet of mdb.jar case (i.e. this is working case): 
07:21:46,713 INFO  [org.jboss.as.connector.deployment] (MSC service thread 1-5) WFLYJCA0002: Bound JCA ConnectionFactory [java:/amq/ConnectionFactory]
07:21:46,744 INFO  [org.jboss.as.ejb3] (MSC service thread 1-2) WFLYEJB0042: Started message driven bean 'SimpleMDB' with 'AMQBroker' resource adapter
07:21:46,759 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0010: Deployed "SilvertipMDB" (runtime-name : "SilvertipMDB")
07:21:46,760 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0010: Deployed "ActiveMQ-RAR" (runtime-name : "activemq-rar.rar")
07:21:46,818 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
2020-10-21 07:21:46,824 [ler Boot Thread] INFO  ActiveMQEndpointWorker         - Starting
2020-10-21 07:21:46,834 [ult-threads - 1] INFO  ActiveMQEndpointWorker         - Establishing connection to broker [failover:(ssl://queuebroker-a.dev1.promnetwork.com:61617,ssl://queuebroker-b.dev1.promnetwork.com:61617)?nested.verifyHostName=false]
07:21:46,836 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) started in 4845ms - Started 337 of 380 services (117 services are lazy, passive or on-demand)
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.activemq.util.IntrospectionSupport (vfs:/content/activemq-rar.rar/activemq-client-5.15.12.jar) to method sun.security.ssl.SSLSocketImpl.setHost(java.lang.String)
WARNING: Please consider reporting this to the maintainers of org.apache.activemq.util.IntrospectionSupport
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2020-10-21 07:21:47,594 [ActiveMQ Task-1] INFO  FailoverTransport              - Successfully connected to ssl://queuebroker-a.dev1.promnetwork.com:61617?verifyHostName=false
2020-10-21 07:21:47,658 [ult-threads - 1] INFO  ActiveMQEndpointWorker         - Successfully established connection to broker [failover:(ssl://queuebroker-a.dev1.
blahblah.com:61617,ssl://queuebroker-b.dev1.blahblah.com:61617)?nested.verifyHostName=false]

log/stdout snippet of EAR case (i.e. this is not working case): 
07:31:29,055 INFO  [org.jboss.as.connector.deployers.RaXmlDeployer] (MSC service thread 1-2) IJ020002: Deployed: file:/tmp/wildfly-bootable-server3282619647081843523/standalone/tmp/vfs/temp/tempf72bf7fa7b180e49/content-a76eca7014baed03/contents/
07:31:29,058 INFO  [org.jboss.as.connector.deployment] (MSC service thread 1-8) WFLYJCA0002: Bound JCA ConnectionFactory [java:/amq/ConnectionFactory]
07:31:29,066 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0010: Deployed "SilvertipMDB" (runtime-name : "SilvertipMDB")
07:31:29,068 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0010: Deployed "ActiveMQ-RAR" (runtime-name : "activemq-rar.rar")
07:31:29,112 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
07:31:29,114 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) started in 5187ms - Started 315 of 359 services (117 services are lazy, passive or on-demand)





--
You received this message because you are subscribed to the Google Groups "WildFly" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wildfly+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wildfly/34901345-2e83-4a02-8c9a-6d121863ca1fn%40googlegroups.com.

Jean Francois Denise

unread,
Oct 21, 2020, 12:39:35 PM10/21/20
to wil...@googlegroups.com
Hi,
could you try to start the un-packaged server by calling: <project dir>/target/bootable-jar-build-artifacts/wildfly/bin/standalone.sh and let us know if you still see the issue?

On 10/21/20 2:16 PM, Fred Welland wrote:
Thanks for all you help on this!     A few notes: 
  • I didn't fail, with something like an error in stdout or something; it just didn't 'start' the RAR AMQ connection like it would with the MDB.jar case.    There is a message in the log that is suspicious  (more on that below) 
  • Layers are:   legacy-security, resource-adapters, ejb.   And yeah exactly like in my other email thread.   Can provide lots more details as needed. 
  • Took the ear and dropped it into full WF21 install; worked as expected.   EAR is very simple; has only the MDB.jar in it. 
  • JDK 11
  • I am doing something that might be strange:   in the pom, I specify <hollow-jar>true</hollow-jar>;  but I have a cli session where I literally deploy the rar and then the EAR (or MDB.jar).   I did this because when I did a deploy of rar -- and tried to boot via java -jar hollow.jar --deployment=myjar.jar ; it would complain saying something is already deployed.   On whim, I tried to deploy my artifact via cli session and that actually worked.   The only difference between two tests is 'deploy --name=SilvertipMDB  build/Silvertip.ear'   vs 'deploy --name=SilvertipMDB  build/Silvertip.jar'
FYI: You should be able to also go without setting hollow-jar,  the plugin would package the ear (or jar). The CLI script would only deploy the RAR.

Jean Francois Denise

unread,
Oct 21, 2020, 2:40:12 PM10/21/20
to wil...@googlegroups.com
I isolated your problem,
You are deploying the ear providing a name that doesn't end by .ear extension. This makes both name and runtime-name to have no extension. At least set a runtime-name that ends with .ear.
NB: If you let the plugin package the ear file you will not observe the problem.
JF

Fred Welland

unread,
Oct 21, 2020, 2:54:52 PM10/21/20
to Jean Francois Denise, WildFly
Cool!   Didn't know you could do that.   

In both runs I started via:   ./target/bootable-jar-build-artifacts/wildfly/bin/standalone.sh --properties src/main/resources/Leopard.dev.properties

Below are the last dozen or so log lines from each test.     (FWIW:  I see some odd messages in the EAR version up 'higher' in the log; I will pasted in the full log way down below) 

EAR Version  (not working)
13:28:00,576 INFO  [org.jboss.as.connector.deployment] (MSC service thread 1-8) WFLYJCA0002: Bound JCA ConnectionFactory [java:/amq/ConnectionFactory]
13:28:00,583 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0010: Deployed "SilvertipMDB" (runtime-name : "SilvertipMDB")
13:28:00,584 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0010: Deployed "ActiveMQ-RAR" (runtime-name : "activemq-rar.rar")
13:28:00,633 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
13:28:00,635 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) started in 5798ms - Started 315 of 359 services (117 services are lazy, passive or on-demand)

JAR Version (working)
13:32:09,890 INFO  [org.jboss.as.connector.deployment] (MSC service thread 1-6) WFLYJCA0002: Bound JCA ConnectionFactory [java:/amq/ConnectionFactory]
13:32:09,922 INFO  [org.jboss.as.ejb3] (MSC service thread 1-2) WFLYEJB0042: Started message driven bean 'SimpleMDB' with 'AMQBroker' resource adapter
13:32:09,935 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0010: Deployed "SilvertipMDB" (runtime-name : "SilvertipMDB")
13:32:09,936 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0010: Deployed "ActiveMQ-RAR" (runtime-name : "activemq-rar.rar")
13:32:09,989 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
13:32:09,996 INFO  [stdout] (Controller Boot Thread) 2020-10-21 13:32:09,995 [ler Boot Thread] INFO  ActiveMQEndpointWorker         - Starting
13:32:10,005 INFO  [stdout] (default-threads - 1) 2020-10-21 13:32:10,004 [ult-threads - 1] INFO  ActiveMQEndpointWorker         - Establishing connection to broker [failover:(ssl://queuebroker-a.dev1.promnetwork.com:61617,ssl://queuebroker-b.dev1.promnetwork.com:61617)?nested.verifyHostName=false]
13:32:10,006 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) started in 5761ms - Started 337 of 380 services (117 services are lazy, passive or on-demand)

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.activemq.util.IntrospectionSupport (vfs:/content/activemq-rar.rar/activemq-client-5.15.12.jar) to method sun.security.ssl.SSLSocketImpl.setHost(java.lang.String)
WARNING: Please consider reporting this to the maintainers of org.apache.activemq.util.IntrospectionSupport
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
13:32:10,597 INFO  [stdout] (ActiveMQ Task-1) 2020-10-21 13:32:10,597 [ActiveMQ Task-1] INFO  FailoverTransport              - Successfully connected to ssl://queuebroker-a.dev1.promnetwork.com:61617?verifyHostName=false
13:32:10,682 INFO  [stdout] (default-threads - 1) 2020-10-21 13:32:10,682 [ult-threads - 1] INFO  ActiveMQEndpointWorker         - Successfully established connection to broker [failover:(ssl://queuebroker-a.dev1.blah.com:61617,ssl://queuebroker-b.dev1.blah.com:61617)?nested.verifyHostName=false]

The full log of non working case  (Notice the EJB suspension message???) 

=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /home/fwelland/JavaStuff/Projects/fhw/runnablewildflymdbinear/wildfly/target/bootable-jar-build-artifacts/wildfly

  JAVA: /opt/jdk11/bin/java

  JAVA_OPTS:  -server -Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true  --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED --add-exports=jdk.unsupported/sun.reflect=ALL-UNNAMED

=========================================================================

13:48:18,902 INFO  [org.jboss.modules] (main) JBoss Modules version 1.10.2.Final
13:48:19,541 INFO  [org.jboss.msc] (main) JBoss MSC version 1.4.12.Final
13:48:19,551 INFO  [org.jboss.threads] (main) JBoss Threads version 2.4.0.Final
13:48:19,714 INFO  [org.jboss.as] (MSC service thread 1-3) WFLYSRV0049: WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) starting
13:48:20,533 INFO  [org.wildfly.security] (ServerService Thread Pool -- 11) ELY00001: WildFly Elytron version 1.13.1.Final
13:48:21,266 WARN  [org.jboss.as.txn] (ServerService Thread Pool -- 28) WFLYTX0013: The node-identifier attribute on the /subsystem=transactions is set to the default value. This is a danger for environments running multiple servers. Please make sure the attribute value is unique.
13:48:21,292 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 24) WFLYNAM0001: Activating Naming Subsystem
13:48:21,293 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 20) WFLYCLINF0001: Activating Infinispan subsystem.
13:48:21,294 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 27) WFLYSEC0002: Activating Security Subsystem
13:48:21,306 INFO  [org.jboss.as.security] (MSC service thread 1-5) WFLYSEC0001: Current PicketBox version=5.0.3.Final-redhat-00006
13:48:21,313 INFO  [org.jboss.as.connector] (MSC service thread 1-7) WFLYJCA0009: Starting JCA Subsystem (WildFly/IronJacamar 1.4.23.Final)
13:48:21,348 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0003: Undertow 2.2.2.Final starting
13:48:21,352 INFO  [org.xnio] (ServerService Thread Pool -- 21) XNIO version 3.8.2.Final
13:48:21,362 INFO  [org.jboss.as.naming] (MSC service thread 1-3) WFLYNAM0003: Starting Naming Service
13:48:21,399 INFO  [org.xnio.nio] (ServerService Thread Pool -- 21) XNIO NIO Implementation Version 3.8.2.Final
13:48:21,436 INFO  [org.wildfly.extension.io] (ServerService Thread Pool -- 21) WFLYIO001: Worker 'default' has auto-configured to 16 IO threads with 128 max task threads based on your 8 available processors
13:48:21,558 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0012: Started server default-server.
13:48:21,624 INFO  [org.jboss.remoting] (MSC service thread 1-3) JBoss Remoting version 5.0.19.Final
13:48:21,653 INFO  [org.jboss.as.ejb3] (MSC service thread 1-6) WFLYEJB0481: Strict pool slsb-strict-max-pool is using a max instance size of 128 (per class), which is derived from thread worker pool sizing.
13:48:21,654 INFO  [org.jboss.as.ejb3] (MSC service thread 1-8) WFLYEJB0482: Strict pool mdb-strict-max-pool is using a max instance size of 32 (per class), which is derived from the number of CPUs on this host.
13:48:21,729 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-4) WFLYUT0006: Undertow HTTP listener default listening on 127.0.0.1:8080
13:48:21,818 INFO  [org.jboss.as.ejb3] (MSC service thread 1-6) WFLYEJB0493: EJB subsystem suspension complete
13:48:21,848 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0027: Starting deployment of "SilvertipMDB" (runtime-name: "SilvertipMDB")
13:48:21,848 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0027: Starting deployment of "ActiveMQ-RAR" (runtime-name: "activemq-rar.rar")
13:48:22,535 INFO  [org.infinispan.CONTAINER] (ServerService Thread Pool -- 30) ISPN000128: Infinispan version: Infinispan 'Corona Extra' 11.0.4.Final
13:48:22,677 INFO  [org.infinispan.CONFIG] (MSC service thread 1-1) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
13:48:22,679 INFO  [org.infinispan.CONFIG] (MSC service thread 1-1) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
13:48:22,817 INFO  [org.infinispan.PERSISTENCE] (ServerService Thread Pool -- 30) ISPN000556: Starting user marshaller 'org.wildfly.clustering.infinispan.spi.marshalling.InfinispanProtoStreamMarshaller'
13:48:23,060 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 30) WFLYCLINF0002: Started http-remoting-connector cache from ejb container
13:48:24,231 INFO  [org.jboss.as.connector.deployers.RADeployer] (MSC service thread 1-4) IJ020001: Required license terms for file:/home/fwelland/JavaStuff/Projects/fhw/runnablewildflymdbinear/wildfly/target/bootable-jar-build-artifacts/wildfly/standalone/tmp/vfs/temp/tempa1b0ed1fcd9e1548/content-501181fad2d27bfa/contents/
13:48:24,348 WARN  [org.jboss.as.connector.deployers.RADeployer] (MSC service thread 1-4) IJ020017: Invalid archive: file:/home/fwelland/JavaStuff/Projects/fhw/runnablewildflymdbinear/wildfly/target/bootable-jar-build-artifacts/wildfly/standalone/tmp/vfs/temp/tempa1b0ed1fcd9e1548/content-501181fad2d27bfa/contents/
13:48:24,353 INFO  [org.jboss.as.connector.deployers.RaXmlDeployer] (MSC service thread 1-5) IJ020001: Required license terms for file:/home/fwelland/JavaStuff/Projects/fhw/runnablewildflymdbinear/wildfly/target/bootable-jar-build-artifacts/wildfly/standalone/tmp/vfs/temp/tempa1b0ed1fcd9e1548/content-501181fad2d27bfa/contents/
13:48:24,393 INFO  [org.jboss.as.connector.deployment] (MSC service thread 1-5) WFLYJCA0007: Registered connection factory java:/amq/ConnectionFactory
13:48:24,397 WARN  [org.jboss.as.connector.deployers.RaXmlDeployer] (MSC service thread 1-5) IJ020016: Missing <recovery> element. XA recovery disabled for: java:/amq/ConnectionFactory
13:48:24,409 WARN  [org.jboss.as.connector.deployers.RaXmlDeployer] (MSC service thread 1-5) IJ020017: Invalid archive: file:/home/fwelland/JavaStuff/Projects/fhw/runnablewildflymdbinear/wildfly/target/bootable-jar-build-artifacts/wildfly/standalone/tmp/vfs/temp/tempa1b0ed1fcd9e1548/content-501181fad2d27bfa/contents/
13:48:24,411 INFO  [org.jboss.as.connector.deployers.RaXmlDeployer] (MSC service thread 1-5) IJ020002: Deployed: file:/home/fwelland/JavaStuff/Projects/fhw/runnablewildflymdbinear/wildfly/target/bootable-jar-build-artifacts/wildfly/standalone/tmp/vfs/temp/tempa1b0ed1fcd9e1548/content-501181fad2d27bfa/contents/
13:48:24,414 INFO  [org.jboss.as.connector.deployment] (MSC service thread 1-7) WFLYJCA0002: Bound JCA ConnectionFactory [java:/amq/ConnectionFactory]
13:48:24,423 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0010: Deployed "SilvertipMDB" (runtime-name : "SilvertipMDB")
13:48:24,424 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0010: Deployed "ActiveMQ-RAR" (runtime-name : "activemq-rar.rar")
13:48:24,484 INFO  [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
13:48:24,487 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 21.0.0.Final (WildFly Core 13.0.1.Final) started in 6028ms - Started 315 of 359 services (117 services are lazy, passive or on-demand)



Fred Welland

unread,
Oct 21, 2020, 3:14:57 PM10/21/20
to Jean Francois Denise, WildFly
Yep that fixed it.   THANKS!!!

I just changed the deploy cli from 

deploy --name=SilvertipMDB  build/Silvertip.ear
to 
deploy build/Silvertip.ear 

Gotta be honest -- we are a gradle shop and do very little maven stuff and have an established set of gradle builds making EAR and WAR artifacts (plus all our other stuff like sonar, owasp, and a few other things).   Not seeing any traction to get a gradle plugin for bootable WF; so adding a simple call out to assemble a bootable via maven for already built artifacts is attractive.    

Jean Francois Denise

unread,
Oct 22, 2020, 5:48:33 AM10/22/20
to Fred Welland, WildFly
Hi,
excellent! We are adding a bootable JAR example to cover MDB + RAR: https://github.com/wildfly-extras/wildfly-jar-maven-plugin/pull/150
JF
Reply all
Reply to author
Forward
0 new messages