2015-11-27 40 views
0

我想在jetty上开发的websphere上部署应用程序。 在本地,我使用activeMQ,并且该应用程序使用spring配置文件更改配置以在Webpshere上使用websphere MQ。 但在部署时,我收到以下错误:Websphere JMS部署错误

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'postadorDeMensagemDeRespostaEventosSNCore': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.jms.core.JmsTemplate br.com.vr.pedidos.lancamentoeventual.api.integracao.infrastructure.PostadorDeMensagemDeRespostaEventosSNCoreComFila.jmsSaidaTemplateEventosSNCore; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jmsSaidaTemplateEventosSNCore' defined in class path resource [spring-api-jms.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'com.ibm.ejs.jms.JMSConnectionFactoryHandle' to required type 'javax.jms.ConnectionFactory' for property 'connectionFactory'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [com.ibm.ejs.jms.JMSConnectionFactoryHandle] to required type [javax.jms.ConnectionFactory] for property 'connectionFactory': no matching editors or conversion strategy found 
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334) 

回答

0

我发现问题所在。 库jms本地在包中。 我只是把范围提供的maven:

  <dependency> 
      <groupId>javax.jms</groupId> 
      <artifactId>jms</artifactId> 
      <version>${javax.jms.version}</version> 
      <scope>provided</scope> 
     </dependency>