简体   繁体   English

javax.naming.NameNotFoundException: java:jboss/jms/exampleApp/SampleQueueIn

[英]javax.naming.NameNotFoundException: java:jboss/jms/exampleApp/SampleQueueIn

We are migrating from JBoss EAP 6.4 to JBoss EAP 7.0.我们正在从 JBoss EAP 6.4 迁移到 JBoss EAP 7.0。 Our earlier JMS configuration is not working with JBoss 7.0 where it is throwing NameNotFoundException for my JMS beans我们早期的 JMS 配置不适用于 JBoss 7.0,它会为我的 JMS bean 抛出 NameNotFoundException

my jms.xml我的jms.xml

<beans profile="jboss">
    <bean id="connectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
      <property name="jndiName" value="java:jboss/jms/exampleApp/ConnectionFactory" />
      <property name="resourceRef" value="true" />
    </bean>

    <bean id="SampleQueueIn" class="org.springframework.jndi.JndiObjectFactoryBean">
      <property name="jndiName" value="java:jboss/jms/exampleApp/SampleQueueIn" />
      <property name="resourceRef" value="true" />
    </bean>

  </beans>

My messageListener.xml我的messageListener.xml

<beans profile="jboss">
    <!-- Abstract MessageListener -->
    <bean id="messageListener" abstract="true" class="org.springframework.jms.listener.DefaultMessageListenerContainer">
      <property name="connectionFactory" ref="connectionFactory" />
      <property name="transactionManager" ref="transactionManager" />
      <property name="sessionTransacted" value="true" />
      <!-- Receive timeout determines the duration of JMS session. Increase from default 1sec to 5sec, to lower the traffic to Queue managers -->
      <property name="receiveTimeout" value="5000" />
    </bean>

  </beans>

my proxy-domain componentContext.xml which has listener beans我的代理域 componentContext.xml 具有侦听器 bean

  <beans profile="jboss">
     <bean id="jmsContainer" parent="messageListener">
      <property name="destination" ref="SampleQueueIn" />
      <property name="messageListener" ref="sampleInformationListenerImpl" />
    </bean> 
  </beans>

commands.cli part for adding admin objects for wmq用于为 wmq 添加管理对象的 commands.cli 部分

/subsystem=resource-adapters/resource-adapter=${wmq_deploy_name}:activate
    /subsystem=resource-adapters/resource-adapter=${wmq_deploy_name}/admin-objects=SampleQueueIn:add(class-name=com.ibm.mq.connector.outbound.MQQueueProxy,jndi-name=java:jboss/jms/exampleApp/SampleQueueIn)
    /subsystem=resource-adapters/resource-adapter=${wmq_deploy_name}/admin-objects=SampleQueueIn/config-properties=baseQueueName/:add(value=${filter_jms_queue_config_SampleQueueIn_basequeuename})
    /subsystem=resource-adapters/resource-adapter=${wmq_deploy_name}/admin-objects=SampleQueueIn/config-properties=baseQueueManagerName/:add(value=${filter_jms_queue_config_basequeuemanager})

I can see my admin objects in the JBoss for wmq under sub resources with correct jndi-name also.我可以在子资源下的 wmq JBoss 中看到我的管理对象,也具有正确的 jndi 名称。

I am using IBM wmq v9.1.0.2.我正在使用 IBM wmq v9.1.0.2。

[EDIT] Once I deploy my WAR file, I am getting the below exception [编辑] 部署我的 WAR 文件后,出现以下异常

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'SampleQueueIn' defined in class path resource [jms.xml]: Invocation of init method failed; Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'SampleQueueIn' defined in class path resource [jms.xml]: Invocation of init 方法失败; nested exception is javax.naming.NameNotFoundException: jms/exampleApp/SampleQueueIn-- service jboss.naming.context.java.jboss.jms.exampleApp.SampleQueueIn嵌套异常是 javax.naming.NameNotFoundException: jms/exampleApp/SampleQueueIn-- service jboss.naming.context.java.jboss.jms.exampleApp.SampleQueueIn

This configuration was working(still working) in jboss eap 6.4.此配置在 jboss eap 6.4 中工作(仍在工作)。

I have scourged jboss developer sites & stackoverflow sites but no avail till now!我搜索了 jboss 开发者网站和 stackoverflow 网站,但直到现在都无济于事!

I can see that my我可以看到我的

I resolved the error with reload of JBoss server after running the CLI commands.我在运行 CLI 命令后通过重新加载 JBoss 服务器解决了错误。 I automated the execution of both jboss cli commands & reload commands to make sure that the JNDI objects lookup is successful.我自动执行了 jboss cli 命令和重新加载命令,以确保 JNDI 对象查找成功。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 javax.naming.NameNotFoundException:CDIExtension - javax.naming.NameNotFoundException: CDIExtension 使用JBoss / Spring和NetBeans部署WebAppp时javax.naming.NameNotFoundException - javax.naming.NameNotFoundException when deploying WebAppp with JBoss/Spring and NetBeans javax.naming.NameNotFoundException:名称java:comp在此上下文中未绑定 - javax.naming.NameNotFoundException: Name java:comp is not bound in this Context javax.naming.NameNotFoundException: fsmDS 未绑定 - javax.naming.NameNotFoundException: fsmDS not bound 使用javax.naming.NameNotFoundException部署到Weblogic - Deploying to Weblogic with javax.naming.NameNotFoundException 与DataSource一起引发的HibernatePersistence javax.naming.NameNotFoundException - HibernatePersistence javax.naming.NameNotFoundException thrown with DataSource 缺少资源的Tomcat 7 jndi - javax.naming.NameNotFoundException - Tomcat 7 jndi - javax.naming.NameNotFoundException on missing resource 获取javax.naming.NameNotFoundException:启动tomcat时 - Getting javax.naming.NameNotFoundException: While starting tomcat 自定义SessionListener,此上下文中未绑定名称,javax.naming.NameNotFoundException - Custom SessionListener, name is not bound in this context, javax.naming.NameNotFoundException javax.naming.NameNotFoundException:名称[comp / env]未绑定在此Context中 - javax.naming.NameNotFoundException: Name [comp/env] is not bound in this Context
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM