Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • Cannot convert value of type [org.apache.activemq.ra.ActiveMQConnectionFactory] to required type [javax.jms.ConnectionFactory] for property 'connectionFactory'

    Posted on

    Hello,

    I have setup JBoss EAP 7.3 and configured the resource adapter subsystem to use it with embedded ActiveMQ 5.6.0

    In standalone-full.xml , the connection factory object is defined in the resource adapter subsystem as "org.apache.activemq.ra.ActiveMQManagedConnectionFactory"

    The resource adapter subsystem in Jboss standalone-full.xml is as follows:

    
                
                    
                        
                            activemq-ra.rar
                        
                        XATransaction
                        vm://localhost
                        
                            
                                
                                    1
                                    2000
                                
                            
                        
                        
                            
                                HELLOWORLDMDBQueue
                                                 
                            
                                HELLOWORLDMDBTopic
                                                    
                        
                    
                
            
    

    But my application which uses spring JMS Template to send and receive messages is expecting a connection factory object of type javax.jms.ConnectionFactory.
    This connection factory is a property in the JMSTemplate bean as follows:

    
    
    
            
            
    
    

    Because of this type difference i am getting the following exception when deploying my app in JBoss.

    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jmsTemplate' defined in class path resource [core-config.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'org.apache.activemq.ra.ActiveMQConnectionFactory' to required type 'javax.jms.ConnectionFactory' for property 'connectionFactory'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.apache.activemq.ra.ActiveMQConnectionFactory] to required type [javax.jms.ConnectionFactory] for property 'connectionFactory': no matching editors or conversion strategy found
            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
    ...
    Caused by: org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'org.apache.activemq.ra.ActiveMQConnectionFactory' to required type 'javax.jms.ConnectionFactory' for property 'connectionFactory'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.apache.activemq.ra.ActiveMQConnectionFactory] to required type [javax.jms.ConnectionFactory] for property 'connectionFactory': no matching editors or conversion strategy found
    

    I have removed/commented out the messaging subsystem in standalone-full.xml so that the activemq-ra.rar that comes with activeMQ Artemis doesn't interfere with the one i am using(I have placed activemq-ra.rar file in JBoss deployment directory)

    I have attached my standalone-full.xml

    My Environment is as below
    JBoss EAP 7.3.0 with Embedded ActiveMQ 5.6.0
    JDK 8
    Windows

    I am relatively new to JBoss and I really appreciate any guidance on this.

    Attachments

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2025 Red Hat, Inc.