Search code examples
jmsgrails3

Grails 3 JMS Error during sending messages


Due to issue https://github.com/gpc/jms/issues/27 I have add to application.yml

jms:
containers:
    standard:
        connectionFactoryBean: jmsConnectionFactory

adapters:
    standard:
        messageConverterBean: standardJmsMessageConverter
        persistenceInterceptorBean: persistenceInterceptor

Application starts, but during sending message application get error

org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'standardJmsTemplate' is defined at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:704) at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1175) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:284) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1054) at org.springframework.beans.factory.BeanFactory$getBean$3.call(Unknown Source) at grails.plugin.jms.JmsService.normalizeServiceCtx(JmsService.groovy:381) at sun.reflect.GeneratedMethodAccessor1971.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:210) at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:59) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:174) at grails.plugin.jms.JmsService.send(JmsService.groovy:147) at grails.plugin.jms.JmsService.send(JmsService.groovy) at grails.plugin.jms.JmsService$send.call(Unknown Source)

Grails 3.1.14 org.grails.plugins:jms:2.0.0.RC1

I hope, the error possible to solve by configureation


Solution

  • No Idea how it works, but fixed by additional lines in application.yml (Just copied from plugin code)

    jms:
        templates:
            standard:
                connectionFactoryBean: jmsConnectionFactory
                messageConverterBean: standardJmsMessageConverter