0 Replies Latest reply on Aug 30, 2017 11:35 PM by George Berish

    Why Won't My Error Free Deployed MDB Log or at least write to System.out?

    George Berish Novice

      My application - gotest.ear - deploys successfully.

      No warnings. No errors. WFly log indicates my MessageDrivenBean was deployed.

       

      Ultimate problem is MDB won’t respond to my client.

      Immediate problem is I can’t get my MessageDrivenBean to write to System.out at all, let alone log any messages!

       

      And until I can get it to log or write I don’t have a clue as to what’s wrong.

      Can anyone help.

       

      Here's the info  I’ve pasted below:

      --- The standalone-full.xml line entry for the queue the MDB is listening to.

      --- All the ancillary info listed in the WFly Conosole Configuration Section  for the queue to which my MDB is supposed to listen

      --- Excerpts from Wildfly’s Console Output.

      --- The bare bones of MDB Code

       

      Excerpts below from the Console seems to confirm

      1: WFly starts my MDB (GoMsgBean) ok.

      2: My entire app was successfully deployed (gotest.ear)

      3: Logging is correctly configured, because there’s a message logged from one of my Serializable JPA classes – “Member” – in my own format to the WFly console output below.

      4: WF acknowledges it knows there’s a queue named “jms/queue/sendToServerQueue”

      5: WF successfully starts.

       

      6: But after starting there's a troubling series of INFO lines at the end. They seem to be at the heart of the no response problem.  One is the INFO line that says its again "Attempting to reconnect" to ArtemisMQMost. And

      --- the localhost:9990 Configuration info below says jms/queue/sendToServerQueue is “durable”

      --- But this INFO item says it is not???????

       

      I mean with no Warnings or exceptions anywhere I have no idea what to do other than get the MDB to write to my logs and WFLY console ... which it isn’t doing ever.

       

      So first can anyone tell me why for example the PostConstructor method won't write a simple message anywhere?

       

      MDB Code

      @MessageDriven( 

          activationConfig ={ 

      @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),

            @ActivationConfigProperty(propertyName="maxSession",propertyValue="1"), 

            @ActivationConfigProperty(propertyName="destination", propertyValue="jms/queue/sendToServerQueue")

          })

       

      @ApplicationScoped

      public class GoMsgBean implements MessageListener {

        @Resource   MessageDrivenContext  mdbCtx;

        @EJB        EnrollerBean          enrollerBean;

        @EJB        ExiterBean            exiterBean;

        @EJB        LoginerBean           loginerBean;

        @EJB        LogouterBean          logouterBean;

        @EJB        ReplierBean           replierBean;

       

        @Transient

        final Logger logger = Logger.getLogger(GoMsgBean.class.getName());

       

        @Resource(name = "java:jboss/exported/jms/queue/sendToClientQueue") 

        private Queue sendToClientQueue;

       

        public GoMsgBean () {

          System.out.println("System.out message FROM GoMsgBean Constructor");

          logger.info("Logger message FROM GoMsgBean Constructor");

        }

           

       

        @PostConstruct

          System.out.println("System.out message FROM GoMsgBean PostConstruct");

          logger.info("Logger message FROM GoMsgBean PostConstruct");

        }

         

        @PreDestroy

        public void myDestroy () {

          System.out.println("System.out message FROM GoMsgBean PreDestroy");

          logger.info("Logger message FROM GoMsgBean PreDestroy");

        }

       

        public void onMessage(Message msg) {

          System.out.println("System.out message FROM GoMsgBean onMessage()");

          logger.info("Logger message FROM GoMsgBean onMessage()");

        }

       

      }

       

      1. Standalone.xml entry

      <jms-queue name="SendToServerQueue" entries="java:jboss/exported/jms/queue/sendToServerQueue"/>

       

      WFLY localhost :9990 Console Configuration Details

       

      Queues/Topics

      Name:         SendToServerQueue

      JNDINames:    java:jboss/exported/jms/queue/sendToServerQueue

      Durable?:     true

      Selector:     <blank>

       

      Connection Factories

           Name                       JNDI

      InVmConnectionFactory java:/ConnectionFactory

      RemoteConnectionFactory java:jboss/exported/jms/RemoteConnectionFactory

       

      Security Settings

      Pattern      Role

        #          guest

       

      Address Settings

         Pattern

           #

       

      Diverts

      Name           From           To

               No Items!

       

      WILDFLY’s CONSOLE OUTPUT

      Calling "C:\ProgramFilesGeo\Wildfly\wildfly-10.1.0.Final\bin\standalone.conf.bat"

      Setting JAVA property to "C:\Program Files\Java\jdk1.8.0_121\bin\java"

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

        JBoss Bootstrap Environment

        JBOSS_HOME: "C:\ProgramFilesGeo\Wildfly\wildfly-10.1.0.Final"

        JAVA: "C:\Program Files\Java\jdk1.8.0_121\bin\java"

       

      JAVA_OPTS: "-Dprogram.name=standalone.bat -Xms64M -Xmx512M -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman"

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

      * INFO  [org.jboss.modules]

              (main)

              JBoss Modules version 1.5.2.Final

      * INFO  [org.jboss.as.ejb3]

              (MSC service thread 1-6)

              WFLYEJB0042:

              Started message driven bean 'GoMsgBean' with 'activemq-ra.rar' resource adapter

      * INFO  [org.jboss.as.clustering.infinispan]

              (ServerService Thread Pool -- 73)

               WFLYCLINF0002:

               Started client-mappings cache from ejb container

       

      <Next three lines are written by my Application Logger from a

      Serializable Class used with JPA mapping>

       

      Member.<init>................................beg

        Member.<init>................................FIRST LOG FROM SLF4J

      Member.<init>................................end

      ...

      * INFO  [org.jboss.as.server]

      (ServerService Thread Pool -- 37)

        Deployed "GoTest.ear" (runtime-name : "GoTest.ear")

       

      * INFO  [org.apache.activemq.artemis.ra]

        (default-threads - 1)

        AMQ151000:

        awaiting topic/queue creation jms/queue/sendToServerQueue

       

      * INFO  [org.jboss.as]

              (Controller Boot Thread)

              WFLYSRV0060:

              Http management interface listening on http://127.0.0.1:9990/management

       

      * INFO  [org.jboss.as]

              (Controller Boot Thread)

              WFLYSRV0051:

              Admin console listening on http://127.0.0.1:9990

       

      * INFO  [org.jboss.as]

              (Controller Boot Thread)

              WFLYSRV0025:

              WildFly Full 10.1.0.Final

             (WildFly Core 2.2.0.Final)

              started in 4674ms - Started 697 of 937 services

             (430 services are lazy, passive or on-demand)

       

      * INFO  [org.apache.activemq.artemis.ra]

              (default-threads - 1)

              AMQ151001:

              Attempting to reconnect org.apache.activemq.artemis.ra.inflow.ActiveMQActivationSpec(ra=org.apache.activemq.artemis.ra.ActiveMQResourceAdapter@78712571

              destination=jms/queue/sendToServerQueue

              destinationType=javax.jms.Queue ack=Auto-acknowledge

              durable=false clientID=null user=null maxSession=1)


      * INFO [org.jboss.as.repository]

      ((ServerService Thread Pool) -- 75)

      WFLYDR0009: Content

      <WF Home>\standalone\data\content\

              90\e6e84c2e785b102fb79ce312c59b96a9740604

              is obsolete and will be removed

       

      * INFO [org.jboss.as.repository]

      ((ServerService Thread Pool) -- 75)

      WFLYDR0002: Content removed from location

      <WF Home>\standalone\data\content\

      90\e6e84c2e785b102fb79ce312c59b96a9740604\content

       

      * INFO [org.jboss.as.repository]

      ((ServerService Thread Pool) -- 75)

              WFLYDR0009: Content

      <WF Home>\standalone\data\content\d1\

      05e2ba9f46b7fd1048e88763e617ba800553a9

      is obsolete and will be removed

       

      * INFO [org.jboss.as.repository]

      ((ServerService Thread Pool) -- 75)

      WFLYDR0002: Content removed from location

      <WF Home>\standalone\data\content\d1\

              05e2ba9f46b7fd1048e88763e617ba800553a9\content

       

      * INFO  [org.jboss.as.repository]

              ((ServerService Thread Pool) -- 75)

      WFLYDR0009: Content

              <WF Home>\standalone\data\content\13\

      300f78ebd84153ba846cab433bc857de234ca0

      is obsolete and will be removed

       

      * INFO [org.jboss.as.repository]

      ((ServerService Thread Pool) -- 75)

      WFLYDR0002: Content removed from location

      <WF Home>\standalone\data\content\13\

      300f78ebd84153ba846cab433bc857de234ca0\content

       

      * INFO [org.jboss.as.repository]

      ((ServerService Thread Pool) -- 75)

      WFLYDR0009: Content

      <WF Home>\standalone\data\content\96\

      6331e59e424fd42a2a15591180e07bbac5b055

      is obsolete and will be removed

       

      * INFO [org.jboss.as.repository]

      ((ServerService Thread Pool) -- 75)

      WFLYDR0002: Content removed from location

      <WF Home>\standalone\data\content\96\

              6331e59e424fd42a2a15591180e07bbac5b055\content

       

      * INFO  [org.jboss.as.repository]

              ((ServerService Thread Pool) -- 75)

      WFLYDR0009: Content

      <WF Home>\standalone\data\content\9f\

      56060c14ae477d59cbf2f7fc10a182ab20382f

      is obsolete and will be removed

       

      * INFO [org.jboss.as.repository]

      ((ServerService Thread Pool) -- 75)

      WFLYDR0002: Content removed from location

      <WF Home>\standalone\data\content\9f\

      56060c14ae477d59cbf2f7fc10a182ab20382f\content