2016-11-17 14 views
3

ステートレスEJBにJMSキューを挿入しようとしています。私のコードは、それはこのように見ている:私は、私が変更した場合、それが動作しているアプリケーションサーバー(Wildfly 9.0.2)ステートレスEJBにJMSキューを挿入できません

09:05:11,409 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "JMSProject.war")]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.JMSProject.JMSProject.env.\"abc.jms.JmsSender\".queue is missing [jboss.naming.context.java.module.JMSProject.JMSProject.env.queue.TestQueue]"]} 
09:05:11,455 INFO [org.jboss.as.server] (ServerService Thread Pool -- 37) WFLYSRV0010: Deployed "JMSProject.war" (runtime-name : "JMSProject.war") 
09:05:11,456 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report 
WFLYCTL0184: New missing/unsatisfied dependencies: 
     service jboss.naming.context.java.module.JMSProject.JMSProject.env.queue.TestQueue (missing) dependents: [service jboss.naming.context.java.module.JMSProject.JMSProject.env."abc.jms.JmsSender".queue] 

09:05:11,582 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management 
09:05:11,583 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990 
09:05:11,583 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 9.0.2.Final (WildFly Core 1.0.2.Final) started (with errors) in 4043ms - Started 360 of 557 services (26 services failed or missing dependencies, 242 services are lazy, passive or on-demand) 
09:05:11,616 INFO [org.jboss.weld.deployer] (MSC service thread 1-7) WFLYWELD0010: Stopping weld service for deployment JMSProject.war 
09:05:11,656 INFO [org.jboss.as.server.deployment] (MSC service thread 1-7) WFLYSRV0028: Stopped deployment JMSProject.war (runtime-name: JMSProject.war) in 46ms 
09:05:11,700 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) WFLYSRV0009: Undeployed "JMSProject.war" (runtime-name: "JMSProject.war") 
09:05:11,705 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) WFLYCTL0183: Service status report 
WFLYCTL0184: New missing/unsatisfied dependencies: 
     service jboss.deployment.unit."JMSProject.war".WeldBootstrapService (missing) dependents: [service jboss.deployment.unit."JMSProject.war".component."org.jboss.weld.servlet.WeldTerminalListener".WeldInstantiator, service jboss.deployment.unit."JMSProject.war".component.JmsSender.WeldInstantiator, service jboss.deployment.unit."JMSProject.war".component.JmsSender.WeldInterceptorBindingsService, service jboss.deployment.unit."JMSProject.war".WeldStartService, WFLYCTL0208: ... and 7 more ] 
     service jboss.deployment.unit."JMSProject.war".WeldStartService (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./JMSProject, service jboss.deployment.unit."JMSProject.war".component."org.jboss.weld.servlet.WeldTerminalListener".WeldInstantiator, service jboss.deployment.unit."JMSProject.war".component.JmsSender.WeldInstantiator, service jboss.deployment.unit."JMSProject.war".component."com.sun.faces.config.ConfigureListener".WeldInstantiator, WFLYCTL0208: ... and 9 more ] 
     service jboss.deployment.unit."JMSProject.war".component.JmsReceiver.CREATE (missing) dependents: [service jboss.deployment.unit."JMSProject.war".component.JmsReceiver.START] 
     service jboss.deployment.unit."JMSProject.war".component.JmsReceiver.JndiBindingsService (missing) dependents: [service jboss.deployment.unit."JMSProject.war".jndiDependencyService] 
     service jboss.deployment.unit."JMSProject.war".component.JmsReceiver.START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./JMSProject, service jboss.deployment.unit."JMSProject.war".deploymentCompleteService, service jboss.deployment.unit."JMSProject.war".moduleDeploymentRuntimeInformationStart] 
     service jboss.deployment.unit."JMSProject.war".component.JmsReceiver.VIEW."abc.jms.JmsReceiver".MESSAGE_ENDPOINT (missing) dependents: [service jboss.deployment.unit."JMSProject.war".component.JmsReceiver.START] 
     service jboss.deployment.unit."JMSProject.war".component.JmsReceiver.WeldInstantiator (missing) dependents: [service jboss.deployment.unit."JMSProject.war".component.JmsReceiver.START] 
     service jboss.deployment.unit."JMSProject.war".component.JmsReceiver.WeldInterceptorBindingsService (missing) dependents: [service jboss.deployment.unit."JMSProject.war".component.JmsReceiver.WeldInstantiator] 
     service jboss.deployment.unit."JMSProject.war".component.JmsReceiver.ejb.non-functional-timerservice (missing) dependents: [service jboss.deployment.unit."JMSProject.war".component.JmsReceiver.START] 
     service jboss.deployment.unit."JMSProject.war".component.JmsSender.CREATE (missing) dependents: [service jboss.deployment.unit."JMSProject.war".component.JmsSender.START] 
     service jboss.deployment.unit."JMSProject.war".component.JmsSender.JndiBindingsService (missing) dependents: [service jboss.deployment.unit."JMSProject.war".jndiDependencyService] 
     service jboss.deployment.unit."JMSProject.war".component.JmsSender.START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./JMSProject, service jboss.deployment.unit."JMSProject.war".deploymentCompleteService] 
     service jboss.deployment.unit."JMSProject.war".component.JmsSender.VIEW."abc.jms.JmsSender".LOCAL (missing) dependents: [service jboss.deployment.unit."JMSProject.war".component.JmsSender.START] 
     service jboss.deployment.unit."JMSProject.war".component.JmsSender.WeldInstantiator (missing) dependents: [service jboss.deployment.unit."JMSProject.war".component.JmsSender.START] 
     service jboss.deployment.unit."JMSProject.war".component.JmsSender.WeldInterceptorBindingsService (missing) dependents: [service jboss.deployment.unit."JMSProject.war".component.JmsSender.WeldInstantiator] 
     service jboss.deployment.unit."JMSProject.war".component.JmsSender.ejb.non-functional-timerservice (missing) dependents: [service jboss.deployment.unit."JMSProject.war".component.JmsSender.START] 
     service jboss.deployment.unit."JMSProject.war".component."com.sun.faces.config.ConfigureListener".CREATE (missing) dependents: [service jboss.deployment.unit."JMSProject.war".component."com.sun.faces.config.ConfigureListener".START] 
     service jboss.deployment.unit."JMSProject.war".component."com.sun.faces.config.ConfigureListener".JndiBindingsService (missing) dependents: [service jboss.deployment.unit."JMSProject.war".jndiDependencyService] 
     service jboss.deployment.unit."JMSProject.war".component."com.sun.faces.config.ConfigureListener".START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./JMSProject, service jboss.undertow.deployment.default-server.default-host./JMSProject.UndertowDeploymentInfoService, service jboss.deployment.unit."JMSProject.war".deploymentCompleteService] 
     service jboss.deployment.unit."JMSProject.war".component."javax.faces.webapp.FacetTag".CREATE (missing) dependents: [service jboss.deployment.unit."JMSProject.war".component."javax.faces.webapp.FacetTag".START] 
     service jboss.deployment.unit."JMSProject.war".component."javax.faces.webapp.FacetTag".JndiBindingsService (missing) dependents: [service jboss.deployment.unit."JMSProject.war".jndiDependencyService] 
     service jboss.deployment.unit."JMSProject.war".component."javax.faces.webapp.FacetTag".START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./JMSProject, service jboss.deployment.unit."JMSProject.war".deploymentCompleteService] 
     service jboss.deployment.unit."JMSProject.war".component."javax.faces.webapp.FacetTag".WeldInstantiator (missing) dependents: [service jboss.deployment.unit."JMSProject.war".component."javax.faces.webapp.FacetTag".START] 
     service jboss.deployment.unit."JMSProject.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".JndiBindingsService (missing) dependents: [service jboss.deployment.unit."JMSProject.war".jndiDependencyService] 
     service jboss.deployment.unit."JMSProject.war".component."javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV".START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./JMSProject, service jboss.undertow.deployment.default-server.default-host./JMSProject.UndertowDeploymentInfoService, service jboss.deployment.unit."JMSProject.war".deploymentCompleteService] 
     service jboss.deployment.unit."JMSProject.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".JndiBindingsService (missing) dependents: [service jboss.deployment.unit."JMSProject.war".jndiDependencyService] 
     service jboss.deployment.unit."JMSProject.war".component."javax.servlet.jsp.jstl.tlv.ScriptFreeTLV".START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./JMSProject, service jboss.undertow.deployment.default-server.default-host./JMSProject.UndertowDeploymentInfoService, service jboss.deployment.unit."JMSProject.war".deploymentCompleteService] 
     service jboss.deployment.unit."JMSProject.war".component."org.jboss.weld.servlet.WeldInitialListener".CREATE (missing) dependents: [service jboss.deployment.unit."JMSProject.war".component."org.jboss.weld.servlet.WeldInitialListener".START] 
     service jboss.deployment.unit."JMSProject.war".component."org.jboss.weld.servlet.WeldInitialListener".JndiBindingsService (missing) dependents: [service jboss.deployment.unit."JMSProject.war".jndiDependencyService] 
     service jboss.deployment.unit."JMSProject.war".component."org.jboss.weld.servlet.WeldInitialListener".START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./JMSProject, service jboss.undertow.deployment.default-server.default-host./JMSProject.UndertowDeploymentInfoService, service jboss.deployment.unit."JMSProject.war".deploymentCompleteService] 
     service jboss.deployment.unit."JMSProject.war".component."org.jboss.weld.servlet.WeldInitialListener".WeldInstantiator (missing) dependents: [service jboss.deployment.unit."JMSProject.war".component."org.jboss.weld.servlet.WeldInitialListener".START] 
     service jboss.deployment.unit."JMSProject.war".component."org.jboss.weld.servlet.WeldTerminalListener".CREATE (missing) dependents: [service jboss.deployment.unit."JMSProject.war".component."org.jboss.weld.servlet.WeldTerminalListener".START] 
     service jboss.deployment.unit."JMSProject.war".component."org.jboss.weld.servlet.WeldTerminalListener".JndiBindingsService (missing) dependents: [service jboss.deployment.unit."JMSProject.war".jndiDependencyService] 
     service jboss.deployment.unit."JMSProject.war".component."org.jboss.weld.servlet.WeldTerminalListener".START (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./JMSProject, service jboss.deployment.unit."JMSProject.war".deploymentCompleteService] 
     service jboss.deployment.unit."JMSProject.war".component."org.jboss.weld.servlet.WeldTerminalListener".WeldInstantiator (missing) dependents: [service jboss.deployment.unit."JMSProject.war".component."org.jboss.weld.servlet.WeldTerminalListener".START] 
     service jboss.deployment.unit."JMSProject.war".jndiDependencyService (missing) dependents: [service jboss.deployment.unit."JMSProject.war".component."org.jboss.weld.servlet.WeldTerminalListener".START, service jboss.deployment.unit."JMSProject.war".component."org.jboss.weld.servlet.WeldInitialListener".START, service jboss.deployment.unit."JMSProject.war".WeldStartService, service jboss.deployment.unit."JMSProject.war".component.JmsReceiver.START, WFLYCTL0208: ... and 3 more ] 
     service jboss.deployment.unit."JMSProject.war".moduleDeploymentRuntimeInformation (missing) dependents: [service jboss.deployment.unit."JMSProject.war".moduleDeploymentRuntimeInformationStart, service jboss.deployment.unit."JMSProject.war".component.JmsReceiver.START, service jboss.deployment.unit."JMSProject.war".component.JmsSender.START] 
     service jboss.naming.context.java.app.JMSProject.env (missing) dependents: [service jboss.deployment.unit."JMSProject.war".jndiDependencyService] 
     service jboss.naming.context.java.module.JMSProject.JMSProject.BeanManager (missing) dependents: [service jboss.deployment.unit."JMSProject.war".jndiDependencyService] 
     service jboss.naming.context.java.module.JMSProject.JMSProject.DefaultContextService (missing) dependents: [service jboss.deployment.unit."JMSProject.war".jndiDependencyService] 
     service jboss.naming.context.java.module.JMSProject.JMSProject.DefaultDataSource (missing) dependents: [service jboss.deployment.unit."JMSProject.war".jndiDependencyService] 
     service jboss.naming.context.java.module.JMSProject.JMSProject.DefaultJMSConnectionFactory (missing) dependents: [service jboss.deployment.unit."JMSProject.war".jndiDependencyService] 
     service jboss.naming.context.java.module.JMSProject.JMSProject.DefaultManagedExecutorService (missing) dependents: [service jboss.deployment.unit."JMSProject.war".jndiDependencyService] 
     service jboss.naming.context.java.module.JMSProject.JMSProject.DefaultManagedScheduledExecutorService (missing) dependents: [service jboss.deployment.unit."JMSProject.war".jndiDependencyService] 
     service jboss.naming.context.java.module.JMSProject.JMSProject.DefaultManagedThreadFactory (missing) dependents: [service jboss.deployment.unit."JMSProject.war".jndiDependencyService] 
     service jboss.naming.context.java.module.JMSProject.JMSProject.EJBContext (missing) dependents: [service jboss.deployment.unit."JMSProject.war".jndiDependencyService] 
     service jboss.naming.context.java.module.JMSProject.JMSProject.TimerService (missing) dependents: [service jboss.deployment.unit."JMSProject.war".jndiDependencyService] 
     service jboss.naming.context.java.module.JMSProject.JMSProject.TransactionSynchronizationRegistry (missing) dependents: [service jboss.deployment.unit."JMSProject.war".jndiDependencyService] 
     service jboss.naming.context.java.module.JMSProject.JMSProject.UserTransaction (missing) dependents: [service jboss.deployment.unit."JMSProject.war".jndiDependencyService] 
     service jboss.naming.context.java.module.JMSProject.JMSProject.env (missing) dependents: [service jboss.deployment.unit."JMSProject.war".jndiDependencyService] 
     service jboss.naming.context.java.module.JMSProject.JMSProject.env."abc.jms.JmsSender".connectionFactory (missing) dependents: [service jboss.deployment.unit."JMSProject.war".jndiDependencyService, service jboss.deployment.unit."JMSProject.war".component.JmsSender.START] 
     service jboss.naming.context.java.module.JMSProject.JMSProject.env."abc.jms.JmsSender".queue (missing) dependents: [service jboss.deployment.unit."JMSProject.war".jndiDependencyService, service jboss.deployment.unit."JMSProject.war".component.JmsSender.START] 
     service jboss.server.global-request-controller.control-point."JMSProject.war".undertow (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./JMSProject.UndertowDeploymentInfoService] 
     service jboss.undertow.deployment.default-server.default-host./JMSProject (missing) dependents: [service jboss.deployment.unit."JMSProject.war".deploymentCompleteService] 
     service jboss.undertow.deployment.default-server.default-host./JMSProject.UndertowDeploymentInfoService (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./JMSProject] 
     service jboss.undertow.deployment.default-server.default-host./JMSProject.codec (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./JMSProject.UndertowDeploymentInfoService] 
     service jboss.undertow.deployment.default-server.default-host./JMSProject.session (missing) dependents: [service jboss.undertow.deployment.default-server.default-host./JMSProject.UndertowDeploymentInfoService] 

09:05:16,479 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found JMSProject.war in deployment directory. To trigger deployment create a file called JMSProject.war.dodeploy 
09:15:08,434 INFO [org.jboss.as.repository] (ServerService Thread Pool -- 71) WFLYDR0009: Content /Users/cwi/java/wildfly-9.0.2.Final/standalone/data/content/08/0c5a481cd7abf27bfd4b48edf73b1cb214085e is obsolete and will be removed 
09:15:08,443 INFO [org.jboss.as.repository] (ServerService Thread Pool -- 71) WFLYDR0002: Content removed from location /Users/cwi/java/wildfly-9.0.2.Final/standalone/data/content/08/0c5a481cd7abf27bfd4b48edf73b1cb214085e/content 

に展開しようとしているとき

@Stateless 
public class JmsSender implements Serializable { 

    private static final long serialVersionUID = 1L; 

    @Resource(mappedName="java:/ConnectionFactory") 
    private ConnectionFactory connectionFactory; 

    @Resource(mappedName="queue/TestQueue") 
    private Queue queue; 

    public void doIt(String nachricht){ 

     try{ 
      Connection connection = connectionFactory.createConnection(); 
      Session session = connection.createSession(false,Session.AUTO_ACKNOWLEDGE); 
      MessageProducer messageProducer=session.createProducer(queue); 
      TextMessage message = session.createTextMessage("Queue-Message: " +nachricht); 
      messageProducer.send(message); 
     }catch (JMSException e) { 
      e.printStackTrace(); 
     } 

    }  

} 

次の例外がスローされますリモートJNDI名

@Stateless 
public class JmsSender implements Serializable { 

    @Resource(mappedName="java:jboss/exported/jms/queue/TestQueue") 
    private Queue queue; 

または私は依存CDIビーンにステートレスEJBを切り替える場合

ににmappedNameそれはステートレスEJBにJMSキューを注入することはできませんなぜ

<subsystem xmlns="urn:jboss:domain:messaging:3.0"> 
      <hornetq-server> 
       <security-enabled>false</security-enabled> 
       <journal-file-size>102400</journal-file-size> 

       <connectors> 
        <http-connector name="http-connector" socket-binding="http"> 
         <param key="http-upgrade-endpoint" value="http-acceptor"/> 
        </http-connector> 
        <http-connector name="http-connector-throughput" socket-binding="http"> 
         <param key="http-upgrade-endpoint" value="http-acceptor-throughput"/> 
         <param key="batch-delay" value="50"/> 
        </http-connector> 
        <in-vm-connector name="in-vm" server-id="0"/> 
       </connectors> 

       <acceptors> 
        <http-acceptor http-listener="default" name="http-acceptor"/> 
        <http-acceptor http-listener="default" name="http-acceptor-throughput"> 
         <param key="batch-delay" value="50"/> 
         <param key="direct-deliver" value="false"/> 
        </http-acceptor> 
        <in-vm-acceptor name="in-vm" server-id="0"/> 
       </acceptors> 

       <security-settings> 
        <security-setting match="#"> 
         <permission type="send" roles="guest"/> 
         <permission type="consume" roles="guest"/> 
         <permission type="createNonDurableQueue" roles="guest"/> 
         <permission type="deleteNonDurableQueue" roles="guest"/> 
        </security-setting> 
       </security-settings> 

       <address-settings> 
        <address-setting match="#"> 
         <dead-letter-address>jms.queue.DLQ</dead-letter-address> 
         <expiry-address>jms.queue.ExpiryQueue</expiry-address> 
         <max-size-bytes>10485760</max-size-bytes> 
         <page-size-bytes>2097152</page-size-bytes> 
         <message-counter-history-day-limit>10</message-counter-history-day-limit> 
        </address-setting> 
       </address-settings> 

       <jms-connection-factories> 
        <connection-factory name="InVmConnectionFactory"> 
         <connectors> 
          <connector-ref connector-name="in-vm"/> 
         </connectors> 
         <entries> 
          <entry name="java:/ConnectionFactory"/> 
         </entries> 
        </connection-factory> 
        <connection-factory name="RemoteConnectionFactory"> 
         <connectors> 
          <connector-ref connector-name="http-connector"/> 
         </connectors> 
         <entries> 
          <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/> 
         </entries> 
        </connection-factory> 
        <pooled-connection-factory name="hornetq-ra"> 
         <transaction mode="xa"/> 
         <connectors> 
          <connector-ref connector-name="in-vm"/> 
         </connectors> 
         <entries> 
          <entry name="java:/JmsXA"/> 
          <entry name="java:jboss/DefaultJMSConnectionFactory"/> 
         </entries> 
        </pooled-connection-factory> 
       </jms-connection-factories> 

       <jms-destinations> 
        <jms-queue name="ExpiryQueue"> 
         <entry name="java:/jms/queue/ExpiryQueue"/> 
        </jms-queue> 
        <jms-queue name="DLQ"> 
         <entry name="java:/jms/queue/DLQ"/> 
        </jms-queue> 
        <jms-queue name="TestQueue"> 
         <entry name="queue/TestQueue"/> 
         <entry name="java:jboss/exported/jms/queue/TestQueue"/> 
        </jms-queue> 
        <jms-topic name="TestTopic"> 
         <entry name="topic/TestTopic"/> 
         <entry name="java:jboss/exported/jms/topic/TestTopic"/> 
        </jms-topic> 
       </jms-destinations> 
      </hornetq-server> 
     </subsystem> 

をし、なぜそれがCDIのBean内で作業している:0

@Dependent 
public class JmsSender implements Serializable { 

    @Resource(mappedName="queue/TestQueue") 
    private Queue queue; 

Wildfly構成はそのように見ていますか?私は間違って何をしていますか?

ありがとうございます!

私は、これは動作するはずだと思うクリス

+0

あなたはWildflyに 'full'プロファイルを使用している参照してください? WildflyではJMSが有効になっていますか? –

+0

はい私は完全なプロフィールを使用しています。 – Christian

答えて

関連する問題