2017-09-04 88 views
0

我有一個運行WF-8 w/HornetMQ的Java EE項目: --- Sever端部署爲.ear包。 ---客戶端是通過JMS消息傳遞與服務器通信的Java GUI。MDB部署成功:然後不會寫入System.out。爲什麼?

這一切都工作時收起來。

我試圖使用WF-10 w/ArtemisMQ來複活它,它會殺死我。

清除所有處理大黃蜂例外後 - >阿蒂米斯,這裏的地方我:

--- WF控制檯確認gotest.ear沒有例外部署。 (控制檯輸出啓動粘貼在下面)

---客戶端的Eclipse控制檯輸出確認它有一個連接,併發送一個對象消息。 (我的格式化輸出粘貼在下面)

--- Standalone-full.xml顯示我的MDB偵聽的隊列已配置。 AND WF瀏覽器控制檯再次證實了這一點。 (有關WF配置的信息也粘貼在下面)

但是我的MDB根本不會寫入或登錄到WF控制檯。即甚至不從它的構造函數方法。 onMessage()對從客戶端發送的消息沒有響應。

我很無奈,因爲我沒有在任何地方得到Exceptions來暗示出了什麼問題。

任何人都可以指向正確的方向嗎? 幫助!!

MDB CODE (我已經削減到骨頭,直到我能得到它來寫或登錄到控制檯WF確認它是聽消息。)

import javax.annotation.PostConstruct; 
import javax.annotation.PreDestroy; 
import javax.annotation.Resource; 
import javax.ejb.ActivationConfigProperty; 
import javax.ejb.MessageDriven; 
import javax.ejb.MessageDrivenContext; 
import javax.enterprise.context.ApplicationScoped; 
import javax.jms.Message; 
import javax.jms.MessageListener; 
import javax.persistence.Transient; 
import org.apache.log4j.Logger; 

@MessageDriven(
    activationConfig ={ 
     @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"), 
     @ActivationConfigProperty(propertyName="destination", propertyValue="jms/queue/sendToServerQueue"), 
     @ActivationConfigProperty(propertyName="acknowledgeMode", propertyValue = "Auto-acknowledge"), 
     }) 

public class GoMsgBean implements MessageListener { 

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

    public GoMsgBean() { 
    System.out.println("System.out message FROM GoMsgBean Constructor"); 
    logger.info("Logger message FROM GoMsgBean Constructor"); 
    } 

    @PostConstruct 
    public void myInit() { 
    System.out.println("System.out message FROM GoMsgBean PostConstruct"); 
    logger.info("Logger message FROM GoMsgBean PostConstruct"); 
     } 

    public void onMessage(Message msg) { 
    System.out.println("System.out message FROM GoMsgBean onMessage()"); 
    logger.info("Logger message FROM GoMsgBean onMessage()"); 
    } 
} 

STANDALONE-FULL.XML

<subsystem xmlns="urn:jboss:domain:messaging-activemq:1.0"> 
    <server name="default"> 
    . . . 
    <jms-queue name="ExpiryQueue" entries="java:/jms/queue/ExpiryQueue"/> 
    <jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/> 
    <jms-queue name="SendToServerQueue" entries="java:jboss/exported/jms/queue/sendToServerQueue"/> 
    <jms-queue name="SendToClientQueue2" entries="java:jboss/exported/jms/queue/sendToClientQueue2"/> 
    . . . 
    <connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" connectors="http-connector"/> 
    <pooled-connection-factory name="activemq-ra" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory" connectors="in-vm" transaction="xa"/> 
    </server> 
</subsystem> 

天地飛本地主機:9990控制檯配置詳細

Queues/Topics 
Name:   SendToServerQueue 
JNDINames: java:jboss/exported/jms/queue/sendToServerQueue 
**Durable?: true** 
Selector:  <blank> 

Connection Factories 
Name   InVmConnectionFactory 
JNDI   java:/ConnectionFactory 

Name:   RemoteConnectionFactory 
JNDI   java:jboss/exported/jms/RemoteConnectionFactory 

Security Settings 
Pattern  # 
Role   guest 

Address Settings 
Pattern  # 

Diverts  No Items! 

ECLIPSE CONSOLE OUTPUT(當客戶端GUI打開時) (我已經添加了一個瘋狂的System.out.printlns數目來跟蹤逐行發生的事情。每個輸出字符串由正在寫行Class.method()開頭。)

ECLIPSE CONSOLE OUTPUT when Client is opened 

MsgCtrSnd.run()  beg 
    MsgCtrSnd.run()  Requesting InitialContext 
     CONNECTION VARIABLES 
     key: java.naming.provider.url   value: http-remoting://localhost:8080 
     key: java.naming.factory.initial  value: org.jboss.naming.remote.client.InitialContextFactory 
     key: java.naming.security.principal value: jmsUser 
     key: java.naming.security.credentials value: jmsUser123! 
    MsgCtrSnd.run()  InitialContext OK: [email protected] 
    MsgCtrSnd.run()  Look up ConnectionFactory with: "jms/RemoteConnectionFactory" 
    MsgCtrSnd.run()  ConnectionFactory: Ok: 
         org.apache.activemq.artemis.jms.client.ActiveMQJMSConnectionFactory 
    MsgCtrSnd.run()  Instantiating Connection 
    MsgCtrSnd.run()  JMS Connection OK: 
         [email protected]3d 
Instantiating Session 
    MsgCtrSnd.run()  JMS Session OK: 
         ActiveMQSession->ClientSessionImpl 
         [name=212aa734-90f5-11e7-aa7a-a3fb7876c1f2, username=appUser, closed=false, factory = org.apache.activemq.artemis.core.client.[email protected], metaData=(jms-session=,)]@368f2016 
    MsgCtrSnd.run()  Lookup Queue w/ JNDI name: ["jms/queue/sendToServerQueue"] 
    MsgCtrSnd.run()  Queue secured: 
         ActiveMQQueue[SendToServerQueue]IS NOT NULL 
    MsgCtrSnd.run()  Instantiating Message Producer 
    MsgCtrSnd.run()  Message Producer [IS NOT NULL] 
         ActiveMQMessageProducer->[email protected]59474f18 
    MsgCtrSnd.run()  Starting jmsConnection 
    MsgCtrSnd.run()  JMS Send Connection : Ok. 
MsgCtrSnd.run()  end 

ECLIPSE CONOSOLE OUTPUT (when client GUI is used to send message to log in) 

Cntrl.executeMenuAction() beg 
    Cntrl.executeMenuAction() Switching to: Log In 
    Cntrl.loginSend()   beg 
    Cntrl.loginSend()   calling DataDialog.collectData() 
    Cntrl.loginSend()   EntityFieldsCollector ok 
    Cntrl.loginSend()   returned from DataDialog.collectData() 
    Cntrl.loginSend()   EntityFieldsCollector contains 2 entries. 
    Cntrl.loginSend()   key: Member ID:   308486 value:   ID 
    Cntrl.loginSend()   key: Member PW   308487 value:   PW 
    Cntrl.loginSend()   message center connection ok 
    MsgCtrSnd.sendMsg()   beg 
     MsgCtrSnd.sendMsg()   Action: Log In 
     MsgCtrSnd.sendMsg()   clientHash: aaaaaa 
     MsgCtrSnd.sendMsg()   memberId : ID 
     MsgCtrSnd.sendMsg()   memberPw : PW 
     MsgCtrSnd.sendMsg()   clientUserId : null 
     MsgCtrSnd.sendMsg()   clientUserPw : null 
     MsgCtrSnd.sendMsg()   calling createObjectMessage() 
     MsgCtrSnd.sendMsg()   ObjectMessage instantiated. 
     MsgCtrSnd.sendMsg()   Object Message object: java.util.ArrayList 
     MsgCtrSnd.sendMsg()  message sent. 
    MsgCtrSnd.sendMsg()  end 
    Cntrl.loginSend()   end 
Cntrl.executeMenuAction() end 

WILDFLY控制檯輸出WHEN GOTEST.EAR在啓動時部署階段

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.msc] (main) JBoss MSC version 1.2.6.Final 
INFO [org.jboss.as] (MSC service thread 1-7) WFLYSRV0049: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) starting 
INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0039: Creating http management service using socket-binding (management-http) 
INFO [org.xnio] (MSC service thread 1-3) XNIO version 3.4.0.Final 
INFO [org.xnio.nio] (MSC service thread 1-3) XNIO NIO Implementation Version 3.4.0.Final 
INFO [org.wildfly.iiop.openjdk] (ServerService Thread Pool -- 42) WFLYIIOP0001: Activating IIOP Subsystem 
INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 41) WFLYCLINF0001: Activating Infinispan subsystem. 
INFO [org.jboss.as.jsf] (ServerService Thread Pool -- 48) WFLYJSF0007: Activated the following JSF Implementations: [main] 
INFO [org.jboss.as.connector] (MSC service thread 1-4) WFLYJCA0009: Starting JCA Subsystem (WildFly/IronJacamar 1.3.4.Final) 
INFO [org.jboss.as.naming] (ServerService Thread Pool -- 52) WFLYNAM0001: Activating Naming Subsystem 
INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 62) WFLYWS0002: Activating WebServices Extension 
INFO [org.jboss.as.security] (ServerService Thread Pool -- 59) WFLYSEC0002: Activating Security Subsystem 
INFO [org.wildfly.extension.io] (ServerService Thread Pool -- 40) WFLYIO001: Worker 'default' has auto-configured to 16 core threads with 128 task threads based on your 8 available processors 
INFO [org.jboss.as.security] (MSC service thread 1-7) WFLYSEC0001: Current PicketBox version=4.9.6.Final 
INFO [org.wildfly.extension.undertow] (MSC service thread 1-3) WFLYUT0003: Undertow 1.4.0.Final starting 
INFO [org.jboss.remoting] (MSC service thread 1-5) JBoss Remoting version 4.0.21.Final 
INFO [org.jboss.as.naming] (MSC service thread 1-8) WFLYNAM0003: Starting Naming Service 
INFO [org.jboss.as.mail.extension] (MSC service thread 1-8) WFLYMAIL0001: Bound mail session [java:jboss/mail/Default] 
INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 36) WFLYJCA0004: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3) 
INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-7) WFLYJCA0018: Started Driver service with driver-name = h2 
INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 36) WFLYJCA0005: Deploying non-JDBC-compliant driver class org.mariadb.jdbc.Driver (version 1.5) 
INFO [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-2) WFLYJCA0018: Started Driver service with driver-name = mysql 
INFO [org.jboss.as.ejb3] (MSC service thread 1-8) 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. 
INFO [org.jboss.as.ejb3] (MSC service thread 1-5) 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. 
INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 61) WFLYUT0014: Creating file handler for path 'C:\ProgramFilesGeo\Wildfly\wildfly-10.1.0.Final/welcome-content' with options [directory-listing: 'false', follow-symlink: 'false', case-sensitive: 'true', safe-symlink-paths: '[]'] 
INFO [org.wildfly.extension.undertow] (MSC service thread 1-1) WFLYUT0012: Started server default-server. 
INFO [org.wildfly.extension.undertow] (MSC service thread 1-5) WFLYUT0018: Host default-host starting 
INFO [org.wildfly.extension.undertow] (MSC service thread 1-8) WFLYUT0006: Undertow HTTP listener default listening on 127.0.0.1:8080 
INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-8) WFLYJCA0001: Bound data source [java:jboss/datasources/ExampleDS] 
INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) WFLYJCA0001: Bound data source [java:jboss/jdbc/gotestdb] 
INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-5) WFLYJCA0001: Bound data source [java:jboss/jdbc/tappdb] 
INFO [org.wildfly.extension.messaging-activemq] (MSC service thread 1-4) WFLYMSGAMQ0001: AIO wasn't located on this platform, it will fall back to using pure Java NIO. 
WARN [org.jboss.as.domain.management.security] (MSC service thread 1-2) WFLYDM0111: Keystore C:\ProgramFilesGeo\Wildfly\wildfly-10.1.0.Final\standalone\configuration\application.keystore not found, it will be auto generated on first use with a self signed certificate for host localhost 
INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) WFLYSRV0027: Starting deployment of "GoTest.ear" (runtime-name: "GoTest.ear") 
INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-1) WFLYDS0013: Started FileSystemDeploymentService for directory C:\ProgramFilesGeo\Wildfly\wildfly-10.1.0.Final\standalone\deployments 
INFO [org.wildfly.iiop.openjdk] (MSC service thread 1-3) WFLYIIOP0009: CORBA ORB Service started 
INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 64) AMQ221000: live Message Broker is starting with configuration Broker Configuration (clustered=false,journalDirectory=C:\ProgramFilesGeo\Wildfly\wildfly-10.1.0.Final\standalone\data\activemq\journal,bindingsDirectory=C:\ProgramFilesGeo\Wildfly\wildfly-10.1.0.Final\standalone\data\activemq\bindings,largeMessagesDirectory=C:\ProgramFilesGeo\Wildfly\wildfly-10.1.0.Final\standalone\data\activemq\largemessages,pagingDirectory=C:\ProgramFilesGeo\Wildfly\wildfly-10.1.0.Final\standalone\data\activemq\paging) 
INFO [org.infinispan.factories.GlobalComponentRegistry] (MSC service thread 1-6) ISPN000128: Infinispan version: Infinispan 'Chakra' 8.2.4.Final 
INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 64) AMQ221013: Using NIO Journal 
INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 66) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated. 
INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 72) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated. 
INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 66) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated. 
INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 71) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated. 
INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 72) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated. 
INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 71) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated. 
INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) WFLYSRV0207: Starting subdeployment (runtime-name: "GoTest.jar") 
INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 64) AMQ221043: Protocol module found: [artemis-server]. Adding protocol support for: CORE 
INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 64) AMQ221043: Protocol module found: [artemis-amqp-protocol]. Adding protocol support for: AMQP 
INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 64) AMQ221043: Protocol module found: [artemis-hornetq-protocol]. Adding protocol support for: HORNETQ 
INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 64) AMQ221043: Protocol module found: [artemis-stomp-protocol]. Adding protocol support for: STOMP 
INFO [org.wildfly.extension.undertow] (MSC service thread 1-6) WFLYUT0006: Undertow HTTPS listener https listening on 127.0.0.1:8443 
INFO [org.jboss.ws.common.management] (MSC service thread 1-3) JBWS022052: Starting JBossWS 5.1.5.Final (Apache CXF 3.1.6) 
INFO [org.jboss.as.jpa] (MSC service thread 1-8) WFLYJPA0002: Read persistence.xml for GoTestDataBase 
INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 71) WFLYJPA0010: Starting Persistence Unit (phase 1 of 2) Service 'GoTest.ear/GoTest.jar#GoTestDataBase' 
INFO [org.jboss.weld.deployer] (MSC service thread 1-8) WFLYWELD0003: Processing weld deployment GoTest.ear 
INFO [org.hibernate.jpa.internal.util.LogHelper] (ServerService Thread Pool -- 71) HHH000204: Processing PersistenceUnitInfo [ 
     name: GoTestDataBase 
     ...] 
INFO [org.wildfly.extension.messaging-activemq] (MSC service thread 1-5) WFLYMSGAMQ0016: Registered HTTP upgrade for activemq-remoting protocol handled by http-acceptor acceptor 
INFO [org.wildfly.extension.messaging-activemq] (MSC service thread 1-1) WFLYMSGAMQ0016: Registered HTTP upgrade for activemq-remoting protocol handled by http-acceptor acceptor 
INFO [org.wildfly.extension.messaging-activemq] (MSC service thread 1-7) WFLYMSGAMQ0016: Registered HTTP upgrade for activemq-remoting protocol handled by http-acceptor-throughput acceptor 
INFO [org.wildfly.extension.messaging-activemq] (MSC service thread 1-2) WFLYMSGAMQ0016: Registered HTTP upgrade for activemq-remoting protocol handled by http-acceptor-throughput acceptor 
INFO [org.hibernate.validator.internal.util.Version] (MSC service thread 1-8) HV000001: Hibernate Validator 5.2.4.Final 
INFO [org.hibernate.Version] (ServerService Thread Pool -- 71) HHH000412: Hibernate Core {5.0.10.Final} 
INFO [org.hibernate.cfg.Environment] (ServerService Thread Pool -- 71) HHH000206: hibernate.properties not found 
INFO [org.hibernate.cfg.Environment] (ServerService Thread Pool -- 71) HHH000021: Bytecode provider name : javassist 
INFO [org.hibernate.annotations.common.Version] (ServerService Thread Pool -- 71) HCANN000001: Hibernate Commons Annotations {5.0.1.Final} 
INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 64) AMQ221007: Server is now live 
INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 64) AMQ221001: Apache ActiveMQ Artemis Message Broker version 1.1.0.wildfly-017 [nodeID=e2b89808-fdf2-11e6-9f54-3956fe24eb2d] 
INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 64) AMQ221003: trying to deploy queue jms.queue.SendToServerQueue 
INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 67) AMQ221003: trying to deploy queue jms.queue.DLQ 
INFO [org.wildfly.extension.messaging-activemq] (ServerService Thread Pool -- 72) WFLYMSGAMQ0002: Bound messaging object to jndi name java:jboss/exported/jms/RemoteConnectionFactory 
INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 70) AMQ221003: trying to deploy queue jms.queue.SendToClientQueue2 
INFO [org.wildfly.extension.messaging-activemq] (ServerService Thread Pool -- 65) WFLYMSGAMQ0002: Bound messaging object to jndi name java:/ConnectionFactory 
INFO [org.apache.activemq.artemis.core.server] (ServerService Thread Pool -- 66) AMQ221003: trying to deploy queue jms.queue.ExpiryQueue 
INFO [org.jboss.weld.deployer] (MSC service thread 1-8) WFLYWELD0003: Processing weld deployment GoTest.jar 
INFO [org.jboss.as.ejb3.deployment] (MSC service thread 1-8) WFLYEJB0473: JNDI bindings for session bean named 'EnrollerBean' in deployment unit 'subdeployment "GoTest.jar" of deployment "GoTest.ear"' are as follows: 

     java:global/GoTest/GoTest/EnrollerBean!org.america3.gotest.server.sessionbeans.EnrollerBean 
     java:app/GoTest/EnrollerBean!org.america3.gotest.server.sessionbeans.EnrollerBean 
     java:module/EnrollerBean!org.america3.gotest.server.sessionbeans.EnrollerBean 
     java:global/GoTest/GoTest/EnrollerBean 
     java:app/GoTest/EnrollerBean 
     java:module/EnrollerBean 

INFO [org.jboss.as.ejb3.deployment] (MSC service thread 1-8) WFLYEJB0473: JNDI bindings for session bean named 'ExiterBean' in deployment unit 'subdeployment "GoTest.jar" of deployment "GoTest.ear"' are as follows: 

     java:global/GoTest/GoTest/ExiterBean!org.america3.gotest.server.sessionbeans.ExiterBean 
     java:app/GoTest/ExiterBean!org.america3.gotest.server.sessionbeans.ExiterBean 
     java:module/ExiterBean!org.america3.gotest.server.sessionbeans.ExiterBean 
     java:global/GoTest/GoTest/ExiterBean 
     java:app/GoTest/ExiterBean 
     java:module/ExiterBean 

INFO [org.jboss.as.ejb3.deployment] (MSC service thread 1-8) WFLYEJB0473: JNDI bindings for session bean named 'LoginerBean' in deployment unit 'subdeployment "GoTest.jar" of deployment "GoTest.ear"' are as follows: 

     java:global/GoTest/GoTest/LoginerBean!org.america3.gotest.server.sessionbeans.LoginerBean 
     java:app/GoTest/LoginerBean!org.america3.gotest.server.sessionbeans.LoginerBean 
     java:module/LoginerBean!org.america3.gotest.server.sessionbeans.LoginerBean 
     java:global/GoTest/GoTest/LoginerBean 
     java:app/GoTest/LoginerBean 
     java:module/LoginerBean 

INFO [org.jboss.as.ejb3.deployment] (MSC service thread 1-8) WFLYEJB0473: JNDI bindings for session bean named 'LogouterBean' in deployment unit 'subdeployment "GoTest.jar" of deployment "GoTest.ear"' are as follows: 

     java:global/GoTest/GoTest/LogouterBean!org.america3.gotest.server.sessionbeans.LogouterBean 
     java:app/GoTest/LogouterBean!org.america3.gotest.server.sessionbeans.LogouterBean 
     java:module/LogouterBean!org.america3.gotest.server.sessionbeans.LogouterBean 
     java:global/GoTest/GoTest/LogouterBean 
     java:app/GoTest/LogouterBean 
     java:module/LogouterBean 

INFO [org.jboss.as.ejb3.deployment] (MSC service thread 1-8) WFLYEJB0473: JNDI bindings for session bean named 'ReplierBean' in deployment unit 'subdeployment "GoTest.jar" of deployment "GoTest.ear"' are as follows: 

     java:global/GoTest/GoTest/ReplierBean!org.america3.gotest.server.sessionbeans.ReplierBean 
     java:app/GoTest/ReplierBean!org.america3.gotest.server.sessionbeans.ReplierBean 
     java:module/ReplierBean!org.america3.gotest.server.sessionbeans.ReplierBean 
     java:global/GoTest/GoTest/ReplierBean 
     java:app/GoTest/ReplierBean 
     java:module/ReplierBean 

INFO [org.jboss.as.connector.deployment] (MSC service thread 1-5) WFLYJCA0007: Registered connection factory java:/JmsXA 
INFO [org.apache.activemq.artemis.ra] (MSC service thread 1-5) Resource adaptor started 
INFO [org.jboss.as.connector.services.resourceadapters.ResourceAdapterActivatorService$ResourceAdapterActivator] (MSC service thread 1-5) IJ020002: Deployed: file://RaActivatoractivemq-ra 
INFO [org.jboss.as.connector.deployment] (MSC service thread 1-4) WFLYJCA0002: Bound JCA ConnectionFactory [java:/JmsXA] 
INFO [org.wildfly.extension.messaging-activemq] (MSC service thread 1-2) WFLYMSGAMQ0002: Bound messaging object to jndi name java:jboss/DefaultJMSConnectionFactory 
INFO [org.jboss.weld.Version] (MSC service thread 1-8) WELD-000900: 2.3.5 (Final) 
INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 71) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated. 
INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 71) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated. 
INFO [org.jboss.as.jpa] (ServerService Thread Pool -- 66) WFLYJPA0010: Starting Persistence Unit (phase 2 of 2) Service 'GoTest.ear/GoTest.jar#GoTestDataBase' 
INFO [org.jboss.as.ejb3] (MSC service thread 1-8) WFLYEJB0042: Started message driven bean 'GoMsgBean' with 'activemq-ra.rar' resource adapter 
INFO [org.hibernate.dialect.Dialect] (ServerService Thread Pool -- 66) HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect 
INFO [org.hibernate.envers.boot.internal.EnversServiceImpl] (ServerService Thread Pool -- 66) Envers integration enabled? : true 
INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 71) WFLYCLINF0002: Started client-mappings cache from ejb container 

Member.<init>................................beg 
    Member.<init>................................Hello World. See! I can Log messages again. 
Member.<init>................................end 

INFO [org.hibernate.hql.internal.QueryTranslatorFactoryInitiator] (ServerService Thread Pool -- 66) HHH000397: Using ASTQueryTranslatorFactory 
INFO [org.jboss.as.server] (ServerService Thread Pool -- 37) WFLYSRV0010: 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 5392ms - Started 691 of 931 services (430 services are lazy, passive or on-demand) 

WILDFLY控制檯輸出DEPLOYEMENT之後似乎成爲問題。 注:下一信息行表示,JMS /隊列/ sendToServerQueue不耐用,而WF控制檯說,它的配置是持久的)

INFO [org.apache.activemq.artemis.ra] (default-threads - 1) AMQ151001: Attempting to reconnect org.apache.activemq.artemis.ra.inflow.ActiveMQActivationSpec([email protected]71 destination=jms/queue/sendToServerQueue destinationType=javax.jms.Queue ack=Auto-acknowledge durable=false clientID=null user=null maxSession=15) 

This is in reference to J. R. Perkins below concerning whether there was a log4j.xml in the deployment. This is another excerpt from WF’s standalone-full.xml I use for logging if I can ever get my MDB to even write to System.out: 

<profile> 
    <subsystem xmlns="urn:jboss:domain:logging:3.0"> 
    <console-handler name="CONSOLE"> 
     <level name="INFO"/> 
     <formatter><named-formatter name="COLOR-PATTERN"/></formatter> 
    </console-handler> 
    <console-handler name="MY-CONSOLE" autoflush="true"> 
     <formatter><named-formatter name="MY-PATTERN"/></formatter> 
     <target name="System.out"/> 
    </console-handler> 
    <console-handler name="GOTEST-HANDLER"> 
     <level name="INFO"/> 
     <formatter><named-formatter name="GOTEST-PATTERN"/></formatter> 
    </console-handler> 
    . . . 
    <logger category="org.america3.gotest" use-parent-handlers="false"> 
     <level name="ALL"/> 
     <handlers><handler name="GOTEST-HANDLER"/></handlers> 
    </logger> 
    <logger category="com.arjuna"> 
     <level name="WARN"/> 
    </logger> 
    <logger category="org.jboss.as.config"> 
     <level name="DEBUG"/> 
    </logger> 
    <logger category="sun.rmi"> 
     <level name="WARN"/> 
    </logger> 
    <root-logger> 
     <level name="INFO"/> 
     <handlers><handler name="CONSOLE"/><handler name="FILE"/></handlers> 
    </root-logger> 
    <formatter name="PATTERN"> 
     <pattern-formatter pattern="%d{yyyy-MM-dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/> 
    </formatter> 
    <formatter name="COLOR-PATTERN"> 
     <pattern-formatter pattern="%K{level}%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%e%n"/> 
    </formatter> 
    <formatter name="MY-PATTERN"> 
     <pattern-formatter pattern="MeMeMe%s%n"/> 
    </formatter> 
    <formatter name="GOTEST-PATTERN"> 
     <pattern-formatter pattern="%s%n"/> 
    </formatter> 
    </subsystem> 
    . . . 
</profile> 
+0

您的部署中是否有log4j配置文件? –

+0

嗨,詹姆斯。不,我再保存一天。現在我配置了我的服務器端日誌記錄在standalone-full.xml中。它的工作。 (請參閱上面WF控制檯輸出的底部,以Member。開頭的行將記錄來自另一個類 - 成員的輸出,因此我現在仍在試圖找出爲什麼我的MDB甚至不會寫入System.out。我敢打賭,一旦我得到我的MDB寫入System.out就會像成員已經做的那樣記錄。所以現在問題依然存在。我的MDB部署了,然後似乎死了。我甚至沒有提示異常提示 – George

+0

這些'成員'消息是什麼使它看起來像可能有一個log4j配置文件。寫入標準輸出應該看起來像'INFO [stdout] MMember。 ...'。真的日誌輸出doesn –

回答

0

我相信問題是記錄在這裏:

INFO [org.apache.activemq.artemis.ra] (default-threads - 1) AMQ151000: awaiting topic/queue creation jms/queue/sendToServerQueue 

換句話說,MDB未完全激活,因爲它無法找到目標「jms/queue/sendToServerQueue」。我相信這是因爲你沒有正確定義JNDI綁定(因爲你只定義了一個「導出」條目)。嘗試使用這樣的:

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

事情要做,診斷這樣的問題:

  1. 仔細閱讀日誌有用的信息。
  2. 檢查MDB應該從中接收消息的隊列的consumerCount。如果它是0,那麼這意味着MDB存在問題。
+0

我試過了,沒有運氣。 ERROR [org.jboss.as.controller.management-operation](ServerService線程池 - 9個字符)在配置中的任何模式都不匹配,除非您爲了簡潔起見而取消了日期。 )W FLYCTL0013:操作(「add」)失敗 - 地址:(「subsystem」=>「messaging-activemq」), (「server」=>「default」), (「jms-queue」=> SendToServerQueue 「) ]) - 失敗的描述: 」WFLYCTL0212:重複的資源[ (\「 子系統\」=> \ 「消息傳遞的ActiveMQ \」), (\ 「服務器\」=> \ 「默認\」), (\「jms-queue \」=> \「SendToServerQueue \」) ]「 我試着找一個相同隊列的導出/本地jndi的例子。悲慘失敗。 – George

+0

是的。我在兩個jndi名字之間嘗試了不同的分隔符 - 「;」和「,」現在要學習:1)「consumerCount」所在的位置,以及2)如何將代碼添加到上面的註釋中。 [還好提到WF文檔只能被不再需要它的人閱讀?咧嘴笑......就像人們寫的那樣,他們深深地沉浸在從JBoss的演變中,他們再也不能將這種事物想象成「初學者」。但是這只是我w ​​/「酸葡萄」。否則,它如此接近,我希望你仍然願意提供幫助。請注意:「嘗試」日誌行說它不耐用。 WF GUI管理控制檯說這是。 – George

+0

最後一件事。我本身嘗試了本地JNDI。有效!有點。在部署時,MDB構造函數轉儲了GUI客戶端留在隊列中的數十條消息。 1)在其構造函數中的System.out語句,以及2)在其構造函數中的記錄器語句。但我仍然需要弄清楚如何使遠程GUI(導出)和MDB(本地)可以訪問隊列。因此,所有需要回答的問題是如何將2個jndi名稱分配給一個隊列。也許CLI命令? – George

相關問題